summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/integration/targets/nxos_aaa_server/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_aaa_server/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_aaa_server/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_aaa_server/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_aaa_server/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_aaa_server/tests/common/radius.yaml96
-rw-r--r--test/integration/targets/nxos_aaa_server/tests/common/tacacs.yaml107
-rw-r--r--test/integration/targets/nxos_aaa_server_host/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_aaa_server_host/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_aaa_server_host/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_aaa_server_host/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_aaa_server_host/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_aaa_server_host/tests/common/radius.yaml197
-rw-r--r--test/integration/targets/nxos_aaa_server_host/tests/common/tacacs.yaml201
-rw-r--r--test/integration/targets/nxos_acl/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_acl/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_acl/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_acl/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_acl/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_acl/tests/common/sanity.yaml230
-rw-r--r--test/integration/targets/nxos_acl_interface/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_acl_interface/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_acl_interface/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_acl_interface/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_acl_interface/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_acl_interface/tests/common/sanity.yaml120
-rw-r--r--test/integration/targets/nxos_acl_interfaces/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_acl_interfaces/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_acl_interfaces/tasks/cli.yaml20
-rw-r--r--test/integration/targets/nxos_acl_interfaces/tasks/main.yaml2
-rw-r--r--test/integration/targets/nxos_acl_interfaces/tests/cli/deleted.yml90
-rw-r--r--test/integration/targets/nxos_acl_interfaces/tests/cli/gathered.yml34
-rw-r--r--test/integration/targets/nxos_acl_interfaces/tests/cli/merged.yml63
-rw-r--r--test/integration/targets/nxos_acl_interfaces/tests/cli/overridden.yml68
-rw-r--r--test/integration/targets/nxos_acl_interfaces/tests/cli/parsed.yml40
-rw-r--r--test/integration/targets/nxos_acl_interfaces/tests/cli/populate_acl.yaml9
-rw-r--r--test/integration/targets/nxos_acl_interfaces/tests/cli/populate_config.yaml15
-rw-r--r--test/integration/targets/nxos_acl_interfaces/tests/cli/remove_config.yaml21
-rw-r--r--test/integration/targets/nxos_acl_interfaces/tests/cli/rendered.yml48
-rw-r--r--test/integration/targets/nxos_acl_interfaces/tests/cli/replaced.yml60
-rw-r--r--test/integration/targets/nxos_acl_interfaces/tests/cli/rtt.yml99
-rw-r--r--test/integration/targets/nxos_acl_interfaces/vars/main.yml21
-rw-r--r--test/integration/targets/nxos_acls/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_acls/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_acls/tasks/cli.yaml20
-rw-r--r--test/integration/targets/nxos_acls/tasks/main.yaml2
-rw-r--r--test/integration/targets/nxos_acls/tests/cli/deleted.yml69
-rw-r--r--test/integration/targets/nxos_acls/tests/cli/gathered.yml34
-rw-r--r--test/integration/targets/nxos_acls/tests/cli/merged.yml108
-rw-r--r--test/integration/targets/nxos_acls/tests/cli/overridden.yml99
-rw-r--r--test/integration/targets/nxos_acls/tests/cli/parsed.yml45
-rw-r--r--test/integration/targets/nxos_acls/tests/cli/populate_config.yaml15
-rw-r--r--test/integration/targets/nxos_acls/tests/cli/remove_config.yaml9
-rw-r--r--test/integration/targets/nxos_acls/tests/cli/rendered.yml56
-rw-r--r--test/integration/targets/nxos_acls/tests/cli/replaced.yml65
-rw-r--r--test/integration/targets/nxos_acls/tests/cli/rtt.yml87
-rw-r--r--test/integration/targets/nxos_banner/defaults/main.yaml3
-rw-r--r--test/integration/targets/nxos_banner/meta/main.yaml2
-rw-r--r--test/integration/targets/nxos_banner/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_banner/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_banner/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_banner/tests/common/sanity.yaml84
-rw-r--r--test/integration/targets/nxos_become/defaults/main.yaml3
-rw-r--r--test/integration/targets/nxos_become/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_become/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_become/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_become/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_become/tests/cli/sanity.yaml34
-rw-r--r--test/integration/targets/nxos_bfd_global/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_bfd_global/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_bfd_global/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_bfd_global/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_bfd_global/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_bfd_global/tests/common/sanity.yaml168
-rw-r--r--test/integration/targets/nxos_bfd_interfaces/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_bfd_interfaces/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_bfd_interfaces/tasks/cli.yaml20
-rw-r--r--test/integration/targets/nxos_bfd_interfaces/tasks/main.yaml2
-rw-r--r--test/integration/targets/nxos_bfd_interfaces/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_bfd_interfaces/tests/cli/deleted.yaml71
-rw-r--r--test/integration/targets/nxos_bfd_interfaces/tests/cli/merged.yaml68
-rw-r--r--test/integration/targets/nxos_bfd_interfaces/tests/cli/overridden.yaml67
-rw-r--r--test/integration/targets/nxos_bfd_interfaces/tests/cli/replaced.yaml65
-rw-r--r--test/integration/targets/nxos_bgp/defaults/main.yaml5
-rw-r--r--test/integration/targets/nxos_bgp/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_bgp/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_bgp/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_bgp/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_bgp/tests/common/dis_policy.yaml77
-rw-r--r--test/integration/targets/nxos_bgp/tests/common/hels.yaml95
-rw-r--r--test/integration/targets/nxos_bgp/tests/common/isolate.yaml76
-rw-r--r--test/integration/targets/nxos_bgp/tests/common/param.yaml259
-rw-r--r--test/integration/targets/nxos_bgp/tests/common/sanity.yaml132
-rw-r--r--test/integration/targets/nxos_bgp/tests/common/supp_fib.yaml113
-rw-r--r--test/integration/targets/nxos_bgp_af/defaults/main.yaml5
-rw-r--r--test/integration/targets/nxos_bgp_af/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_bgp_af/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_bgp_af/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_bgp_af/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_bgp_af/tests/common/sanity.yaml320
-rw-r--r--test/integration/targets/nxos_bgp_neighbor/defaults/main.yaml5
-rw-r--r--test/integration/targets/nxos_bgp_neighbor/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_bgp_neighbor/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_bgp_neighbor/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_bgp_neighbor/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_bgp_neighbor/tests/common/sanity.yaml338
-rw-r--r--test/integration/targets/nxos_bgp_neighbor_af/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_bgp_neighbor_af/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_bgp_neighbor_af/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_bgp_neighbor_af/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_bgp_neighbor_af/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_bgp_neighbor_af/tests/common/sanity.yaml288
-rw-r--r--test/integration/targets/nxos_command/defaults/main.yaml3
-rw-r--r--test/integration/targets/nxos_command/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_command/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_command/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_command/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_command/tests/cli/cli_command.yaml26
-rw-r--r--test/integration/targets/nxos_command/tests/cli/contains.yaml18
-rw-r--r--test/integration/targets/nxos_command/tests/cli/sanity.yaml66
-rw-r--r--test/integration/targets/nxos_command/tests/common/bad_operator.yaml19
-rw-r--r--test/integration/targets/nxos_command/tests/common/equal.yaml30
-rw-r--r--test/integration/targets/nxos_command/tests/common/greaterthan.yaml30
-rw-r--r--test/integration/targets/nxos_command/tests/common/greaterthanorequal.yaml30
-rw-r--r--test/integration/targets/nxos_command/tests/common/invalid.yaml26
-rw-r--r--test/integration/targets/nxos_command/tests/common/lessthan.yaml30
-rw-r--r--test/integration/targets/nxos_command/tests/common/lessthanorequal.yaml30
-rw-r--r--test/integration/targets/nxos_command/tests/common/not_comparison_operator.yaml18
-rw-r--r--test/integration/targets/nxos_command/tests/common/notequal.yaml32
-rw-r--r--test/integration/targets/nxos_command/tests/common/output.yaml24
-rw-r--r--test/integration/targets/nxos_command/tests/common/timeout.yaml18
-rw-r--r--test/integration/targets/nxos_command/tests/nxapi/contains.yaml18
-rw-r--r--test/integration/targets/nxos_command/tests/nxapi/sanity.yaml66
-rw-r--r--test/integration/targets/nxos_config/defaults/main.yaml3
-rw-r--r--test/integration/targets/nxos_config/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_config/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_config/tasks/cli_config.yaml16
-rw-r--r--test/integration/targets/nxos_config/tasks/main.yaml15
-rw-r--r--test/integration/targets/nxos_config/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_config/templates/basic/base_running_config10
-rw-r--r--test/integration/targets/nxos_config/templates/basic/config.j24
-rw-r--r--test/integration/targets/nxos_config/templates/basic/configblock.j25
-rw-r--r--test/integration/targets/nxos_config/templates/basic/configexact1.j25
-rw-r--r--test/integration/targets/nxos_config/templates/basic/configexact2.j26
-rw-r--r--test/integration/targets/nxos_config/templates/basic/configstrict1.j26
-rw-r--r--test/integration/targets/nxos_config/templates/basic/intended_running_config10
-rw-r--r--test/integration/targets/nxos_config/templates/basic/setupexact.j27
-rw-r--r--test/integration/targets/nxos_config/templates/basic/setupstrict.j27
-rw-r--r--test/integration/targets/nxos_config/templates/config.js4
-rw-r--r--test/integration/targets/nxos_config/templates/defaults/config.j24
-rw-r--r--test/integration/targets/nxos_config/templates/defaults/test.j24
-rw-r--r--test/integration/targets/nxos_config/tests/cli/diff.yaml33
-rw-r--r--test/integration/targets/nxos_config/tests/cli/multilevel.yaml52
-rw-r--r--test/integration/targets/nxos_config/tests/cli/sublevel.yaml36
-rw-r--r--test/integration/targets/nxos_config/tests/cli/sublevel_exact.yaml58
-rw-r--r--test/integration/targets/nxos_config/tests/cli/sublevel_strict.yaml59
-rw-r--r--test/integration/targets/nxos_config/tests/cli/toplevel_after.yaml40
-rw-r--r--test/integration/targets/nxos_config/tests/cli/toplevel_before.yaml40
-rw-r--r--test/integration/targets/nxos_config/tests/cli_config/cli_backup.yaml113
-rw-r--r--test/integration/targets/nxos_config/tests/cli_config/cli_basic.yaml45
-rw-r--r--test/integration/targets/nxos_config/tests/cli_config/cli_block_replace.yaml30
-rw-r--r--test/integration/targets/nxos_config/tests/cli_config/cli_exact_match.yaml33
-rw-r--r--test/integration/targets/nxos_config/tests/cli_config/cli_strict_match.yaml25
-rw-r--r--test/integration/targets/nxos_config/tests/common/backup.yaml126
-rw-r--r--test/integration/targets/nxos_config/tests/common/defaults.yaml50
-rw-r--r--test/integration/targets/nxos_config/tests/common/sanity.yaml71
-rw-r--r--test/integration/targets/nxos_config/tests/common/save.yaml34
-rw-r--r--test/integration/targets/nxos_config/tests/common/src_basic.yaml38
-rw-r--r--test/integration/targets/nxos_config/tests/common/src_invalid.yaml17
-rw-r--r--test/integration/targets/nxos_config/tests/common/src_match_none.yaml50
-rw-r--r--test/integration/targets/nxos_config/tests/common/sublevel_block.yaml48
-rw-r--r--test/integration/targets/nxos_config/tests/common/toplevel.yaml33
-rw-r--r--test/integration/targets/nxos_config/tests/common/toplevel_nonidempotent.yaml35
-rw-r--r--test/integration/targets/nxos_config/tests/nxapi/multilevel.yaml41
-rw-r--r--test/integration/targets/nxos_config/tests/nxapi/sublevel.yaml37
-rw-r--r--test/integration/targets/nxos_config/tests/nxapi/sublevel_exact.yaml59
-rw-r--r--test/integration/targets/nxos_config/tests/nxapi/sublevel_strict.yaml58
-rw-r--r--test/integration/targets/nxos_config/tests/nxapi/toplevel_after.yaml40
-rw-r--r--test/integration/targets/nxos_config/tests/nxapi/toplevel_before.yaml40
-rw-r--r--test/integration/targets/nxos_devicealias/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_devicealias/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_devicealias/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_devicealias/tasks/main.yaml16
-rw-r--r--test/integration/targets/nxos_devicealias/tests/common/sanity.yaml42
-rw-r--r--test/integration/targets/nxos_evpn_global/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_evpn_global/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_evpn_global/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_evpn_global/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_evpn_global/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_evpn_global/tests/common/sanity.yaml68
-rw-r--r--test/integration/targets/nxos_evpn_vni/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_evpn_vni/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_evpn_vni/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_evpn_vni/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_evpn_vni/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_evpn_vni/tests/common/sanity.yaml112
-rw-r--r--test/integration/targets/nxos_facts/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_facts/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_facts/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_facts/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_facts/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_facts/tests/common/all_facts.yaml31
-rw-r--r--test/integration/targets/nxos_facts/tests/common/default_facts.yaml32
-rw-r--r--test/integration/targets/nxos_facts/tests/common/invalid_subset.yaml20
-rw-r--r--test/integration/targets/nxos_facts/tests/common/not_hardware.yaml28
-rw-r--r--test/integration/targets/nxos_facts/tests/common/sanity.yaml91
-rw-r--r--test/integration/targets/nxos_feature/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_feature/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_feature/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_feature/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_feature/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_feature/tests/common/configure.yaml54
-rw-r--r--test/integration/targets/nxos_feature/tests/common/invalid.yaml14
-rw-r--r--test/integration/targets/nxos_file_copy/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_file_copy/meta/main.yml5
-rw-r--r--test/integration/targets/nxos_file_copy/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_file_copy/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_file_copy/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_file_copy/tests/cli/input_validation.yaml66
-rw-r--r--test/integration/targets/nxos_file_copy/tests/cli/negative.yaml133
-rw-r--r--test/integration/targets/nxos_file_copy/tests/cli/sanity.yaml137
-rw-r--r--test/integration/targets/nxos_file_copy/tests/nxapi/badtransport.yaml16
-rw-r--r--test/integration/targets/nxos_gir/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_gir/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_gir/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_gir/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_gir/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_gir/tests/common/sanity.yaml112
-rw-r--r--test/integration/targets/nxos_gir_profile_management/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_gir_profile_management/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_gir_profile_management/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_gir_profile_management/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_gir_profile_management/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_gir_profile_management/tests/common/sanity.yaml104
-rw-r--r--test/integration/targets/nxos_hsrp/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_hsrp/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_hsrp/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_hsrp/tasks/main.yaml7
-rw-r--r--test/integration/targets/nxos_hsrp/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_hsrp/tests/common/sanity.yaml152
-rw-r--r--test/integration/targets/nxos_hsrp_interfaces/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_hsrp_interfaces/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_hsrp_interfaces/tasks/cli.yaml20
-rw-r--r--test/integration/targets/nxos_hsrp_interfaces/tasks/main.yaml2
-rw-r--r--test/integration/targets/nxos_hsrp_interfaces/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_hsrp_interfaces/tests/cli/deleted.yaml57
-rw-r--r--test/integration/targets/nxos_hsrp_interfaces/tests/cli/merged.yaml65
-rw-r--r--test/integration/targets/nxos_hsrp_interfaces/tests/cli/overridden.yaml58
-rw-r--r--test/integration/targets/nxos_hsrp_interfaces/tests/cli/replaced.yaml57
-rw-r--r--test/integration/targets/nxos_igmp/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_igmp/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_igmp/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_igmp/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_igmp/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_igmp/tests/common/sanity.yaml68
-rw-r--r--test/integration/targets/nxos_igmp_interface/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_igmp_interface/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_igmp_interface/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_igmp_interface/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_igmp_interface/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_igmp_interface/tests/common/sanity.yaml179
-rw-r--r--test/integration/targets/nxos_igmp_snooping/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_igmp_snooping/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_igmp_snooping/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_igmp_snooping/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_igmp_snooping/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_igmp_snooping/tests/common/sanity.yaml109
-rw-r--r--test/integration/targets/nxos_install_os/defaults/main.yaml3
-rw-r--r--test/integration/targets/nxos_install_os/meta/main.yml3
-rw-r--r--test/integration/targets/nxos_install_os/tasks/httpapi.yaml16
-rw-r--r--test/integration/targets/nxos_install_os/tasks/main.yaml8
-rw-r--r--test/integration/targets/nxos_install_os/tasks/network_cli.yaml16
-rw-r--r--test/integration/targets/nxos_install_os/tasks/upgrade/clear_persistent_sockets.yaml19
-rw-r--r--test/integration/targets/nxos_install_os/tasks/upgrade/copy_kick_system_images.yaml60
-rw-r--r--test/integration/targets/nxos_install_os/tasks/upgrade/delete_files.yaml10
-rw-r--r--test/integration/targets/nxos_install_os/tasks/upgrade/enable_scp_server.yaml5
-rw-r--r--test/integration/targets/nxos_install_os/tasks/upgrade/install_os.yaml24
-rw-r--r--test/integration/targets/nxos_install_os/tasks/upgrade/install_system.yaml52
-rw-r--r--test/integration/targets/nxos_install_os/tasks/upgrade/install_with_kick.yaml44
-rw-r--r--test/integration/targets/nxos_install_os/tasks/upgrade/main_os_install.yaml6
-rw-r--r--test/integration/targets/nxos_install_os/tests/common/upgrade.yaml59
-rw-r--r--test/integration/targets/nxos_install_os/tests/common/upgrade_n3172_greensboro.yaml27
-rw-r--r--test/integration/targets/nxos_install_os/tests/common/upgrade_n3172_u61a.yaml28
-rw-r--r--test/integration/targets/nxos_install_os/tests/common/upgrade_n3172_u62a.yaml28
-rw-r--r--test/integration/targets/nxos_install_os/tests/common/upgrade_n3172_u63a.yaml28
-rw-r--r--test/integration/targets/nxos_install_os/tests/common/upgrade_n35_62a88.yaml28
-rw-r--r--test/integration/targets/nxos_install_os/tests/common/upgrade_n35_greensboro.yaml27
-rw-r--r--test/integration/targets/nxos_install_os/tests/common/upgrade_n5k_730_N11.yaml27
-rw-r--r--test/integration/targets/nxos_install_os/tests/common/upgrade_n5k_733_N11.yaml27
-rw-r--r--test/integration/targets/nxos_install_os/tests/common/upgrade_n7k_atherton.yaml27
-rw-r--r--test/integration/targets/nxos_install_os/tests/common/upgrade_n7k_helsinki.yaml27
-rw-r--r--test/integration/targets/nxos_install_os/tests/common/upgrade_n9k_greensboro.yaml39
-rw-r--r--test/integration/targets/nxos_install_os/tests/common/upgrade_n9k_greensboro_force.yaml39
-rw-r--r--test/integration/targets/nxos_install_os/tests/common/upgrade_n9k_hamilton.yaml37
-rw-r--r--test/integration/targets/nxos_interface/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_interface/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_interface/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_interface/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_interface/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_interface/tests/common/intent.yaml63
-rw-r--r--test/integration/targets/nxos_interface/tests/common/sanity.yaml117
-rw-r--r--test/integration/targets/nxos_interface/tests/common/set_state_absent.yaml29
-rw-r--r--test/integration/targets/nxos_interface/tests/common/set_state_present.yaml32
-rw-r--r--test/integration/targets/nxos_interface/tests/common/sub_int.yaml73
-rw-r--r--test/integration/targets/nxos_interface_ospf/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_interface_ospf/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_interface_ospf/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_interface_ospf/tasks/main.yaml7
-rw-r--r--test/integration/targets/nxos_interface_ospf/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_interface_ospf/tests/common/sanity.yaml286
-rw-r--r--test/integration/targets/nxos_interfaces/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_interfaces/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_interfaces/tasks/cli.yaml20
-rw-r--r--test/integration/targets/nxos_interfaces/tasks/main.yaml9
-rw-r--r--test/integration/targets/nxos_interfaces/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_interfaces/tests/cli/deleted.yaml64
-rw-r--r--test/integration/targets/nxos_interfaces/tests/cli/merged.yaml57
-rw-r--r--test/integration/targets/nxos_interfaces/tests/cli/overridden.yaml67
-rw-r--r--test/integration/targets/nxos_interfaces/tests/cli/replaced.yaml63
-rw-r--r--test/integration/targets/nxos_l2_interface/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_l2_interface/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_l2_interface/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_l2_interface/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_l2_interface/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_l2_interface/tests/common/agg.yaml93
-rw-r--r--test/integration/targets/nxos_l2_interface/tests/common/sanity.yaml153
-rw-r--r--test/integration/targets/nxos_l2_interfaces/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_l2_interfaces/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_l2_interfaces/tasks/cli.yaml20
-rw-r--r--test/integration/targets/nxos_l2_interfaces/tasks/main.yaml2
-rw-r--r--test/integration/targets/nxos_l2_interfaces/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_l2_interfaces/tests/cli/deleted.yaml63
-rw-r--r--test/integration/targets/nxos_l2_interfaces/tests/cli/merged.yaml102
-rw-r--r--test/integration/targets/nxos_l2_interfaces/tests/cli/overridden.yaml72
-rw-r--r--test/integration/targets/nxos_l2_interfaces/tests/cli/replaced.yaml72
-rw-r--r--test/integration/targets/nxos_l3_interface/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_l3_interface/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_l3_interface/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_l3_interface/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_l3_interface/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_l3_interface/tests/cli/sanity.yaml112
-rw-r--r--test/integration/targets/nxos_l3_interface/tests/nxapi/sanity.yaml103
-rw-r--r--test/integration/targets/nxos_l3_interfaces/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_l3_interfaces/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_l3_interfaces/tasks/cli.yaml20
-rw-r--r--test/integration/targets/nxos_l3_interfaces/tasks/main.yaml18
-rw-r--r--test/integration/targets/nxos_l3_interfaces/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_l3_interfaces/tests/cli/deleted.yaml70
-rw-r--r--test/integration/targets/nxos_l3_interfaces/tests/cli/merged.yaml71
-rw-r--r--test/integration/targets/nxos_l3_interfaces/tests/cli/overridden.yaml84
-rw-r--r--test/integration/targets/nxos_l3_interfaces/tests/cli/replaced.yaml117
-rw-r--r--test/integration/targets/nxos_lacp/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_lacp/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_lacp/tasks/cli.yaml20
-rw-r--r--test/integration/targets/nxos_lacp/tasks/main.yaml2
-rw-r--r--test/integration/targets/nxos_lacp/tests/cli/deleted.yaml71
-rw-r--r--test/integration/targets/nxos_lacp/tests/cli/merged.yaml66
-rw-r--r--test/integration/targets/nxos_lacp/tests/cli/replaced.yaml104
-rw-r--r--test/integration/targets/nxos_lacp_interfaces/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_lacp_interfaces/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_lacp_interfaces/tasks/cli.yaml20
-rw-r--r--test/integration/targets/nxos_lacp_interfaces/tasks/main.yaml2
-rw-r--r--test/integration/targets/nxos_lacp_interfaces/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_lacp_interfaces/tests/cli/deleted.yaml79
-rw-r--r--test/integration/targets/nxos_lacp_interfaces/tests/cli/merged.yaml85
-rw-r--r--test/integration/targets/nxos_lacp_interfaces/tests/cli/overridden.yaml91
-rw-r--r--test/integration/targets/nxos_lacp_interfaces/tests/cli/replaced.yaml79
-rw-r--r--test/integration/targets/nxos_lag_interfaces/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_lag_interfaces/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_lag_interfaces/tasks/cli.yaml20
-rw-r--r--test/integration/targets/nxos_lag_interfaces/tasks/main.yaml2
-rw-r--r--test/integration/targets/nxos_lag_interfaces/tests/cli/deleted.yaml66
-rw-r--r--test/integration/targets/nxos_lag_interfaces/tests/cli/merged.yaml66
-rw-r--r--test/integration/targets/nxos_lag_interfaces/tests/cli/overridden.yaml78
-rw-r--r--test/integration/targets/nxos_lag_interfaces/tests/cli/replaced.yaml78
-rw-r--r--test/integration/targets/nxos_linkagg/defaults/main.yaml3
-rw-r--r--test/integration/targets/nxos_linkagg/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_linkagg/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_linkagg/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_linkagg/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_linkagg/tests/common/sanity.yaml190
-rw-r--r--test/integration/targets/nxos_lldp/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_lldp/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_lldp/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_lldp/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_lldp/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_lldp/tests/cli/sanity.yaml47
-rw-r--r--test/integration/targets/nxos_lldp/tests/nxapi/sanity.yaml47
-rw-r--r--test/integration/targets/nxos_lldp_global/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_lldp_global/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_lldp_global/tasks/cli.yaml20
-rw-r--r--test/integration/targets/nxos_lldp_global/tasks/main.yaml2
-rw-r--r--test/integration/targets/nxos_lldp_global/tests/cli/deleted.yml83
-rw-r--r--test/integration/targets/nxos_lldp_global/tests/cli/merged.yml72
-rw-r--r--test/integration/targets/nxos_lldp_global/tests/cli/replaced.yml93
-rw-r--r--test/integration/targets/nxos_lldp_interfaces/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_lldp_interfaces/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_lldp_interfaces/tasks/cli.yaml20
-rw-r--r--test/integration/targets/nxos_lldp_interfaces/tasks/main.yaml2
-rw-r--r--test/integration/targets/nxos_lldp_interfaces/tasks/nxapi.yaml33
-rw-r--r--test/integration/targets/nxos_lldp_interfaces/tests/cli/deleted.yml73
-rw-r--r--test/integration/targets/nxos_lldp_interfaces/tests/cli/gathered.yml52
-rw-r--r--test/integration/targets/nxos_lldp_interfaces/tests/cli/merged.yml60
-rw-r--r--test/integration/targets/nxos_lldp_interfaces/tests/cli/overridden.yml66
-rw-r--r--test/integration/targets/nxos_lldp_interfaces/tests/cli/parsed.yml47
-rw-r--r--test/integration/targets/nxos_lldp_interfaces/tests/cli/remove_config.yaml8
-rw-r--r--test/integration/targets/nxos_lldp_interfaces/tests/cli/rendered.yml42
-rw-r--r--test/integration/targets/nxos_lldp_interfaces/tests/cli/replaced.yml62
-rw-r--r--test/integration/targets/nxos_lldp_interfaces/tests/cli/rtt.yml70
-rw-r--r--test/integration/targets/nxos_lldp_interfaces/vars/main.yml14
-rw-r--r--test/integration/targets/nxos_logging/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_logging/meta/main.yaml2
-rw-r--r--test/integration/targets/nxos_logging/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_logging/tasks/main.yaml13
-rw-r--r--test/integration/targets/nxos_logging/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_logging/tests/common/basic.yaml505
-rw-r--r--test/integration/targets/nxos_logging/tests/common/net_logging.yaml34
-rw-r--r--test/integration/targets/nxos_logging/tests/common/purge.yaml105
-rw-r--r--test/integration/targets/nxos_netconf/defaults/main.yaml3
-rw-r--r--test/integration/targets/nxos_netconf/meta/main.yaml3
-rw-r--r--test/integration/targets/nxos_netconf/tasks/main.yaml41
-rw-r--r--test/integration/targets/nxos_netconf/tasks/netconf.yaml16
-rw-r--r--test/integration/targets/nxos_netconf/tests/fixtures/config.yaml14
-rw-r--r--test/integration/targets/nxos_netconf/tests/netconf/basic.yaml44
-rw-r--r--test/integration/targets/nxos_ntp/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_ntp/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_ntp/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_ntp/tasks/main.yaml7
-rw-r--r--test/integration/targets/nxos_ntp/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_ntp/tests/common/sanity.yaml114
-rw-r--r--test/integration/targets/nxos_ntp_auth/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_ntp_auth/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_ntp_auth/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_ntp_auth/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_ntp_auth/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_ntp_auth/tests/common/sanity.yaml133
-rw-r--r--test/integration/targets/nxos_ntp_options/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_ntp_options/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_ntp_options/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_ntp_options/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_ntp_options/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_ntp_options/tests/common/sanity.yaml99
-rw-r--r--test/integration/targets/nxos_nxapi/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_nxapi/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_nxapi/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_nxapi/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_nxapi/tasks/nxapi.yaml33
-rw-r--r--test/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_http.yaml16
-rw-r--r--test/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_https.yaml16
-rw-r--r--test/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_https_http.yaml20
-rw-r--r--test/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_https_http_ports.yaml20
-rw-r--r--test/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_http.yaml6
-rw-r--r--test/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_https.yaml6
-rw-r--r--test/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_https_http.yaml8
-rw-r--r--test/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_https_http_ports.yaml8
-rw-r--r--test/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_http.yaml7
-rw-r--r--test/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_https.yaml7
-rw-r--r--test/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_https_http.yaml9
-rw-r--r--test/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_https_http_ports.yaml9
-rw-r--r--test/integration/targets/nxos_nxapi/tests/cli/configure.yaml141
-rw-r--r--test/integration/targets/nxos_nxapi/tests/cli/disable.yaml31
-rw-r--r--test/integration/targets/nxos_nxapi/tests/cli/enable.yaml34
-rw-r--r--test/integration/targets/nxos_nxapi/tests/cli/nxapi_ssl.yaml246
-rw-r--r--test/integration/targets/nxos_nxapi/tests/nxapi/badtransport.yaml17
-rw-r--r--test/integration/targets/nxos_nxapi_transports/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_nxapi_transports/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_nxapi_transports/tasks/main.yaml2
-rw-r--r--test/integration/targets/nxos_nxapi_transports/tasks/nxapi.yaml24
-rw-r--r--test/integration/targets/nxos_nxapi_transports/tests/nxapi/assert_test.yaml38
-rw-r--r--test/integration/targets/nxos_nxapi_transports/tests/nxapi/assert_transports.yaml27
-rw-r--r--test/integration/targets/nxos_ospf/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_ospf/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_ospf/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_ospf/tasks/main.yaml7
-rw-r--r--test/integration/targets/nxos_ospf/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_ospf/tests/common/sanity.yaml51
-rw-r--r--test/integration/targets/nxos_ospf_vrf/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_ospf_vrf/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_ospf_vrf/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_ospf_vrf/tasks/main.yaml7
-rw-r--r--test/integration/targets/nxos_ospf_vrf/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_ospf_vrf/tests/common/sanity.yaml133
-rw-r--r--test/integration/targets/nxos_overlay_global/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_overlay_global/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_overlay_global/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_overlay_global/tasks/main.yaml7
-rw-r--r--test/integration/targets/nxos_overlay_global/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_overlay_global/tasks/platform/n7k/cleanup.yaml22
-rw-r--r--test/integration/targets/nxos_overlay_global/tasks/platform/n7k/setup.yaml36
-rw-r--r--test/integration/targets/nxos_overlay_global/tests/common/sanity.yaml97
-rw-r--r--test/integration/targets/nxos_pim/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_pim/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_pim/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_pim/tasks/main.yaml7
-rw-r--r--test/integration/targets/nxos_pim/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_pim/tests/common/sanity.yaml83
-rw-r--r--test/integration/targets/nxos_pim_interface/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_pim_interface/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_pim_interface/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_pim_interface/tasks/main.yaml7
-rw-r--r--test/integration/targets/nxos_pim_interface/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_pim_interface/tests/common/sanity.yaml188
-rw-r--r--test/integration/targets/nxos_pim_rp_address/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_pim_rp_address/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_pim_rp_address/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_pim_rp_address/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_pim_rp_address/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_pim_rp_address/tests/common/configure.yaml215
-rw-r--r--test/integration/targets/nxos_reboot/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_reboot/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_reboot/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_reboot/tasks/main.yaml5
-rw-r--r--test/integration/targets/nxos_reboot/tasks/nxapi.yaml28
-rw-r--r--test/integration/targets/nxos_reboot/tests/common/sanity.yaml23
-rw-r--r--test/integration/targets/nxos_rollback/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_rollback/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_rollback/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_rollback/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_rollback/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_rollback/tests/common/sanity.yaml24
-rw-r--r--test/integration/targets/nxos_rpm/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_rpm/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_rpm/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_rpm/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_rpm/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_rpm/tests/common/sanity.yaml151
-rw-r--r--test/integration/targets/nxos_smoke/defaults/main.yaml3
-rw-r--r--test/integration/targets/nxos_smoke/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_smoke/tasks/cli.yaml33
-rw-r--r--test/integration/targets/nxos_smoke/tasks/main.yaml14
-rw-r--r--test/integration/targets/nxos_smoke/tasks/nxapi.yaml33
-rw-r--r--test/integration/targets/nxos_smoke/tests/cli/misc_tests.yaml17
-rw-r--r--test/integration/targets/nxos_smoke/tests/common/common_config.yaml160
-rw-r--r--test/integration/targets/nxos_smoke/tests/common/common_utils.yaml102
-rw-r--r--test/integration/targets/nxos_smoke/tests/common/misc_tests.yaml30
-rw-r--r--test/integration/targets/nxos_snapshot/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_snapshot/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_snapshot/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_snapshot/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_snapshot/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_snapshot/tests/common/sanity.yaml128
-rw-r--r--test/integration/targets/nxos_snmp_community/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_snmp_community/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_snmp_community/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_snmp_community/tasks/main.yaml7
-rw-r--r--test/integration/targets/nxos_snmp_community/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_snmp_community/tests/common/sanity.yaml138
-rw-r--r--test/integration/targets/nxos_snmp_contact/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_snmp_contact/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_snmp_contact/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_snmp_contact/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_snmp_contact/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_snmp_contact/tests/common/sanity.yaml59
-rw-r--r--test/integration/targets/nxos_snmp_host/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_snmp_host/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_snmp_host/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_snmp_host/tasks/main.yaml7
-rw-r--r--test/integration/targets/nxos_snmp_host/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v1_trap.yaml123
-rw-r--r--test/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v2_inform.yaml121
-rw-r--r--test/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v3_inform.yaml127
-rw-r--r--test/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v3_trap.yaml125
-rw-r--r--test/integration/targets/nxos_snmp_location/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_snmp_location/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_snmp_location/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_snmp_location/tasks/main.yaml7
-rw-r--r--test/integration/targets/nxos_snmp_location/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_snmp_location/tests/common/sanity.yaml59
-rw-r--r--test/integration/targets/nxos_snmp_traps/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_snmp_traps/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_snmp_traps/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_snmp_traps/tasks/main.yaml7
-rw-r--r--test/integration/targets/nxos_snmp_traps/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_snmp_traps/tests/common/sanity.yaml77
-rw-r--r--test/integration/targets/nxos_snmp_user/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_snmp_user/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_snmp_user/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_snmp_user/tasks/main.yaml7
-rw-r--r--test/integration/targets/nxos_snmp_user/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_snmp_user/tests/common/sanity.yaml107
-rw-r--r--test/integration/targets/nxos_static_route/defaults/main.yaml5
-rw-r--r--test/integration/targets/nxos_static_route/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_static_route/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_static_route/tasks/main.yaml7
-rw-r--r--test/integration/targets/nxos_static_route/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_static_route/tests/common/sanity.yaml195
-rw-r--r--test/integration/targets/nxos_system/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_system/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_system/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_system/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_system/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_system/tests/cli/net_system.yaml34
-rw-r--r--test/integration/targets/nxos_system/tests/cli/set_domain_list.yaml112
-rw-r--r--test/integration/targets/nxos_system/tests/cli/set_domain_name.yaml32
-rw-r--r--test/integration/targets/nxos_system/tests/cli/set_name_servers.yaml100
-rw-r--r--test/integration/targets/nxos_system/tests/common/sanity.yaml126
-rw-r--r--test/integration/targets/nxos_system/tests/common/set_hostname.yaml35
-rw-r--r--test/integration/targets/nxos_system/tests/nxapi/net_system.yaml35
-rw-r--r--test/integration/targets/nxos_system/tests/nxapi/set_domain_list.yaml121
-rw-r--r--test/integration/targets/nxos_system/tests/nxapi/set_domain_name.yaml34
-rw-r--r--test/integration/targets/nxos_system/tests/nxapi/set_name_servers.yaml110
-rw-r--r--test/integration/targets/nxos_telemetry/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_telemetry/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_telemetry/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_telemetry/tasks/main.yaml18
-rw-r--r--test/integration/targets/nxos_telemetry/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_telemetry/tests/common/deleted.yaml93
-rw-r--r--test/integration/targets/nxos_telemetry/tests/common/merged.yaml184
-rw-r--r--test/integration/targets/nxos_telemetry/tests/common/replaced.yaml190
-rw-r--r--test/integration/targets/nxos_udld/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_udld/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_udld/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_udld/tasks/main.yaml7
-rw-r--r--test/integration/targets/nxos_udld/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_udld/tests/common/sanity.yaml92
-rw-r--r--test/integration/targets/nxos_udld_interface/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_udld_interface/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_udld_interface/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_udld_interface/tasks/main.yaml7
-rw-r--r--test/integration/targets/nxos_udld_interface/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_udld_interface/tests/common/sanity.yaml108
-rw-r--r--test/integration/targets/nxos_user/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_user/meta/main.yaml2
-rw-r--r--test/integration/targets/nxos_user/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_user/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_user/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_user/tests/common/auth.yaml34
-rw-r--r--test/integration/targets/nxos_user/tests/common/basic.yaml55
-rw-r--r--test/integration/targets/nxos_user/tests/common/net_user.yaml31
-rw-r--r--test/integration/targets/nxos_user/tests/common/sanity.yaml110
-rw-r--r--test/integration/targets/nxos_vlan/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_vlan/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_vlan/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_vlan/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_vlan/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_vlan/tests/common/agg.yaml114
-rw-r--r--test/integration/targets/nxos_vlan/tests/common/interface.yaml124
-rw-r--r--test/integration/targets/nxos_vlan/tests/common/sanity.yaml224
-rw-r--r--test/integration/targets/nxos_vlans/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_vlans/meta/main.yml1
-rw-r--r--test/integration/targets/nxos_vlans/tasks/cli.yaml20
-rw-r--r--test/integration/targets/nxos_vlans/tasks/main.yaml2
-rw-r--r--test/integration/targets/nxos_vlans/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_vlans/tests/cli/deleted.yaml48
-rw-r--r--test/integration/targets/nxos_vlans/tests/cli/merged.yaml55
-rw-r--r--test/integration/targets/nxos_vlans/tests/cli/overridden.yaml65
-rw-r--r--test/integration/targets/nxos_vlans/tests/cli/replaced.yaml62
-rw-r--r--test/integration/targets/nxos_vpc/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_vpc/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_vpc/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_vpc/tasks/main.yaml7
-rw-r--r--test/integration/targets/nxos_vpc/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_vpc/tests/common/sanity.yaml178
-rw-r--r--test/integration/targets/nxos_vpc_interface/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_vpc_interface/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_vpc_interface/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_vpc_interface/tasks/main.yaml7
-rw-r--r--test/integration/targets/nxos_vpc_interface/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_vpc_interface/tests/common/sanity.yaml140
-rw-r--r--test/integration/targets/nxos_vrf/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_vrf/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_vrf/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_vrf/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_vrf/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_vrf/tests/common/intent.yaml183
-rw-r--r--test/integration/targets/nxos_vrf/tests/common/sanity.yaml110
-rw-r--r--test/integration/targets/nxos_vrf_af/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_vrf_af/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_vrf_af/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_vrf_af/tasks/main.yaml7
-rw-r--r--test/integration/targets/nxos_vrf_af/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_vrf_af/tests/common/sanity.yaml146
-rw-r--r--test/integration/targets/nxos_vrf_interface/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_vrf_interface/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_vrf_interface/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_vrf_interface/tasks/main.yaml7
-rw-r--r--test/integration/targets/nxos_vrf_interface/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_vrf_interface/tests/common/sanity.yaml57
-rw-r--r--test/integration/targets/nxos_vrrp/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_vrrp/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_vrrp/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_vrrp/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_vrrp/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_vrrp/tests/common/sanity.yaml132
-rw-r--r--test/integration/targets/nxos_vsan/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_vsan/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_vsan/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_vsan/tasks/main.yaml16
-rw-r--r--test/integration/targets/nxos_vsan/tests/common/sanity.yaml50
-rw-r--r--test/integration/targets/nxos_vsan/vars/main.yml4
-rw-r--r--test/integration/targets/nxos_vtp_domain/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_vtp_domain/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_vtp_domain/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_vtp_domain/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_vtp_domain/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_vtp_domain/tests/common/sanity.yaml45
-rw-r--r--test/integration/targets/nxos_vtp_password/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_vtp_password/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_vtp_password/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_vtp_password/tasks/main.yaml7
-rw-r--r--test/integration/targets/nxos_vtp_password/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_vtp_password/tests/common/sanity.yaml64
-rw-r--r--test/integration/targets/nxos_vtp_version/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_vtp_version/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_vtp_version/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_vtp_version/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_vtp_version/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_vtp_version/tests/common/sanity.yaml49
-rw-r--r--test/integration/targets/nxos_vxlan_vtep/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_vxlan_vtep/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_vxlan_vtep/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_vxlan_vtep/tasks/main.yaml3
-rw-r--r--test/integration/targets/nxos_vxlan_vtep/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_vxlan_vtep/tasks/platform/n7k/cleanup.yaml22
-rw-r--r--test/integration/targets/nxos_vxlan_vtep/tasks/platform/n7k/setup.yaml29
-rw-r--r--test/integration/targets/nxos_vxlan_vtep/tests/common/sanity.yaml219
-rw-r--r--test/integration/targets/nxos_vxlan_vtep_vni/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_vxlan_vtep_vni/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_vxlan_vtep_vni/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_vxlan_vtep_vni/tasks/main.yaml7
-rw-r--r--test/integration/targets/nxos_vxlan_vtep_vni/tasks/nxapi.yaml27
-rw-r--r--test/integration/targets/nxos_vxlan_vtep_vni/tests/common/sanity.yaml251
-rw-r--r--test/integration/targets/nxos_zone_zoneset/defaults/main.yaml2
-rw-r--r--test/integration/targets/nxos_zone_zoneset/meta/main.yml2
-rw-r--r--test/integration/targets/nxos_zone_zoneset/tasks/cli.yaml27
-rw-r--r--test/integration/targets/nxos_zone_zoneset/tasks/main.yaml16
-rw-r--r--test/integration/targets/nxos_zone_zoneset/tests/common/sanity.yaml145
-rw-r--r--test/integration/targets/nxos_zone_zoneset/vars/main.yml4
-rw-r--r--test/sanity/ignore.txt529
-rw-r--r--test/units/modules/network/nxos/fixtures/_nxos_interface/show_interface129
-rw-r--r--test/units/modules/network/nxos/fixtures/_nxos_interface/show_interface_Ethernet2_196
-rw-r--r--test/units/modules/network/nxos/fixtures/_nxos_interface/show_interface_loopback00
-rw-r--r--test/units/modules/network/nxos/fixtures/_nxos_interface/show_run_interface_Ethernet2_18
-rw-r--r--test/units/modules/network/nxos/fixtures/_nxos_interface/show_run_interface_loopback00
-rw-r--r--test/units/modules/network/nxos/fixtures/_nxos_ip_interface.cfg30
-rw-r--r--test/units/modules/network/nxos/fixtures/_nxos_switchport/show_interface_ethernet97
-rw-r--r--test/units/modules/network/nxos/fixtures/_nxos_switchport/show_interface_ethernet_switchport14
-rw-r--r--test/units/modules/network/nxos/fixtures/_nxos_switchport/show_vlan18
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_acl/show_ip_access-list.txt227
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_acl_interface/show_running-config_aclmgr.txt4
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_acl_interfaces/nxos_acl_interfaces.cfg2
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_bfd_global/N7K.cfg16
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_bfd_global/N9K.cfg13
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_bgp/config.cfg17
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_bgp/config_32_bits_as.cfg6
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_command/show_version.txt68
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_config/candidate.cfg7
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_config/config.cfg26
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_devicealias/shdadatabse.cfg5
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_devicealias/shdastatus.cfg4
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_devicealias/shdastatus_mansi.cfg4
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_devicealias/shdastatuslock.cfg6
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_evpn_global/configured.cfg3
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_evpn_global/unconfigured.cfg1
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_evpn_vni_config.cfg8
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_feature/show_feature.txt4
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_interface_ospf/config.cfg17
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_l3_interface/ethernet_noshut3
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_l3_interface/ethernet_noshut_ipv4_ipv65
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_l3_interface/ethernet_noshut_multiple_ipv67
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_nxapi/n3k/show_run_all2
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_nxapi/n7k/show_run_all5
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_overlay_global_config.cfg1
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_pim/config.cfg2
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_pim_interface/config.cfg11
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_pim_interface/sh_run_interface_eth2_1_all0
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_pim_interface/show_interface_eth2_196
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_pim_interface/show_ip_pim_interface_eth2_168
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_pim_rp_address/config.cfg1
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_static_route.cfg3
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_system_config.cfg16
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_telemetry/N9K.cfg43
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_telemetry/N9K_SGs.cfg19
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vlan/agg_show_vlan_brief.txt27
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vlan/config.cfg4
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vlan/show_vlan_brief.txt11
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vlans/show_running-config13
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vlans/show_running-config_no_facts1
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vlans/show_running-config_vlan_11
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vlans/show_vlan45
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vlans/show_vlan_no_facts1
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vlans/show_vlan_vlan_116
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vpc/show_vpc20
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vpc/show_vrf_all30
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_hardware3
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_inventory13
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_vpc3
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_vrf_all36
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vpc/vrf_test_vpc_config2
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vpc_interface/show_port-channel_summary22
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vpc_interface/show_vpc_brief14
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vrf/show_run_all4
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vrf/show_vrf_default0
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vrf/show_vrf_default_interface0
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vrf/show_vrf_management10
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vrf/show_vrf_management_interface0
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vrf/show_vrf_ntc0
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vrf/show_vrf_ntc_interface0
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vrf_af/config.cfg22
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vsan/shvsan.cfg35
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vsan/shvsanmem.cfg30
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vxlan_vtep/config.cfg2
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_vxlan_vtep_vni/config.cfg2
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzone_0.cfg8
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzone_1.cfg8
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzone_2.cfg6
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzoneset_0.cfg10
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzoneset_1.cfg9
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzoneset_2.cfg7
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonesetactive_0.cfg8
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_0.cfg23
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_1.cfg23
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_2.cfg24
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_3.cfg24
-rw-r--r--test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_4.cfg23
-rw-r--r--test/units/modules/network/nxos/nxos_module.py117
-rw-r--r--test/units/modules/network/nxos/storage/test_nxos_devicealias.py229
-rw-r--r--test/units/modules/network/nxos/storage/test_nxos_vsan.py237
-rw-r--r--test/units/modules/network/nxos/storage/test_nxos_zone_zoneset.py496
-rw-r--r--test/units/modules/network/nxos/test_nxos_acl.py79
-rw-r--r--test/units/modules/network/nxos/test_nxos_acl_interface.py71
-rw-r--r--test/units/modules/network/nxos/test_nxos_acl_interfaces.py303
-rw-r--r--test/units/modules/network/nxos/test_nxos_acls.py370
-rw-r--r--test/units/modules/network/nxos/test_nxos_banner.py83
-rw-r--r--test/units/modules/network/nxos/test_nxos_bfd_global.py284
-rw-r--r--test/units/modules/network/nxos/test_nxos_bfd_interfaces.py303
-rw-r--r--test/units/modules/network/nxos/test_nxos_bgp.py134
-rw-r--r--test/units/modules/network/nxos/test_nxos_bgp_af.py103
-rw-r--r--test/units/modules/network/nxos/test_nxos_bgp_neighbor.py81
-rw-r--r--test/units/modules/network/nxos/test_nxos_bgp_neighbor_af.py108
-rw-r--r--test/units/modules/network/nxos/test_nxos_command.py106
-rw-r--r--test/units/modules/network/nxos/test_nxos_config.py224
-rw-r--r--test/units/modules/network/nxos/test_nxos_evpn_global.py69
-rw-r--r--test/units/modules/network/nxos/test_nxos_evpn_vni.py67
-rw-r--r--test/units/modules/network/nxos/test_nxos_feature.py77
-rw-r--r--test/units/modules/network/nxos/test_nxos_hsrp.py66
-rw-r--r--test/units/modules/network/nxos/test_nxos_hsrp_interfaces.py293
-rw-r--r--test/units/modules/network/nxos/test_nxos_interface.py91
-rw-r--r--test/units/modules/network/nxos/test_nxos_interface_ospf.py141
-rw-r--r--test/units/modules/network/nxos/test_nxos_interfaces.py461
-rw-r--r--test/units/modules/network/nxos/test_nxos_l3_interface.py226
-rw-r--r--test/units/modules/network/nxos/test_nxos_l3_interfaces.py580
-rw-r--r--test/units/modules/network/nxos/test_nxos_lldp_interfaces.py236
-rw-r--r--test/units/modules/network/nxos/test_nxos_nxapi.py74
-rw-r--r--test/units/modules/network/nxos/test_nxos_ospf.py56
-rw-r--r--test/units/modules/network/nxos/test_nxos_ospf_vrf.py128
-rw-r--r--test/units/modules/network/nxos/test_nxos_overlay_global.py51
-rw-r--r--test/units/modules/network/nxos/test_nxos_pim.py100
-rw-r--r--test/units/modules/network/nxos/test_nxos_pim_interface.py249
-rw-r--r--test/units/modules/network/nxos/test_nxos_pim_rp_address.py63
-rw-r--r--test/units/modules/network/nxos/test_nxos_static_route.py79
-rw-r--r--test/units/modules/network/nxos/test_nxos_system.py130
-rw-r--r--test/units/modules/network/nxos/test_nxos_telemetry.py1256
-rw-r--r--test/units/modules/network/nxos/test_nxos_vlan.py181
-rw-r--r--test/units/modules/network/nxos/test_nxos_vlans.py210
-rw-r--r--test/units/modules/network/nxos/test_nxos_vpc.py182
-rw-r--r--test/units/modules/network/nxos/test_nxos_vpc_interface.py69
-rw-r--r--test/units/modules/network/nxos/test_nxos_vrf.py79
-rw-r--r--test/units/modules/network/nxos/test_nxos_vrf_af.py791
-rw-r--r--test/units/modules/network/nxos/test_nxos_vxlan_vtep.py63
-rw-r--r--test/units/modules/network/nxos/test_nxos_vxlan_vtep_vni.py63
861 files changed, 0 insertions, 38007 deletions
diff --git a/test/integration/targets/nxos_aaa_server/defaults/main.yaml b/test/integration/targets/nxos_aaa_server/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_aaa_server/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_aaa_server/meta/main.yml b/test/integration/targets/nxos_aaa_server/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_aaa_server/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_aaa_server/tasks/cli.yaml b/test/integration/targets/nxos_aaa_server/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_aaa_server/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_aaa_server/tasks/main.yaml b/test/integration/targets/nxos_aaa_server/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_aaa_server/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_aaa_server/tasks/nxapi.yaml b/test/integration/targets/nxos_aaa_server/tasks/nxapi.yaml
deleted file mode 100644
index a37ed6d358..0000000000
--- a/test/integration/targets/nxos_aaa_server/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run \ No newline at end of file
diff --git a/test/integration/targets/nxos_aaa_server/tests/common/radius.yaml b/test/integration/targets/nxos_aaa_server/tests/common/radius.yaml
deleted file mode 100644
index da54b0847e..0000000000
--- a/test/integration/targets/nxos_aaa_server/tests/common/radius.yaml
+++ /dev/null
@@ -1,96 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_aaa_server radius.yaml sanity test"
-
-- name: "Setup"
- nxos_aaa_server: &remove
- server_type: radius
- deadtime: default
- server_timeout: default
- directed_request: default
- state: default
- ignore_errors: yes
-
-- block:
- - name: "Configure radius server defaults"
- nxos_aaa_server: &configure_default_radius
- server_type: radius
- state: present
- register: result
-
- - name: "Check Idempotence"
- nxos_aaa_server: *configure_default_radius
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: "Configure radius server non defaults"
- nxos_aaa_server: &configure_radius_non_default
- server_type: radius
- server_timeout: 9
- deadtime: 20
- directed_request: enabled
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Check Idempotence"
- nxos_aaa_server: *configure_radius_non_default
- register: result
-
- - assert: *false
-
- - name: "Remove radius server configuration"
- nxos_aaa_server: *remove
- register: result
-
- - assert: *true
-
- - name: "Configure radius server with global key"
- nxos_aaa_server: &configure_radius_global_key
- server_type: radius
- encrypt_type: 7
- global_key: test_key
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_aaa_server: *configure_radius_global_key
- register: result
-
- - assert: *false
-
- - name: "Remove radius server configuration"
- nxos_aaa_server: &rad_def
- server_type: radius
- deadtime: default
- server_timeout: default
- global_key: default
- directed_request: default
- state: default
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_aaa_server: *rad_def
- register: result
-
- - assert: *false
-
- rescue:
-
- - debug: msg="connection={{ ansible_connection }} nxos_aaa_server failure detected"
-
- always:
- - name: "Remove radius server configuration"
- nxos_aaa_server: *remove
- register: result
-
-- debug: msg="END connection={{ ansible_connection }} nxos_aaa_server radius.yaml sanity test"
diff --git a/test/integration/targets/nxos_aaa_server/tests/common/tacacs.yaml b/test/integration/targets/nxos_aaa_server/tests/common/tacacs.yaml
deleted file mode 100644
index 9b540fc385..0000000000
--- a/test/integration/targets/nxos_aaa_server/tests/common/tacacs.yaml
+++ /dev/null
@@ -1,107 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_aaa_server tacacs.yaml sanity test"
-
-- name: "Enable feature tacacs+"
- nxos_feature:
- feature: tacacs+
- state: enabled
-
-- name: "Setup"
- nxos_aaa_server: &remove
- server_type: tacacs
- deadtime: default
- server_timeout: default
- directed_request: default
- state: default
- ignore_errors: yes
-
-- block:
- - name: "Configure tacacs server defaults"
- nxos_aaa_server: &configure_default_tacacs
- server_type: tacacs
- state: present
- register: result
-
- - name: "Check Idempotence"
- nxos_aaa_server: *configure_default_tacacs
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: "Configure tacacs server non defaults"
- nxos_aaa_server: &configure_tacacs_non_default
- server_type: tacacs
- server_timeout: 9
- deadtime: 20
- directed_request: enabled
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Check Idempotence"
- nxos_aaa_server: *configure_tacacs_non_default
- register: result
-
- - assert: *false
-
- - name: "Remove tacacs server configuration"
- nxos_aaa_server: *remove
- register: result
-
- - assert: *true
-
- - name: "Configure tacacs server with global key"
- nxos_aaa_server: &configure_tacacs_global_key
- server_type: tacacs
- encrypt_type: 7
- global_key: test_key
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_aaa_server: *configure_tacacs_global_key
- register: result
-
- - assert: *false
-
- - name: "Remove tacacs server configuration"
- nxos_aaa_server: &tac_def
- server_type: tacacs
- deadtime: default
- server_timeout: default
- global_key: default
- directed_request: default
- state: default
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_aaa_server: *tac_def
- register: result
-
- - assert: *false
-
- rescue:
-
- - debug: msg="connection={{ ansible_connection }} nxos_aaa_server failure detected"
-
- always:
-
- - name: "Remove tacacs server configuration"
- nxos_aaa_server: *remove
- register: result
-
- - name: "Disable feature tacacs+"
- nxos_feature:
- feature: tacacs+
- state: disabled
-
-- debug: msg="END connection={{ ansible_connection }} nxos_aaa_server tacacs.yaml sanity test"
diff --git a/test/integration/targets/nxos_aaa_server_host/defaults/main.yaml b/test/integration/targets/nxos_aaa_server_host/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_aaa_server_host/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_aaa_server_host/meta/main.yml b/test/integration/targets/nxos_aaa_server_host/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_aaa_server_host/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_aaa_server_host/tasks/cli.yaml b/test/integration/targets/nxos_aaa_server_host/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_aaa_server_host/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_aaa_server_host/tasks/main.yaml b/test/integration/targets/nxos_aaa_server_host/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_aaa_server_host/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_aaa_server_host/tasks/nxapi.yaml b/test/integration/targets/nxos_aaa_server_host/tasks/nxapi.yaml
deleted file mode 100644
index a37ed6d358..0000000000
--- a/test/integration/targets/nxos_aaa_server_host/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run \ No newline at end of file
diff --git a/test/integration/targets/nxos_aaa_server_host/tests/common/radius.yaml b/test/integration/targets/nxos_aaa_server_host/tests/common/radius.yaml
deleted file mode 100644
index 53fa42a262..0000000000
--- a/test/integration/targets/nxos_aaa_server_host/tests/common/radius.yaml
+++ /dev/null
@@ -1,197 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_aaa_server_host radius.yaml sanity test"
-
-- name: "Setup"
- nxos_aaa_server_host: &remove
- server_type: radius
- address: 8.8.8.8
- state: absent
- ignore_errors: yes
-
-- block:
- - name: "Configure radius server defaults"
- nxos_aaa_server_host: &configure_default_radius
- server_type: radius
- address: 8.8.8.8
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Check Idempotence"
- nxos_aaa_server_host: *configure_default_radius
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: "Remove radius server configuration"
- nxos_aaa_server_host: *remove
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_aaa_server_host: *remove
- register: result
-
- - assert: *false
-
- - name: "Configure radius server non defaults"
- nxos_aaa_server_host: &configure_radius_non_default
- server_type: radius
- address: 8.8.8.8
- host_timeout: 25
- auth_port: 2083
- acct_port: 2084
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_aaa_server_host: *configure_radius_non_default
- register: result
-
- - assert: *false
-
- - name: "Configure some defaults on radius server"
- nxos_aaa_server_host: &configure_some_radius_default
- server_type: radius
- address: 8.8.8.8
- host_timeout: default
- auth_port: 1000
- acct_port: default
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_aaa_server_host: *configure_some_radius_default
- register: result
-
- - assert: *false
-
- - name: "Configure radius server with clear text pwd"
- nxos_aaa_server_host: &configure_radius_clear_text
- server_type: radius
- address: 8.8.8.8
- host_timeout: 25
- auth_port: default
- acct_port: 2084
- encrypt_type: 0
- key: hello
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check NOT Idempotent"
- nxos_aaa_server_host: *configure_radius_clear_text
- register: result
-
- - assert: *true
-
- - name: "Remove radius server configuration"
- nxos_aaa_server_host: *remove
- register: result
-
- - assert: *true
-
- - name: "Configure radius server with type 7 encryption"
- nxos_aaa_server_host: &configure_radius_type7
- server_type: radius
- address: 8.8.8.8
- host_timeout: 25
- auth_port: 2083
- acct_port: 2084
- encrypt_type: 7
- key: hello
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_aaa_server_host: *configure_radius_type7
- register: result
-
- - assert: *false
-
- - name: "Configure radius server with new type 7 encryption key"
- nxos_aaa_server_host: &configure_radius_new_type7
- server_type: radius
- address: 8.8.8.8
- host_timeout: 25
- auth_port: 2083
- acct_port: 2084
- encrypt_type: 7
- key: helloback
- state: present
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'key 7' in result.updates[0]"
-
- - name: "Check Idempotence"
- nxos_aaa_server_host: *configure_radius_new_type7
- register: result
-
- - assert: *false
-
- - name: "Configure radius server with default key"
- nxos_aaa_server_host: &configure_radius_defkey
- server_type: radius
- address: 8.8.8.8
- host_timeout: default
- auth_port: 1000
- acct_port: default
- encrypt_type: 7
- key: default
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_aaa_server_host: *configure_radius_defkey
- register: result
-
- - assert: *false
-
- - name: "Configure radius server with all def"
- nxos_aaa_server_host: &configure_radius_alldef
- server_type: radius
- address: 8.8.8.8
- host_timeout: default
- auth_port: default
- acct_port: default
- key: default
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_aaa_server_host: *configure_radius_alldef
- register: result
-
- - assert: *false
-
- rescue:
-
- - debug: msg="connection={{ ansible_connection }} nxos_aaa_server_host failure detected"
-
- always:
-
- - name: "Remove radius server configuration"
- nxos_aaa_server_host: *remove
- register: result
-
- - debug: msg="END connection={{ ansible_connection }} nxos_aaa_server_host radius.yaml sanity test"
diff --git a/test/integration/targets/nxos_aaa_server_host/tests/common/tacacs.yaml b/test/integration/targets/nxos_aaa_server_host/tests/common/tacacs.yaml
deleted file mode 100644
index 1e67197871..0000000000
--- a/test/integration/targets/nxos_aaa_server_host/tests/common/tacacs.yaml
+++ /dev/null
@@ -1,201 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_aaa_server_host tacacs.yaml sanity test"
-
-- name: "Enable feature tacacs+"
- nxos_feature:
- feature: tacacs+
- state: enabled
-
-- name: "Setup"
- nxos_aaa_server_host: &remove
- server_type: tacacs
- address: 8.8.8.8
- state: absent
- ignore_errors: yes
-
-- block:
-
- - name: "Configure tacacs server defaults"
- nxos_aaa_server_host: &configure_default_tacacs
- server_type: tacacs
- address: 8.8.8.8
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Check Idempotence"
- nxos_aaa_server_host: *configure_default_tacacs
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: "Remove tacacs server configuration"
- nxos_aaa_server_host: *remove
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_aaa_server_host: *remove
- register: result
-
- - assert: *false
-
- - name: "Configure tacacs server non defaults"
- nxos_aaa_server_host: &configure_tacacs_non_default
- server_type: tacacs
- address: 8.8.8.8
- host_timeout: 25
- tacacs_port: 89
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_aaa_server_host: *configure_tacacs_non_default
- register: result
-
- - assert: *false
-
- - name: "Configure some defaults on tacacs server"
- nxos_aaa_server_host: &configure_some_tacacs_default
- server_type: tacacs
- address: 8.8.8.8
- host_timeout: default
- tacacs_port: 100
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_aaa_server_host: *configure_some_tacacs_default
- register: result
-
- - assert: *false
-
- - name: "Configure tacacs server with clear text pwd"
- nxos_aaa_server_host: &configure_tacacs_clear_text
- server_type: tacacs
- address: 8.8.8.8
- host_timeout: 25
- tacacs_port: default
- encrypt_type: 0
- key: hello
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check NOT Idempotent"
- nxos_aaa_server_host: *configure_tacacs_clear_text
- register: result
-
- - assert: *true
-
- - name: "Remove tacacs server configuration"
- nxos_aaa_server_host: *remove
- register: result
-
- - assert: *true
-
- - name: "Configure tacacs server with type 7 encryption"
- nxos_aaa_server_host: &configure_tacacs_type7
- server_type: tacacs
- address: 8.8.8.8
- host_timeout: 25
- tacacs_port: 89
- encrypt_type: 7
- key: hello
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_aaa_server_host: *configure_tacacs_type7
- register: result
-
- - assert: *false
-
- - name: "Configure tacacs server with new type 7 encryption key"
- nxos_aaa_server_host: &configure_tacacs_new_type7
- server_type: tacacs
- address: 8.8.8.8
- host_timeout: 25
- tacacs_port: 89
- encrypt_type: 7
- key: helloback
- state: present
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'key 7' in result.updates[0]"
-
- - name: "Check Idempotence"
- nxos_aaa_server_host: *configure_tacacs_new_type7
- register: result
-
- - assert: *false
-
- - name: "Configure tacacs server with default key"
- nxos_aaa_server_host: &configure_tacacs_defkey
- server_type: tacacs
- address: 8.8.8.8
- host_timeout: default
- tacacs_port: 89
- encrypt_type: 7
- key: default
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_aaa_server_host: *configure_tacacs_defkey
- register: result
-
- - assert: *false
-
- - name: "Configure tacacs server with all def"
- nxos_aaa_server_host: &configure_tacacs_alldef
- server_type: tacacs
- address: 8.8.8.8
- host_timeout: default
- tacacs_port: default
- key: default
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_aaa_server_host: *configure_tacacs_alldef
- register: result
-
- - assert: *false
-
- rescue:
-
- - debug: msg="connection={{ ansible_connection }} nxos_aaa_server_host failure detected"
-
- always:
-
- - name: "Remove tacacs server configuration"
- nxos_aaa_server_host: *remove
- register: result
-
- - name: "Disable feature tacacs+"
- nxos_feature:
- feature: tacacs+
- state: disabled
-
- - debug: msg="END connection={{ ansible_connection }} nxos_aaa_server_host tacacs.yaml sanity test"
diff --git a/test/integration/targets/nxos_acl/defaults/main.yaml b/test/integration/targets/nxos_acl/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_acl/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_acl/meta/main.yml b/test/integration/targets/nxos_acl/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_acl/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_acl/tasks/cli.yaml b/test/integration/targets/nxos_acl/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_acl/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_acl/tasks/main.yaml b/test/integration/targets/nxos_acl/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_acl/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_acl/tasks/nxapi.yaml b/test/integration/targets/nxos_acl/tasks/nxapi.yaml
deleted file mode 100644
index a37ed6d358..0000000000
--- a/test/integration/targets/nxos_acl/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run \ No newline at end of file
diff --git a/test/integration/targets/nxos_acl/tests/common/sanity.yaml b/test/integration/targets/nxos_acl/tests/common/sanity.yaml
deleted file mode 100644
index 2313f5d1f5..0000000000
--- a/test/integration/targets/nxos_acl/tests/common/sanity.yaml
+++ /dev/null
@@ -1,230 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_acl sanity test"
-
-- set_fact: time_range="ans-range"
- when: platform is not search('N35|N5K|N6K')
-
-- name: "Setup: Cleanup possibly existing acl."
- nxos_acl: &remove
- name: TEST_ACL
- seq: 10
- state: delete_acl
- ignore_errors: yes
-
-- name: "Configure ACE10"
- nxos_acl: &conf10
- name: TEST_ACL
- seq: 10
- action: permit
- proto: tcp
- src: 192.0.2.1/24
- src_port_op: range
- src_port1: 1900
- src_port2: 1910
- ack: 'enable'
- dscp: 'af43'
- dest: any
- dest_port_op: neq
- dest_port1: 1899
- urg: 'enable'
- psh: 'enable'
- established: 'enable'
- log: 'enable'
- fin: 'enable'
- rst: 'enable'
- syn: 'enable'
- time_range: "{{time_range|default(omit)}}"
- state: present
- register: result
-
-- assert: &true
- that:
- - "result.changed == true"
-
-- name: "Check Idempotence"
- nxos_acl: *conf10
- register: result
-
-- assert: &false
- that:
- - "result.changed == false"
-
-- name: "Change ACE10"
- nxos_acl: &chg10
- name: TEST_ACL
- seq: 10
- action: deny
- proto: tcp
- src: 192.0.2.1/24
- src_port_op: range
- src_port1: 1900
- src_port2: 1910
- ack: 'enable'
- dscp: 'af43'
- dest: any
- dest_port_op: neq
- dest_port1: 1899
- urg: 'enable'
- psh: 'enable'
- established: 'enable'
- log: 'enable'
- fin: 'enable'
- rst: 'enable'
- syn: 'enable'
- time_range: "{{time_range|default(omit)}}"
- state: present
- register: result
-
-- assert: *true
-
-- name: "Check Idempotence"
- nxos_acl: *chg10
- register: result
-
-- assert: *false
-
-- name: "ace remark"
- nxos_acl: &remark
- name: TEST_ACL
- seq: 20
- action: remark
- remark: test_remark
- state: present
- register: result
-
-- assert: *true
-
-- name: "Check Idempotence"
- nxos_acl: *remark
- register: result
-
-- assert: *false
-
-- name: "change remark"
- nxos_acl: &chgremark
- name: TEST_ACL
- seq: 20
- action: remark
- remark: changed_remark
- state: present
- register: result
-
-- assert: *true
-
-- name: "Check Idempotence"
- nxos_acl: *chgremark
- register: result
-
-- assert: *false
-
-- name: "ace 30"
- nxos_acl: &ace30
- name: TEST_ACL
- seq: 30
- action: deny
- proto: 24
- src: any
- dest: any
- fragments: enable
- precedence: network
- state: present
- register: result
-
-- assert: *true
-
-- name: "Check Idempotence"
- nxos_acl: *ace30
- register: result
-
-- assert: *false
-
-- name: "change ace 30 options"
- nxos_acl: &chgace30opt
- name: TEST_ACL
- seq: 30
- action: deny
- proto: 24
- src: any
- dest: any
- precedence: network
- state: present
- register: result
-
-- assert: *true
-
-- name: "Check Idempotence"
- nxos_acl: *chgace30opt
- register: result
-
-- assert: *false
-
-- name: "ace 40"
- nxos_acl: &ace40
- name: TEST_ACL
- seq: 40
- action: permit
- proto: udp
- src: any
- src_port_op: neq
- src_port1: 1200
- dest: any
- precedence: network
- state: present
- register: result
-
-- assert: *true
-
-- name: "Check Idempotence"
- nxos_acl: *ace40
- register: result
-
-- assert: *false
-
-- name: "change ace 40"
- nxos_acl: &chgace40
- name: TEST_ACL
- seq: 40
- action: permit
- proto: udp
- src: any
- dest: any
- precedence: network
- state: present
- register: result
-
-- assert: *true
-
-- name: "Check Idempotence"
- nxos_acl: *chgace40
- register: result
-
-- assert: *false
-
-- name: "remove ace 30"
- nxos_acl: &remace30
- name: TEST_ACL
- seq: 30
- state: absent
- register: result
-
-- assert: *true
-
-- name: "Check Idempotence"
- nxos_acl: *remace30
- register: result
-
-- assert: *false
-
-- name: "Remove ACL"
- nxos_acl: *remove
- register: result
-
-- assert: *true
-
-- name: "Check Idempotence"
- nxos_acl: *remove
- register: result
-
-- assert: *false
-
-- debug: msg="END connection={{ ansible_connection }} nxos_acl sanity test"
diff --git a/test/integration/targets/nxos_acl_interface/defaults/main.yaml b/test/integration/targets/nxos_acl_interface/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_acl_interface/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_acl_interface/meta/main.yml b/test/integration/targets/nxos_acl_interface/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_acl_interface/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_acl_interface/tasks/cli.yaml b/test/integration/targets/nxos_acl_interface/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_acl_interface/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_acl_interface/tasks/main.yaml b/test/integration/targets/nxos_acl_interface/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_acl_interface/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_acl_interface/tasks/nxapi.yaml b/test/integration/targets/nxos_acl_interface/tasks/nxapi.yaml
deleted file mode 100644
index a37ed6d358..0000000000
--- a/test/integration/targets/nxos_acl_interface/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run \ No newline at end of file
diff --git a/test/integration/targets/nxos_acl_interface/tests/common/sanity.yaml b/test/integration/targets/nxos_acl_interface/tests/common/sanity.yaml
deleted file mode 100644
index dc76978c27..0000000000
--- a/test/integration/targets/nxos_acl_interface/tests/common/sanity.yaml
+++ /dev/null
@@ -1,120 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_acl_interface sanity test"
-
-# Select interface for test
-- set_fact: intname="{{ nxos_int1 }}"
-
-- name: "Interface selected for this test"
- debug: msg="{{ intname }}"
-
-- name: "Setup: Put interface into a default state"
- nxos_config: &default
- lines:
- - "default interface {{ intname }}"
- ignore_errors: yes
-
-- name: "Setup: Put interface into no switch port mode"
- nxos_config:
- commands:
- - "no switchport"
- parents:
- - "interface {{ intname }}"
- match: none
- ignore_errors: yes
-
-- name: "Setup: Cleanup possibly existing acl"
- nxos_acl: &remove
- name: ANSIBLE_ACL
- seq: 10
- state: delete_acl
- ignore_errors: yes
-
-- name: Configure Supporting ACL
- nxos_acl:
- name: ANSIBLE_ACL
- seq: 10
- action: permit
- proto: tcp
- src: 192.0.2.1/24
- dest: any
-
-- block:
- - name: Configure acl interface egress
- nxos_acl_interface: &configure_egr
- name: ANSIBLE_ACL
- interface: "{{ intname }}"
- direction: egress
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Check Idempotence egress"
- nxos_acl_interface: *configure_egr
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: Configure acl interface ingress
- nxos_acl_interface: &configure_ingr
- name: ANSIBLE_ACL
- interface: "{{ intname }}"
- direction: ingress
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence ingress"
- nxos_acl_interface: *configure_ingr
- register: result
-
- - assert: *false
-
- - name: Cleanup acl interface egress
- nxos_acl_interface: &cleanup_egr
- name: ANSIBLE_ACL
- interface: "{{ intname }}"
- direction: egress
- state: absent
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence egress cleanup"
- nxos_acl_interface: *cleanup_egr
- register: result
-
- - assert: *false
-
- - name: Cleanup acl interface ingress
- nxos_acl_interface: &cleanup_ingr
- name: ANSIBLE_ACL
- interface: "{{ intname }}"
- direction: ingress
- state: absent
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence ingress cleanup"
- nxos_acl_interface: *cleanup_ingr
- register: result
-
- - assert: *false
-
- rescue:
- - name: Put test interface into default state.
- nxos_config: *default
- ignore_errors: yes
-
- always:
- - name: Remove possible configured ACL
- nxos_acl: *remove
- ignore_errors: yes
-
- - debug: msg="END connection={{ ansible_connection }} nxos_acl_interface sanity test"
diff --git a/test/integration/targets/nxos_acl_interfaces/defaults/main.yaml b/test/integration/targets/nxos_acl_interfaces/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_acl_interfaces/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_acl_interfaces/meta/main.yml b/test/integration/targets/nxos_acl_interfaces/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_acl_interfaces/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_acl_interfaces/tasks/cli.yaml b/test/integration/targets/nxos_acl_interfaces/tasks/cli.yaml
deleted file mode 100644
index f1c20c1b78..0000000000
--- a/test/integration/targets/nxos_acl_interfaces/tasks/cli.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yml"
- connection: local
- register: test_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_acl_interfaces/tasks/main.yaml b/test/integration/targets/nxos_acl_interfaces/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/nxos_acl_interfaces/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/nxos_acl_interfaces/tests/cli/deleted.yml b/test/integration/targets/nxos_acl_interfaces/tests/cli/deleted.yml
deleted file mode 100644
index b935df541e..0000000000
--- a/test/integration/targets/nxos_acl_interfaces/tests/cli/deleted.yml
+++ /dev/null
@@ -1,90 +0,0 @@
----
-- debug:
- msg: "Start nxos_acl_interfaces deleted integration tests connection = {{ansible_connection}}"
-
-- include_tasks: populate_config.yaml
-
-- block:
- - name: Delete single ACL from an interface
- nxos_acl_interfaces:
- config:
- - name: Ethernet1/5
- access_groups:
- - afi: ipv6
- acls:
- - name: ACL1v6
- direction: in
- state: deleted
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'interface Ethernet1/5' in result.commands"
- - "'no ipv6 traffic-filter ACL1v6 in' in result.commands"
- - "result.commands | length ==2"
-
- - name: Delete all ACLs of given AFI from an interface
- nxos_acl_interfaces:
- config:
- - name: Ethernet1/5
- access_groups:
- - afi: ipv4
- state: deleted
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'interface Ethernet1/5' in result.commands"
- - "'no ip port access-group PortACL in' in result.commands"
- - "'no ip access-group ACL1v4 out' in result.commands"
- - "result.commands | length ==3"
-
- - name: Delete all ACLs configuration from given interface
- nxos_acl_interfaces: &deleted
- config:
- - name: Ethernet1/2
- state: deleted
- register: result
-
- - assert:
- that:
- - "result.changed == True"
- - "'interface Ethernet1/2' in result.commands"
- - "'no ipv6 traffic-filter ACL1v6 in' in result.commands"
- - "result.commands | length == 2"
-
- - include_tasks: populate_config.yaml
-
- - name: Delete all ACLs from all interfaces (from all interfaces)
- nxos_acl_interfaces:
- config:
- state: deleted
- register: result
-
- - name: Gather acl interfaces facts
- nxos_facts: &facts
- gather_subset:
- - "!all"
- - "!min"
- gather_network_resources: acl_interfaces
-
- - assert:
- that:
- - "result.changed == True"
- - "ansible_facts.network_resources.acl_interfaces == result.after"
-
- - name: Gather acls facts
- nxos_facts: *facts
-
- - name: Idempotence - deleted
- nxos_acl_interfaces: *deleted
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- always:
- - include_tasks: remove_config.yaml
diff --git a/test/integration/targets/nxos_acl_interfaces/tests/cli/gathered.yml b/test/integration/targets/nxos_acl_interfaces/tests/cli/gathered.yml
deleted file mode 100644
index b3ae8b36c8..0000000000
--- a/test/integration/targets/nxos_acl_interfaces/tests/cli/gathered.yml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-- debug:
- msg: Start nxos_acl_interfaces gathered integration tests connection={{ansible_connection}}"
-
-- include_tasks: populate_config.yaml
-
-- block:
- - name: Gather acl interfaces facts
- nxos_facts: &facts
- gather_subset:
- - "!all"
- - "!min"
- gather_network_resources: acl_interfaces
-
- - name: Gathered
- nxos_acl_interfaces: &gathered
- state: gathered
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "ansible_facts.network_resources.acl_interfaces == result.gathered"
-
- - name: Idempotence - Gathered
- nxos_acl_interfaces: *gathered
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- always:
- - include_tasks: remove_config.yaml
diff --git a/test/integration/targets/nxos_acl_interfaces/tests/cli/merged.yml b/test/integration/targets/nxos_acl_interfaces/tests/cli/merged.yml
deleted file mode 100644
index b468e47d7c..0000000000
--- a/test/integration/targets/nxos_acl_interfaces/tests/cli/merged.yml
+++ /dev/null
@@ -1,63 +0,0 @@
----
-- debug:
- msg: "Start nxos_acl_interfaces merged integration tests connection = {{ansible_connection}}"
-
-- include_tasks: populate_acl.yaml
-
-- block:
- - name: Gather acl interfaces facts
- nxos_facts:
- gather_subset:
- - "!all"
- - "!min"
- gather_network_resources: acl_interfaces
-
- - name: Merged
- nxos_acl_interfaces: &merged
- config:
- - name: Ethernet1/2
- access_groups:
- - afi: ipv6
- acls:
- - name: ACL1v6
- direction: in
-
- - name: Eth1/5
- access_groups:
- - afi: ipv4
- acls:
- - name: PortACL
- direction: in
- port: True
-
- - name: ACL1v4
- direction: out
-
- - afi: ipv6
- acls:
- - name: ACL1v6
- direction: in
- state: merged
- register: result
-
- - assert:
- that:
- - "result.changed == True"
- - "'interface Ethernet1/2' in result.commands"
- - "'ipv6 traffic-filter ACL1v6 in' in result.commands"
- - "'interface Ethernet1/5' in result.commands"
- - "'ip port access-group PortACL in' in result.commands"
- - "'ip access-group ACL1v4 out' in result.commands"
- - "'ipv6 traffic-filter ACL1v6 in' in result.commands"
- - "result.commands | length == 6 "
-
- - name: Idempotence - Merged
- nxos_acl_interfaces: *merged
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- always:
- - include_tasks: remove_config.yaml
diff --git a/test/integration/targets/nxos_acl_interfaces/tests/cli/overridden.yml b/test/integration/targets/nxos_acl_interfaces/tests/cli/overridden.yml
deleted file mode 100644
index d990c2a098..0000000000
--- a/test/integration/targets/nxos_acl_interfaces/tests/cli/overridden.yml
+++ /dev/null
@@ -1,68 +0,0 @@
----
-- debug:
- msg: "Start nxos_acl_interfaces overridden integration tests connection = {{ansible_connection}}"
-
-- include_tasks: populate_config.yaml
-
-- block:
- - name: Overridden
- nxos_acl_interfaces: &overridden
- config:
- - name: Ethernet1/3
- access_groups:
- - afi: ipv4
- acls:
- - name: ACL1v4
- direction: out
-
- - name: PortACL
- port: true
- direction: in
-
- - afi: ipv6
- acls:
- - name: NewACLv6
- direction: in
- port: true
- state: overridden
- register: result
-
- - assert:
- that:
- - "result.changed == True"
- - "'interface Ethernet1/2' in result.commands"
- - "'no ipv6 traffic-filter ACL1v6 in' in result.commands"
- - "'interface Ethernet1/5' in result.commands"
- - "'no ip access-group ACL1v4 out' in result.commands"
- - "'no ip port access-group PortACL in' in result.commands"
- - "'no ipv6 traffic-filter ACL1v6 in' in result.commands"
- - "'interface Ethernet1/3' in result.commands"
- - "'ip access-group ACL1v4 out' in result.commands"
- - "'ip port access-group PortACL in' in result.commands"
- - "'ipv6 port traffic-filter NewACLv6 in' in result.commands"
- - "result.commands | length == 10"
-
- - name: Gather acl_interfaces post facts
- nxos_facts: &facts
- gather_subset:
- - "!all"
- - "!min"
- gather_network_resources: acl_interfaces
-
- - name: Gather acls post facts
- nxos_facts: *facts
-
- - assert:
- that:
- - "ansible_facts.network_resources.acl_interfaces == result.after"
-
- - name: Idempotence - overridden
- nxos_acl_interfaces: *overridden
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- always:
- - include_tasks: remove_config.yaml
diff --git a/test/integration/targets/nxos_acl_interfaces/tests/cli/parsed.yml b/test/integration/targets/nxos_acl_interfaces/tests/cli/parsed.yml
deleted file mode 100644
index a54fc83ab0..0000000000
--- a/test/integration/targets/nxos_acl_interfaces/tests/cli/parsed.yml
+++ /dev/null
@@ -1,40 +0,0 @@
----
-- debug:
- msg: Start nxos_acl_interfaces parsed integration tests connection={{ansible_connection}}"
-
-- include_tasks: populate_config.yaml
-
-- block:
- - name: Gather acl interfaces facts
- nxos_facts: &facts
- gather_subset:
- - "!all"
- - "!min"
- gather_network_resources: acl_interfaces
-
- - name: Parsed
- nxos_acl_interfaces: &parsed
- running_config: |
- interface Ethernet1/2
- ipv6 traffic-filter ACL1v6 in
- interface Ethernet1/5
- ipv6 traffic-filter ACL1v6 in
- ip access-group ACL1v4 out
- ip port access-group PortACL in
- state: parsed
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.parsed == parsed"
-
- - name: Idempotence - Parsed
- nxos_acl_interfaces: *parsed
- register: result
-
- - assert:
- that: "result.changed == false"
-
- always:
- - include_tasks: remove_config.yaml
diff --git a/test/integration/targets/nxos_acl_interfaces/tests/cli/populate_acl.yaml b/test/integration/targets/nxos_acl_interfaces/tests/cli/populate_acl.yaml
deleted file mode 100644
index 157781558b..0000000000
--- a/test/integration/targets/nxos_acl_interfaces/tests/cli/populate_acl.yaml
+++ /dev/null
@@ -1,9 +0,0 @@
----
-- name: Adding base configuration
- cli_config:
- config: |
- ip access-list ACL1v4
- ip access-list NewACLv4
- ipv6 access-list ACL1v6
- ipv6 access-list NewACLv6
- ip access-list PortACL
diff --git a/test/integration/targets/nxos_acl_interfaces/tests/cli/populate_config.yaml b/test/integration/targets/nxos_acl_interfaces/tests/cli/populate_config.yaml
deleted file mode 100644
index 9ce0295eeb..0000000000
--- a/test/integration/targets/nxos_acl_interfaces/tests/cli/populate_config.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
----
-- name: Adding base configuration
- cli_config:
- config: |
- ip access-list ACL1v4
- ip access-list NewACLv4
- ipv6 access-list ACL1v6
- ipv6 access-list NewACLv6
- ip access-list PortACL
- interface Ethernet1/2
- ipv6 traffic-filter ACL1v6 in
- interface Ethernet1/5
- ip port access-group PortACL in
- ip access-group ACL1v4 out
- ipv6 traffic-filter ACL1v6 in
diff --git a/test/integration/targets/nxos_acl_interfaces/tests/cli/remove_config.yaml b/test/integration/targets/nxos_acl_interfaces/tests/cli/remove_config.yaml
deleted file mode 100644
index d0a9f9f9bb..0000000000
--- a/test/integration/targets/nxos_acl_interfaces/tests/cli/remove_config.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-- name: Remove config
- cli_config:
- config: |
- no ip access-list ACL1v4
- no ip access-list NewACLv4
- no ip access-list PortACL
- no ipv6 access-list ACL1v6
- no ipv6 access-list ACL1v6
- interface Ethernet1/2
- no ipv6 traffic-filter ACL1v6 in
- interface Ethernet1/5
- no ip access-group ACL1v4 out
- no ip port access-group PortACL in
- no ipv6 traffic-filter ACL1v6 in
- interface Ethernet1/3
- no ipv6 port traffic-filter NewACLv6 in
- no ip access-group ACL1v4 out
- no ip port access-group PortACL in
- interface Ethernet1/4
- no ip access-group NewACLv4 out
diff --git a/test/integration/targets/nxos_acl_interfaces/tests/cli/rendered.yml b/test/integration/targets/nxos_acl_interfaces/tests/cli/rendered.yml
deleted file mode 100644
index 125cc60192..0000000000
--- a/test/integration/targets/nxos_acl_interfaces/tests/cli/rendered.yml
+++ /dev/null
@@ -1,48 +0,0 @@
----
-- debug:
- msg: "Start nxos_acl_interfaces rendered tests connection={{ ansible_connection }}"
-
-- name: Rendered
- nxos_acl_interfaces: &rendered
- config:
- - name: Ethernet1/2
- access_groups:
- - afi: ipv6
- acls:
- - name: ACL1v6
- direction: in
-
- - name: Ethernet1/5
- access_groups:
- - afi: ipv4
- acls:
- - name: PortACL
- direction: in
- port: True
- - name: ACL1v4
- direction: out
- - afi: ipv6
- acls:
- - name: ACL1v6
- direction: in
- state: rendered
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "'interface Ethernet1/2' in result.rendered"
- - "'ipv6 traffic-filter ACL1v6 in' in result.rendered"
- - "'interface Ethernet1/5' in result.rendered"
- - "'ipv6 traffic-filter ACL1v6 in' in result.rendered"
- - "'ip access-group ACL1v4 out' in result.rendered"
- - "'ip port access-group PortACL in' in result.rendered"
- - "result.rendered | length == 6"
-
-- name: Idempotence - Rendered
- nxos_acl_interfaces: *rendered
- register: result
-
-- assert:
- that:
- - "result.changed == false"
diff --git a/test/integration/targets/nxos_acl_interfaces/tests/cli/replaced.yml b/test/integration/targets/nxos_acl_interfaces/tests/cli/replaced.yml
deleted file mode 100644
index b2844e119d..0000000000
--- a/test/integration/targets/nxos_acl_interfaces/tests/cli/replaced.yml
+++ /dev/null
@@ -1,60 +0,0 @@
----
-- debug:
- msg: "Start nxos_acl_interfaces replaced integration tests connection = {{ansible_connection}}"
-
-- include_tasks: populate_config.yaml
-
-- block:
- - name: Replaced
- nxos_acl_interfaces: &replaced
- config:
- - name: Eth1/5
- access_groups:
- - afi: ipv4
- acls:
- - name: NewACLv4
- direction: out
-
- - name: Ethernet1/3
- access_groups:
- - afi: ipv6
- acls:
- - name: NewACLv6
- direction: in
- port: true
- state: replaced
- register: result
-
- - assert:
- that:
- - "result.changed==True"
- - "'interface Ethernet1/5' in result.commands"
- - "'no ip access-group ACL1v4 out' in result.commands"
- - "'no ip port access-group PortACL in' in result.commands"
- - "'no ipv6 traffic-filter ACL1v6 in' in result.commands"
- - "'ip access-group NewACLv4 out' in result.commands"
- - "'interface Ethernet1/3' in result.commands"
- - "'ipv6 port traffic-filter NewACLv6 in' in result.commands"
- - "result.commands|length==7"
-
- - name: Gather acl_interfaces post facts
- nxos_facts:
- gather_subset:
- - "!all"
- - "!min"
- gather_network_resources: acl_interfaces
-
- - assert:
- that:
- - "ansible_facts.network_resources.acl_interfaces == result.after"
-
- - name: Idempotence - Replaced
- nxos_acl_interfaces: *replaced
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- always:
- - include_tasks: remove_config.yaml
diff --git a/test/integration/targets/nxos_acl_interfaces/tests/cli/rtt.yml b/test/integration/targets/nxos_acl_interfaces/tests/cli/rtt.yml
deleted file mode 100644
index 0cd7a1c236..0000000000
--- a/test/integration/targets/nxos_acl_interfaces/tests/cli/rtt.yml
+++ /dev/null
@@ -1,99 +0,0 @@
----
-- debug:
- msg: "Start nxos_acl_interfaces round trip integration tests connection = {{ansible_connection}}"
-
-- include_tasks: populate_config.yaml
-
-- block:
- - name: RTT- Apply provided configuration
- nxos_acl_interfaces:
- config:
- - name: Ethernet1/2
- access_groups:
- - afi: ipv6
- acls:
- - name: ACL1v6
- direction: in
-
- - name: Eth1/5
- access_groups:
- - afi: ipv4
- acls:
- - name: PortACL
- direction: in
- port: True
-
- - name: ACL1v4
- direction: out
-
- - afi: ipv6
- acls:
- - name: ACL1v6
- direction: in
- state: merged
-
- - name: Gather interfaces facts
- nxos_facts:
- gather_subset:
- - "!all"
- - "!min"
- gather_network_resources:
- - acl_interfaces
-
- - name: Apply configuration to be reverted
- nxos_acl_interfaces:
- config:
- - name: Eth1/4
- access_groups:
- - afi: ipv4
- acls:
- - name: NewACLv4
- direction: out
-
- - name: Ethernet1/3
- access_groups:
- - afi: ipv6
- acls:
- - name: NewACLv6
- direction: in
- port: true
- state: overridden
- register: result
-
- - name: Assert that changes were applied
- assert:
- that:
- - "result.changed==True"
- - "'interface Ethernet1/2' in result.commands"
- - "'no ipv6 traffic-filter ACL1v6 in' in result.commands"
- - "'interface Ethernet1/5' in result.commands"
- - "'no ip access-group ACL1v4 out' in result.commands"
- - "'no ip port access-group PortACL in' in result.commands"
- - "'no ipv6 traffic-filter ACL1v6 in' in result.commands"
- - "'interface Ethernet1/4' in result.commands"
- - "'ip access-group NewACLv4 out' in result.commands"
- - "'interface Ethernet1/3' in result.commands"
- - "'ipv6 port traffic-filter NewACLv6 in' in result.commands"
-
- - name: Revert back to base configuration using facts round trip
- nxos_acl_interfaces:
- config: "{{ ansible_facts['network_resources']['acl_interfaces'] }}"
- state: overridden
- register: result
-
- - name: Assert that config was reverted
- assert:
- that:
- - "result.changed==True"
- - "'interface Ethernet1/2' in result.commands"
- - "'ipv6 traffic-filter ACL1v6 in' in result.commands"
- - "'interface Ethernet1/3' in result.commands"
- - "'no ipv6 port traffic-filter NewACLv6 in' in result.commands"
- - "'interface Ethernet1/4' in result.commands"
- - "'no ip access-group NewACLv4 out' in result.commands"
- - "'interface Ethernet1/5' in result.commands"
- - "'ip access-group ACL1v4 out' in result.commands"
- - "'ip port access-group PortACL in' in result.commands"
- - "'ipv6 traffic-filter ACL1v6 in' in result.commands"
- always:
- - include_tasks: remove_config.yaml
diff --git a/test/integration/targets/nxos_acl_interfaces/vars/main.yml b/test/integration/targets/nxos_acl_interfaces/vars/main.yml
deleted file mode 100644
index 0d9ed68e9f..0000000000
--- a/test/integration/targets/nxos_acl_interfaces/vars/main.yml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-parsed:
- - access_groups:
- - acls:
- - direction: in
- name: ACL1v6
- afi: ipv6
- name: Ethernet1/2
- - access_groups:
- - acls:
- - direction: out
- name: ACL1v4
- - direction: in
- name: PortACL
- port: true
- afi: ipv4
- - acls:
- - direction: in
- name: ACL1v6
- afi: ipv6
- name: Ethernet1/5 \ No newline at end of file
diff --git a/test/integration/targets/nxos_acls/defaults/main.yaml b/test/integration/targets/nxos_acls/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_acls/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_acls/meta/main.yml b/test/integration/targets/nxos_acls/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_acls/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_acls/tasks/cli.yaml b/test/integration/targets/nxos_acls/tasks/cli.yaml
deleted file mode 100644
index f1c20c1b78..0000000000
--- a/test/integration/targets/nxos_acls/tasks/cli.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yml"
- connection: local
- register: test_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_acls/tasks/main.yaml b/test/integration/targets/nxos_acls/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/nxos_acls/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/nxos_acls/tests/cli/deleted.yml b/test/integration/targets/nxos_acls/tests/cli/deleted.yml
deleted file mode 100644
index d85b125034..0000000000
--- a/test/integration/targets/nxos_acls/tests/cli/deleted.yml
+++ /dev/null
@@ -1,69 +0,0 @@
----
-- debug:
- msg: Start nxos_acls deleted integration tests connection={{ansible_connection}}"
-
-- include_tasks: populate_config.yaml
-
-- block:
- - name: Deleted (All ACLs)
- nxos_acls:
- config:
- state: deleted
-
- - name: Gather acls facts
- nxos_facts: &facts
- gather_subset:
- - "!all"
- - "!min"
- gather_network_resources: acls
-
- - assert:
- that:
- - "ansible_facts.network_resources == {}"
-
- - include_tasks: populate_config.yaml
-
- - name: Deleted
- nxos_acls: &deleted
- config:
- - afi: ipv4
-
- - afi: ipv6
- acls:
- - name: ACL1v6
- aces:
- - grant: permit
- sequence: 10
- source:
- any: true
- destination:
- any: true
- protocol: sctp
-
- - sequence: 20
- state: deleted
- register: result
-
- - assert:
- that:
- - "result.changed==True"
- - "'no ip access-list ACL1v4' in result.commands"
- - "'no ip access-list ACL2v4' in result.commands"
- - "'ipv6 access-list ACL1v6' in result.commands"
- - "'no 10 permit sctp any any' in result.commands"
- - "'no 20' in result.commands"
- - "result.commands | length == 5"
-
- - name: Gather acls facts
- nxos_facts: *facts
-
- - name: Idempotence - deleted
- nxos_acls: *deleted
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- always:
- - include_tasks: remove_config.yaml
diff --git a/test/integration/targets/nxos_acls/tests/cli/gathered.yml b/test/integration/targets/nxos_acls/tests/cli/gathered.yml
deleted file mode 100644
index c2ff83c9c5..0000000000
--- a/test/integration/targets/nxos_acls/tests/cli/gathered.yml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-- debug:
- msg: Start nxos_acls gathered integration tests connection={{ansible_connection}}"
-
-- include_tasks: populate_config.yaml
-
-- block:
- - name: Gather acls facts
- nxos_facts: &facts
- gather_subset:
- - "!all"
- - "!min"
- gather_network_resources: acls
-
- - name: Gathered
- nxos_acls: &gathered
- state: gathered
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "ansible_facts.network_resources.acls == result.gathered"
-
- - name: Idempotence - Gathered
- nxos_acls: *gathered
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- always:
- - include_tasks: remove_config.yaml
diff --git a/test/integration/targets/nxos_acls/tests/cli/merged.yml b/test/integration/targets/nxos_acls/tests/cli/merged.yml
deleted file mode 100644
index b22b568adf..0000000000
--- a/test/integration/targets/nxos_acls/tests/cli/merged.yml
+++ /dev/null
@@ -1,108 +0,0 @@
----
-- debug:
- msg: Start nxos_acls merged integration tests connection={{ansible_connection}}"
-
-- include_tasks: remove_config.yaml
-
-- block:
- - name: Merged
- nxos_acls: &merged
- config:
- - afi: ipv4
- acls:
- - name: ACL1v4
- aces:
- - grant: deny
- destination:
- address: 192.0.2.64
- wildcard_bits: 0.0.0.255
- source:
- any: true
- port_protocol:
- lt: 25
- protocol: tcp
- protocol_options:
- tcp:
- ack: true
- fin: true
- sequence: 50
- - grant: permit
- protocol: ip
- source:
- any: true
- destination:
- any: true
- fragments: true
- log: true
- sequence: 20
-
- - afi: ipv6
- acls:
- - name: ACL1v6
- aces:
- - grant: permit
- sequence: 10
- source:
- any: true
- destination:
- host: 2001:db8:12::128
- protocol: sctp
- state: merged
- register: result
-
- - assert:
- that:
- - "result.changed == True"
- - "'ip access-list ACL1v4' in result.commands"
- - "'20 permit ip any any fragments log' in result.commands"
- - "'50 deny tcp any lt smtp 192.0.2.64 0.0.0.255 ack fin' in result.commands"
- - "'ipv6 access-list ACL1v6' in result.commands"
- - "'10 permit sctp any host 2001:db8:12::128' in result.commands"
- - "result.commands | length == 5 "
-
- - name: Gather acls facts
- nxos_facts:
- gather_subset:
- - "!all"
- - "!min"
- gather_network_resources: acls
-
- - assert:
- that:
- - "ansible_facts.network_resources.acls == result.after"
-
- - name: Idempotence - Merged
- nxos_acls: *merged
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- - name: Update one parameter of an ACE
- nxos_acls:
- config:
- - afi: ipv4
- acls:
- - name: ACL1v4
- aces:
- - grant: permit
- protocol: tcp
- source:
- any: true
- destination:
- any: true
- sequence: 20
- precedence: 5
- state: merged
- register: result
-
- - assert:
- that:
- - "result.changed == True"
- - "'ip access-list ACL1v4' in result.commands"
- - "'no 20' in result.commands"
- - "'20 permit tcp any any fragments precedence critical log' in result.commands"
-
- always:
- - include_tasks: remove_config.yaml
diff --git a/test/integration/targets/nxos_acls/tests/cli/overridden.yml b/test/integration/targets/nxos_acls/tests/cli/overridden.yml
deleted file mode 100644
index 27cca65d8b..0000000000
--- a/test/integration/targets/nxos_acls/tests/cli/overridden.yml
+++ /dev/null
@@ -1,99 +0,0 @@
----
-- debug:
- msg: Start nxos_acls overridden integration tests connection={{ansible_connection}}"
-
-- include_tasks: populate_config.yaml
-
-- block:
- - name: Overridden (first test)
- nxos_acls:
- config:
- - afi: ipv4
- acls:
- - name: NewACL
- aces:
- - grant: deny
- source:
- address: 192.0.2.0
- wildcard_bits: 0.0.255.255
- destination:
- any: true
- protocol: eigrp
- - remark: Example for overridden state
- state: overridden
- register: result
-
- - assert:
- that:
- - "result.changed==True"
- - "'no ip access-list ACL1v4' in result.commands"
- - "'no ip access-list ACL2v4' in result.commands"
- - "'no ipv6 access-list ACL1v6' in result.commands"
- - "'no ipv6 access-list ACL2v6' in result.commands"
- - "'ip access-list NewACL' in result.commands"
- - "'deny eigrp 192.0.2.0 0.0.255.255 any' in result.commands"
- - "'remark Example for overridden state' in result.commands"
- - "result.commands|length==7"
-
- - name: Gather acls post facts
- nxos_facts: &facts
- gather_subset:
- - "!all"
- - "!min"
- gather_network_resources: acls
-
- - assert:
- that:
- - "ansible_facts.network_resources.acls == result.after"
-
- - include_tasks: populate_config.yaml
-
- - name: Overridden (second test)
- nxos_acls: &overridden
- config:
- - afi: ipv6
- acls:
- - name: ACL1v6
- aces:
- - grant: deny
- protocol: udp
- destination:
- any: true
- source:
- host: 2001:db8:3431::12
- port_protocol:
- lt: 35
- sequence: 10
- state: overridden
- register: result
-
- - assert:
- that:
- - "result.changed==True"
- - "'no ip access-list ACL1v4' in result.commands"
- - "'no ip access-list ACL2v4' in result.commands"
- - "'no ipv6 access-list ACL2v6' in result.commands"
- - "'no ip access-list NewACL' in result.commands"
- - "'ipv6 access-list ACL1v6' in result.commands"
- - "'no 10 permit sctp any any' in result.commands"
- - "'no 20 remark IPv6 ACL' in result.commands"
- - "'10 deny udp host 2001:db8:3431::12 lt 35 any' in result.commands"
- - "result.commands|length==8"
-
- - name: Gather acls post facts
- nxos_facts: *facts
-
- - assert:
- that:
- - "ansible_facts.network_resources.acls == result.after"
-
- - name: Idempotence - overridden
- nxos_acls: *overridden
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- always:
- - include_tasks: remove_config.yaml
diff --git a/test/integration/targets/nxos_acls/tests/cli/parsed.yml b/test/integration/targets/nxos_acls/tests/cli/parsed.yml
deleted file mode 100644
index 8a2efd5270..0000000000
--- a/test/integration/targets/nxos_acls/tests/cli/parsed.yml
+++ /dev/null
@@ -1,45 +0,0 @@
----
-- debug:
- msg: Start nxos_acls gathered integration tests connection={{ansible_connection}}"
-
-- include_tasks: populate_config.yaml
-
-- block:
- - name: Gather acls facts
- nxos_facts: &facts
- gather_subset:
- - "!all"
- - "!min"
- gather_network_resources: acls
-
- - name: Parsed
- nxos_acls: &parsed
- running_config: |
- ip access-list ACL1v4
- 10 permit ip any any
- 20 deny udp any any
- ip access-list ACL2v4
- 10 permit ahp 192.0.2.0 0.0.0.255 any
- ipv6 access-list ACL1v6
- 10 permit sctp any any
- 20 remark IPv6 ACL
- ipv6 access-list ACL2v6
- 10 deny ipv6 any 2001:db8:3000::36/128
- 20 permit tcp 2001:db8:2000:2::2/128 2001:db8:2000:ab::2/128
- state: parsed
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "ansible_facts.network_resources.acls == result.parsed"
-
- - name: Idempotence - Parsed
- nxos_acls: *parsed
- register: result
-
- - assert:
- that: "result.changed == false"
-
- always:
- - include_tasks: remove_config.yaml
diff --git a/test/integration/targets/nxos_acls/tests/cli/populate_config.yaml b/test/integration/targets/nxos_acls/tests/cli/populate_config.yaml
deleted file mode 100644
index 81b72e11c0..0000000000
--- a/test/integration/targets/nxos_acls/tests/cli/populate_config.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
----
-- name: Add configuration
- cli_config:
- config: |
- ip access-list ACL1v4
- 10 permit ip any any
- 20 deny udp any any
- ip access-list ACL2v4
- 10 permit ahp 192.0.2.0 0.0.0.255 any
- ipv6 access-list ACL1v6
- 10 permit sctp any any
- 20 remark IPv6 ACL
- ipv6 access-list ACL2v6
- 10 deny ipv6 any host 2001:db8:3000::36
- 20 permit tcp host 2001:db8:2000:2::2 host 2001:db8:2000:ab::2
diff --git a/test/integration/targets/nxos_acls/tests/cli/remove_config.yaml b/test/integration/targets/nxos_acls/tests/cli/remove_config.yaml
deleted file mode 100644
index a6f3320051..0000000000
--- a/test/integration/targets/nxos_acls/tests/cli/remove_config.yaml
+++ /dev/null
@@ -1,9 +0,0 @@
----
-- name: Remove config
- cli_config:
- config: |
- no ip access-list ACL1v4
- no ip access-list ACL2v4
- no ipv6 access-list ACL1v6
- no ipv6 access-list ACL2v6
- no ip access-list NewACL
diff --git a/test/integration/targets/nxos_acls/tests/cli/rendered.yml b/test/integration/targets/nxos_acls/tests/cli/rendered.yml
deleted file mode 100644
index 5419a7086b..0000000000
--- a/test/integration/targets/nxos_acls/tests/cli/rendered.yml
+++ /dev/null
@@ -1,56 +0,0 @@
----
-- debug:
- msg: "Start nxos_acls rendered tests connection={{ ansible_connection }}"
-
-- name: Rendered
- nxos_acls: &rendered
- config:
- - afi: ipv4
- acls:
- - name: ACL1v4
- aces:
- - grant: deny
- destination:
- address: 192.0.2.64
- wildcard_bits: 0.0.0.255
- source:
- any: true
- port_protocol:
- eq: 43
- protocol: tcp
- protocol_options:
- tcp:
- ack: true
- fin: true
- sequence: 50
-
- - afi: ipv6
- acls:
- - name: ACL1v6
- aces:
- - grant: permit
- sequence: 10
- source:
- any: true
- destination:
- prefix: 2001:db8:12::/32
- protocol: sctp
- state: rendered
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "'ip access-list ACL1v4' in result.rendered"
- - "'50 deny tcp any eq whois 192.0.2.64 0.0.0.255 ack fin' in result.rendered"
- - "'ipv6 access-list ACL1v6' in result.rendered"
- - "'10 permit sctp any 2001:db8:12::/32' in result.rendered"
- - "result.rendered | length == 4"
-
-- name: Idempotence - Rendered
- nxos_acls: *rendered
- register: result
-
-- assert:
- that:
- - "result.changed == false"
diff --git a/test/integration/targets/nxos_acls/tests/cli/replaced.yml b/test/integration/targets/nxos_acls/tests/cli/replaced.yml
deleted file mode 100644
index 2451347491..0000000000
--- a/test/integration/targets/nxos_acls/tests/cli/replaced.yml
+++ /dev/null
@@ -1,65 +0,0 @@
----
-- debug:
- msg: Start nxos_acls replaced integration tests connection={{ansible_connection}}"
-
-- include_tasks: populate_config.yaml
-
-- block:
- - name: Replaced
- nxos_acls: &replaced
- config:
- - afi: ipv4
-
- - afi: ipv6
- acls:
- - name: ACL1v6
- aces:
- - sequence: 30
- grant: permit
- source:
- any: true
- destination:
- any: true
- protocol: pim
-
- - sequence: 40
- remark: Replaced ACE
- - name: ACL2v6
- state: replaced
- register: result
-
- - assert:
- that:
- - "'no ip access-list ACL1v4' in result.commands"
- - "'no ip access-list ACL2v4' in result.commands"
- - "'ipv6 access-list ACL1v6' in result.commands"
- - "'no 10 permit sctp any any' in result.commands"
- - "'no 20 remark IPv6 ACL' in result.commands"
- - "'30 permit pim any any' in result.commands"
- - "'40 remark Replaced ACE' in result.commands"
- - "'ipv6 access-list ACL2v6' in result.commands"
- - "'no 10 deny ipv6 any host 2001:db8:3000::36' in result.commands"
- - "'no 20 permit tcp host 2001:db8:2000:2::2 host 2001:db8:2000:ab::2' in result.commands"
- - "result.commands|length == 10"
-
- - name: Gather static_routes post facts
- nxos_facts:
- gather_subset:
- - "!all"
- - "!min"
- gather_network_resources: acls
-
- - assert:
- that:
- - "ansible_facts.network_resources.acls == result.after"
-
- - name: Idempotence - Replaced
- nxos_acls: *replaced
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- always:
- - include_tasks: remove_config.yaml
diff --git a/test/integration/targets/nxos_acls/tests/cli/rtt.yml b/test/integration/targets/nxos_acls/tests/cli/rtt.yml
deleted file mode 100644
index d3878ec149..0000000000
--- a/test/integration/targets/nxos_acls/tests/cli/rtt.yml
+++ /dev/null
@@ -1,87 +0,0 @@
----
-- debug:
- msg: "Start nxos_acls round trip integration tests connection = {{ansible_connection}}"
-
-- block:
- - name: RTT - Apply provided configuration
- nxos_acls:
- config:
- - afi: ipv4
- acls:
- - name: ACL1v4
- aces:
- - grant: deny
- destination:
- address: 192.0.2.64
- wildcard_bits: 0.0.0.255
- source:
- any: true
- port_protocol:
- lt: 25
- protocol: tcp
- protocol_options:
- tcp:
- ack: true
- fin: true
- sequence: 50
-
- - grant: permit
- protocol: ip
- source:
- any: true
- destination:
- any: true
- fragments: true
- log: true
- sequence: 20
- state: merged
-
- - name: Gather interfaces facts
- nxos_facts:
- gather_subset:
- - "!all"
- - "!min"
- gather_network_resources:
- - acls
-
- - name: Apply configuration to be reverted
- nxos_acls:
- config:
- - afi: ipv6
- acls:
- - name: ACL1v6
- aces:
- - grant: permit
- sequence: 10
- source:
- any: true
- destination:
- host: 2001:db8:12::128
- protocol: sctp
- state: overridden
- register: result
-
- - assert:
- that:
- - "result.changed == True"
- - "'no ip access-list ACL1v4' in result.commands"
- - "'ipv6 access-list ACL1v6' in result.commands"
- - "'10 permit sctp any host 2001:db8:12::128' in result.commands"
- - "result.commands | length == 3 "
-
- - name: Revert back to base configuration using facts round trip
- nxos_acls:
- config: "{{ ansible_facts['network_resources']['acls'] }}"
- state: overridden
- register: result
-
- - assert:
- that:
- - "result.changed == True"
- - "'ip access-list ACL1v4' in result.commands"
- - "'20 permit ip any any fragments log' in result.commands"
- - "'50 deny tcp any lt smtp 192.0.2.64 0.0.0.255 fin ack' in result.commands"
- - "'no ipv6 access-list ACL1v6' in result.commands"
- - "result.commands | length == 4 "
- always:
- - include_tasks: remove_config.yaml
diff --git a/test/integration/targets/nxos_banner/defaults/main.yaml b/test/integration/targets/nxos_banner/defaults/main.yaml
deleted file mode 100644
index 9ef5ba5165..0000000000
--- a/test/integration/targets/nxos_banner/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "*"
-test_items: []
diff --git a/test/integration/targets/nxos_banner/meta/main.yaml b/test/integration/targets/nxos_banner/meta/main.yaml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_banner/meta/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_banner/tasks/cli.yaml b/test/integration/targets/nxos_banner/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_banner/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_banner/tasks/main.yaml b/test/integration/targets/nxos_banner/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_banner/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_banner/tasks/nxapi.yaml b/test/integration/targets/nxos_banner/tasks/nxapi.yaml
deleted file mode 100644
index a37ed6d358..0000000000
--- a/test/integration/targets/nxos_banner/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run \ No newline at end of file
diff --git a/test/integration/targets/nxos_banner/tests/common/sanity.yaml b/test/integration/targets/nxos_banner/tests/common/sanity.yaml
deleted file mode 100644
index ab1eef835b..0000000000
--- a/test/integration/targets/nxos_banner/tests/common/sanity.yaml
+++ /dev/null
@@ -1,84 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_banner sanity test"
-
-- set_fact: banner_exec_image_ok
- # N5K/N6K/N9K-F support banner exec but have image defects
- when: platform is search("N7K|N3K-F")
-
-- set_fact: banner_motd_image_ok
- # multiline banner issues
- when: imagetag is not search("I7") and ansible_connection != "httpapi"
-
-
-# banner exec tests
-- block:
- - debug: msg="START nxos_banner exec tests"
- - name: setup exec
- nxos_banner: &remove_exec
- banner: exec
- state: absent
-
- - name: Set exec
- nxos_banner: &exec
- banner: exec
- text: |
- this is my exec banner
- that has a multiline
- string
- state: present
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'banner exec @\nthis is my exec banner\nthat has a multiline\nstring\n@' in result.commands"
-
- - name: Set exec again (idempotent)
- nxos_banner: *exec
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands | length == 0"
-
- - name: teardown exec
- nxos_banner: *remove_exec
-
- when: banner_exec_image_ok is defined
-
-# banner motd tests
-- block:
- - name: setup motd
- nxos_banner: &remove_motd
- banner: motd
- state: absent
-
- - name: Set motd
- nxos_banner: &motd
- banner: motd
- text: |
- Junk motd banner
- over multiple lines
- state: present
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'banner motd @\nJunk motd banner\nover multiple lines\n@' in result.commands"
-
- - name: Set motd again (idempotent)
- nxos_banner: *motd
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- - name: teardown motd
- nxos_banner: *remove_motd
-
- when: banner_motd_image_ok is defined
-
-- debug: msg="END connection={{ ansible_connection }} nxos_banner sanity test"
diff --git a/test/integration/targets/nxos_become/defaults/main.yaml b/test/integration/targets/nxos_become/defaults/main.yaml
deleted file mode 100644
index 9ef5ba5165..0000000000
--- a/test/integration/targets/nxos_become/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "*"
-test_items: []
diff --git a/test/integration/targets/nxos_become/meta/main.yml b/test/integration/targets/nxos_become/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_become/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_become/tasks/cli.yaml b/test/integration/targets/nxos_become/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_become/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_become/tasks/main.yaml b/test/integration/targets/nxos_become/tasks/main.yaml
deleted file mode 100644
index f9482f77cf..0000000000
--- a/test/integration/targets/nxos_become/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-#- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_become/tasks/nxapi.yaml b/test/integration/targets/nxos_become/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_become/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_become/tests/cli/sanity.yaml b/test/integration/targets/nxos_become/tests/cli/sanity.yaml
deleted file mode 100644
index bee0584563..0000000000
--- a/test/integration/targets/nxos_become/tests/cli/sanity.yaml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }}/sanity.yaml"
-
-- block:
- - name: update role to priv-14
- nxos_config:
- lines:
- - username admin role priv-14
- - no username admin role priv-15
- - enable secret 0 cisco
-
- - name: reset_connection
- meta: reset_connection
-
- - name: run commands with become
- nxos_command:
- commands: 'show privilege'
- become: yes
- register: result
-
- - assert:
- that:
- - "'Current privilege level: 15' in result['stdout'][0]"
-
- always:
- - name: teardown
- nxos_config:
- lines:
- - username admin role priv-15
- - no username admin role priv-14
- - no enable secret
- ignore_errors: yes
-
-- debug: msg="END connection={{ ansible_connection }}/sanity.yaml"
diff --git a/test/integration/targets/nxos_bfd_global/defaults/main.yaml b/test/integration/targets/nxos_bfd_global/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_bfd_global/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_bfd_global/meta/main.yml b/test/integration/targets/nxos_bfd_global/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_bfd_global/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_bfd_global/tasks/cli.yaml b/test/integration/targets/nxos_bfd_global/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_bfd_global/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_bfd_global/tasks/main.yaml b/test/integration/targets/nxos_bfd_global/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_bfd_global/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_bfd_global/tasks/nxapi.yaml b/test/integration/targets/nxos_bfd_global/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_bfd_global/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_bfd_global/tests/common/sanity.yaml b/test/integration/targets/nxos_bfd_global/tests/common/sanity.yaml
deleted file mode 100644
index 0aaf86e471..0000000000
--- a/test/integration/targets/nxos_bfd_global/tests/common/sanity.yaml
+++ /dev/null
@@ -1,168 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_bfd_global sanity test"
-
-- name: set facts common
- # nd_* vars are "non-default" values
- set_fact:
- echo: deleted
- nd_echo: loopback1
- interval: &def_interval
- tx: 50
- min_rx: 50
- multiplier: 3
- nd_interval:
- tx: 51
- min_rx: 52
- multiplier: 4
- slow: 2000
- nd_slow: 2001
-
-- name: set facts (exclude 5K/6K)
- set_fact:
- echo_rx: 50
- nd_echo_rx: 51
- ipv4_echo_rx: 50
- nd_ipv4_echo_rx: 54
- ipv4_interval: *def_interval
- nd_ipv4_interval: &nd_afi_interval
- tx: 54
- min_rx: 56
- multiplier: 8
- ipv4_slow: 2000
- nd_ipv4_slow: 2044
- when: platform is not search('N5K|N6K')
-
-- name: set facts (exclude 35/5K/6K)
- set_fact:
- ipv6_echo_rx: 50
- nd_ipv6_echo_rx: 56
- ipv6_interval: *def_interval
- nd_ipv6_interval: *nd_afi_interval
- ipv6_slow: 2000
- nd_ipv6_slow: 2046
- when: platform is not search('N35|N5K|N6K')
-
-- name: set facts (exclude 5K/6K/7K)
- set_fact:
- startup: 5
- nd_startup: 6
- when: platform is not search('N35|N5K|N6K|N7K')
-
-- name: set facts 3k defaults (resets some values above)
- set_fact:
- echo_rx: 250
- interval: &n3k_def_interval
- tx: 250
- min_rx: 250
- multiplier: 3
- ipv4_echo_rx: 250
- ipv6_echo_rx: 250
- ipv4_interval: *n3k_def_interval
- ipv6_interval: *n3k_def_interval
- ipv4_slow: 2000
- ipv6_slow: 2000
- when: platform is search('N3K')
-
-- name: set facts fabricpath
- set_fact:
- fab_interval: *def_interval
- nd_fab_interval:
- tx: 57
- min_rx: 57
- multiplier: 7
- fab_slow_timer: 2000
- nd_fab_slow_timer: 2007
- fab_vlan: 1
- nd_fab_vlan: 47
- when: platform is not search('N35|N3K|N9K')
-
-- name: Setup
- nxos_feature: &setup_teardown
- feature: bfd
- state: disabled
- ignore_errors: yes
-
-- name: Setup supporting loopback interface
- nxos_config:
- lines: interface loopback1
- match: none
-
-- name: feature bfd init
- # 'feature bfd' init is slow on some platforms, retry on fail
- nxos_bfd_global:
- slow_timer: "{{ nd_slow }}"
- delay: 3
- retries: 1
- register: result
- until: result is not failed
- ignore_errors: yes
-
-- block:
- - name: BFD non defaults
- nxos_bfd_global: &bfd_non_def
- echo_interface: "{{ nd_echo }}"
- echo_rx_interval: "{{ nd_echo_rx | default(omit) }}"
- interval: "{{ nd_interval }}"
- slow_timer: "{{ nd_slow }}"
- startup_timer: "{{ nd_startup | default(omit) }}"
- ipv4_echo_rx_interval: "{{ nd_ipv4_echo_rx | default(omit) }}"
- ipv6_echo_rx_interval: "{{ nd_ipv6_echo_rx | default(omit) }}"
- ipv4_interval: "{{ nd_ipv4_interval | default(omit) }}"
- ipv6_interval: "{{ nd_ipv6_interval | default(omit) }}"
- ipv4_slow_timer: "{{ nd_ipv4_slow | default(omit) }}"
- ipv6_slow_timer: "{{ nd_ipv6_slow | default(omit) }}"
- fabricpath_interval: "{{ nd_fab_interval | default(omit) }}"
- fabricpath_slow_timer: "{{ nd_fab_slow | default(omit) }}"
- fabricpath_vlan: "{{ nd_fab_vlan | default(omit) }}"
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: bfd_non_def idempotence
- nxos_bfd_global: *bfd_non_def
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: BFD defaults
- nxos_bfd_global: &bfd_def
- echo_interface: "{{ echo }}"
- echo_rx_interval: "{{ echo_rx | default(omit) }}"
- interval: "{{ interval }}"
- slow_timer: "{{ slow }}"
- startup_timer: "{{ startup | default(omit) }}"
- ipv4_echo_rx_interval: "{{ ipv4_echo_rx | default(omit) }}"
- ipv6_echo_rx_interval: "{{ ipv6_echo_rx | default(omit) }}"
- ipv4_interval: "{{ ipv4_interval | default(omit) }}"
- ipv6_interval: "{{ ipv6_interval | default(omit) }}"
- ipv4_slow_timer: "{{ ipv4_slow | default(omit) }}"
- ipv6_slow_timer: "{{ ipv6_slow | default(omit) }}"
- fabricpath_interval: "{{ fab_interval | default(omit) }}"
- fabricpath_slow_timer: "{{ fab_slow | default(omit) }}"
- fabricpath_vlan: "{{ fab_vlan | default(omit) }}"
- register: result
-
- - assert: *true
-
- - name: bfd_def idempotence
- nxos_bfd_global: *bfd_def
- register: result
-
- - assert: *false
-
- always:
- - name: Teardown
- nxos_feature: *setup_teardown
- ignore_errors: yes
-
- - name: Teardown supporting loopback interface
- nxos_config:
- lines: no interface loopback1
- match: none
- ignore_errors: yes
-
-- debug: msg="END connection={{ ansible_connection }} nxos_bfd_global sanity test"
diff --git a/test/integration/targets/nxos_bfd_interfaces/defaults/main.yaml b/test/integration/targets/nxos_bfd_interfaces/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_bfd_interfaces/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_bfd_interfaces/meta/main.yml b/test/integration/targets/nxos_bfd_interfaces/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_bfd_interfaces/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_bfd_interfaces/tasks/cli.yaml b/test/integration/targets/nxos_bfd_interfaces/tasks/cli.yaml
deleted file mode 100644
index 6c7ea4a7f9..0000000000
--- a/test/integration/targets/nxos_bfd_interfaces/tasks/cli.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_bfd_interfaces/tasks/main.yaml b/test/integration/targets/nxos_bfd_interfaces/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/nxos_bfd_interfaces/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/nxos_bfd_interfaces/tasks/nxapi.yaml b/test/integration/targets/nxos_bfd_interfaces/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_bfd_interfaces/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_bfd_interfaces/tests/cli/deleted.yaml b/test/integration/targets/nxos_bfd_interfaces/tests/cli/deleted.yaml
deleted file mode 100644
index 1db9a217f9..0000000000
--- a/test/integration/targets/nxos_bfd_interfaces/tests/cli/deleted.yaml
+++ /dev/null
@@ -1,71 +0,0 @@
----
-- debug:
- msg: "Start nxos_bfd_interfaces deleted integration tests connection={{ ansible_connection }}"
-
-- set_fact: test_int1="{{ nxos_int1 }}"
-- set_fact:
- bfd_enable: enable
- bfd_disable: disable
- when: platform is not search('N5K|N6K')
-
-- name: setup1
- cli_config: &setup_teardown
- config: |
- no feature bfd
- default interface {{ test_int1 }}
-
-- block:
- - name: setup2
- cli_config:
- config: |
- feature bfd
- interface {{ test_int1 }}
- no switchport
-
- - name: setup initial bfd state
- nxos_bfd_interfaces:
- config:
- - name: "{{ test_int1 }}"
- bfd: "{{ bfd_disable|default(omit)}}"
- echo: disable
- state: merged
-
- - name: Gather bfd_interfaces facts
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: bfd_interfaces
-
- - name: deleted
- nxos_bfd_interfaces: &deleted
- config:
- - name: "{{ test_int1 }}"
- state: deleted
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'bfd echo' in result.commands"
- msg: "Assert failed. 'result.commands': {{ result.commands }}"
-
- - assert:
- that:
- - "{{ 'bfd' in result.commands }}"
- msg: "Assert failed. 'result.commands': {{ result.commands }}"
- when: bfd_enable is defined
-
-
- - name: Idempotence - deleted
- nxos_bfd_interfaces: *deleted
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config: *setup_teardown
diff --git a/test/integration/targets/nxos_bfd_interfaces/tests/cli/merged.yaml b/test/integration/targets/nxos_bfd_interfaces/tests/cli/merged.yaml
deleted file mode 100644
index 730a9498f4..0000000000
--- a/test/integration/targets/nxos_bfd_interfaces/tests/cli/merged.yaml
+++ /dev/null
@@ -1,68 +0,0 @@
----
-- debug:
- msg: "Start nxos_bfd_interfaces merged integration tests connection={{ ansible_connection }}"
-
-- set_fact: test_int1="{{ nxos_int1 }}"
-- set_fact:
- bfd_enable: enable
- bfd_disable: disable
- when: platform is not search('N5K|N6K')
-
-- name: setup1
- cli_config: &setup_teardown
- config: |
- no feature bfd
- default interface {{ test_int1 }}
-
-- block:
- - name: setup2
- cli_config:
- config: |
- feature bfd
- interface {{ test_int1 }}
- no switchport
-
- - name: Merged
- nxos_bfd_interfaces: &merged
- config:
- - name: "{{ test_int1 }}"
- bfd: "{{ bfd_disable|default(omit)}}"
- echo: disable
- state: merged
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'no bfd echo' in result.commands"
- msg: "Assert failed. 'result.commands': {{ result.commands }}"
-
- - assert:
- that:
- - "{{ 'no bfd' in result.commands }}"
- msg: "Assert failed. 'result.commands': {{ result.commands }}"
- when: bfd_enable is defined
-
- - name: Gather bfd_interfaces facts
- nxos_facts:
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: bfd_interfaces
-
- - assert:
- that:
- - "ansible_facts.network_resources.bfd_interfaces|symmetric_difference(result.after)|length == 0"
-
- - name: Idempotence - Merged
- nxos_bfd_interfaces: *merged
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config: *setup_teardown
diff --git a/test/integration/targets/nxos_bfd_interfaces/tests/cli/overridden.yaml b/test/integration/targets/nxos_bfd_interfaces/tests/cli/overridden.yaml
deleted file mode 100644
index c4f5e95b1c..0000000000
--- a/test/integration/targets/nxos_bfd_interfaces/tests/cli/overridden.yaml
+++ /dev/null
@@ -1,67 +0,0 @@
----
-- debug:
- msg: "Start nxos_bfd_interfaces overridden integration tests connection={{ ansible_connection }}"
-
-- set_fact: test_int1="{{ nxos_int1 }}"
-- set_fact: test_int2="{{ nxos_int2 }}"
-- set_fact:
- bfd_enable: enable
- bfd_disable: disable
- when: platform is not search('N5K|N6K')
-
-- name: setup1
- cli_config: &setup_teardown
- config: |
- no feature bfd
- default interface {{ test_int1 }}
- default interface {{ test_int2 }}
-
-- block:
- - name: setup2
- cli_config:
- config: |
- feature bfd
- interface {{ test_int1 }}
- no switchport
- interface {{ test_int2 }}
- no switchport
-
- - name: setup initial bfd state
- nxos_bfd_interfaces:
- config:
- - name: "{{ test_int1 }}"
- bfd: "{{ bfd_disable|default(omit)}}"
- echo: enable
- - name: "{{ test_int2 }}"
- bfd: "{{ bfd_enable|default(omit)}}"
- echo: disable
- state: merged
-
- - name: Overridden
- nxos_bfd_interfaces: &overridden
- config:
- - name: "{{ test_int1 }}"
- bfd: "{{ bfd_disable|default(omit)}}"
- echo: disable
- state: overridden
- register: result
-
- - assert:
- that:
- - result.changed == true
- - result.commands[1] == 'bfd echo' # test_int2 reset to defaults
- - result.commands[3] == 'no bfd echo' # test_int1 set to playval
- msg: "Assert failed. 'result.commands': {{ result.commands }}"
-
- - name: Idempotence - Overridden
- nxos_bfd_interfaces: *overridden
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config: *setup_teardown
diff --git a/test/integration/targets/nxos_bfd_interfaces/tests/cli/replaced.yaml b/test/integration/targets/nxos_bfd_interfaces/tests/cli/replaced.yaml
deleted file mode 100644
index fc48c2d3f7..0000000000
--- a/test/integration/targets/nxos_bfd_interfaces/tests/cli/replaced.yaml
+++ /dev/null
@@ -1,65 +0,0 @@
----
-- debug:
- msg: "Start nxos_bfd_interfaces replaced integration tests connection={{ ansible_connection }}"
-
-- set_fact: test_int1="{{ nxos_int1 }}"
-- set_fact:
- bfd_enable: enable
- bfd_disable: disable
- when: platform is not search('N5K|N6K')
-
-- name: setup1
- cli_config: &setup_teardown
- config: |
- no feature bfd
- default interface {{ test_int1 }}
-
-- block:
- - name: setup2
- cli_config:
- config: |
- feature bfd
- interface {{ test_int1 }}
- no switchport
-
- - name: setup initial bfd state
- nxos_bfd_interfaces:
- config:
- - name: "{{ test_int1 }}"
- bfd: "{{ bfd_disable|default(omit)}}"
- echo: enable
- state: merged
-
- - name: Replaced
- nxos_bfd_interfaces: &replaced
- config:
- - name: "{{ test_int1 }}"
- bfd: "{{ bfd_enable|default(omit)}}"
- echo: disable
- state: replaced
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'no bfd echo' in result.commands"
- msg: "Assert failed. 'result.commands': {{ result.commands }}"
-
- - assert:
- that:
- - "{{ 'bfd' in result.commands }}"
- msg: "Assert failed. 'result.commands': {{ result.commands }}"
- when: bfd_enable is defined
-
- - name: Idempotence - Replaced
- nxos_bfd_interfaces: *replaced
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config: *setup_teardown
diff --git a/test/integration/targets/nxos_bgp/defaults/main.yaml b/test/integration/targets/nxos_bgp/defaults/main.yaml
deleted file mode 100644
index 525b7aab90..0000000000
--- a/test/integration/targets/nxos_bgp/defaults/main.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-testcase: "*"
-vrfs:
- - default
- - myvrf
diff --git a/test/integration/targets/nxos_bgp/meta/main.yml b/test/integration/targets/nxos_bgp/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_bgp/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_bgp/tasks/cli.yaml b/test/integration/targets/nxos_bgp/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_bgp/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_bgp/tasks/main.yaml b/test/integration/targets/nxos_bgp/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_bgp/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_bgp/tasks/nxapi.yaml b/test/integration/targets/nxos_bgp/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_bgp/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_bgp/tests/common/dis_policy.yaml b/test/integration/targets/nxos_bgp/tests/common/dis_policy.yaml
deleted file mode 100644
index dfb1864697..0000000000
--- a/test/integration/targets/nxos_bgp/tests/common/dis_policy.yaml
+++ /dev/null
@@ -1,77 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_bgp parameter test"
-
-- debug: msg="This bgp_disable_policy is not supported on {{ image_version }}"
- when: imagetag is search("A8|D1")
-- set_fact: bgp_disable_policy="false"
-- set_fact: bgp_disable_policy="true"
- when: imagetag is not search("A8|D1")
-
-- name: "Disable feature BGP"
- nxos_feature:
- feature: bgp
- state: disabled
- ignore_errors: yes
-
-- name: "Enable feature BGP"
- nxos_feature:
- feature: bgp
- state: enabled
- ignore_errors: yes
-
-- block:
- - name: "set disable policy"
- nxos_bgp: &set1
- asn: 65535
- disable_policy_batching: true
- disable_policy_batching_ipv4_prefix_list: v4_p
- disable_policy_batching_ipv6_prefix_list: v6_p
- register: result
- when: bgp_disable_policy
-
- - assert: &true
- that:
- - "result.changed == true"
- when: bgp_disable_policy
-
- - name: "Check Idempotence"
- nxos_bgp: *set1
- register: result
- when: bgp_disable_policy
-
- - assert: &false
- that:
- - "result.changed == false"
- when: bgp_disable_policy
-
- - name: "reset disable policy"
- nxos_bgp: &reset1
- asn: 65535
- disable_policy_batching: false
- disable_policy_batching_ipv4_prefix_list: default
- disable_policy_batching_ipv6_prefix_list: default
- register: result
- when: bgp_disable_policy
-
- - assert: *true
- when: bgp_disable_policy
-
- - name: "Check Idempotence"
- nxos_bgp: *reset1
- register: result
- when: bgp_disable_policy
-
- - assert: *false
- when: bgp_disable_policy
-
- rescue:
- - debug: msg="Tests can fail on A8 or helsinki images"
-
- always:
- - name: "Disable feature bgp"
- nxos_feature:
- feature: bgp
- state: disabled
- ignore_errors: yes
-
- - debug: msg="END connection={{ ansible_connection }} nxos_bgp parameter test"
diff --git a/test/integration/targets/nxos_bgp/tests/common/hels.yaml b/test/integration/targets/nxos_bgp/tests/common/hels.yaml
deleted file mode 100644
index db4f547769..0000000000
--- a/test/integration/targets/nxos_bgp/tests/common/hels.yaml
+++ /dev/null
@@ -1,95 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_bgp parameter test"
-
-- debug: msg="This test is not supported on {{ image_version }}"
- when: imagetag is search("D1")
-- set_fact: test_helsinki="false"
-- set_fact: test_helsinki="true"
- when: imagetag is not search("D1")
-
-- name: "Disable feature BGP"
- nxos_feature:
- feature: bgp
- state: disabled
- ignore_errors: yes
- when: test_helsinki
-
-- name: "Enable feature BGP"
- nxos_feature:
- feature: bgp
- state: enabled
- ignore_errors: yes
- when: test_helsinki
-
-- block:
- # these tasks will fail on n7k running helsinki
- # due to no support
- - name: "set helsinki"
- nxos_bgp: &set1
- asn: 65535
- vrf: "{{ item }}"
- graceful_restart_timers_restart: 130
- graceful_restart_timers_stalepath_time: 310
- neighbor_down_fib_accelerate: true
- reconnect_interval: 55
- timer_bgp_hold: 110
- timer_bgp_keepalive: 45
- with_items: "{{ vrfs }}"
- register: result
- when: test_helsinki
-
- - assert: &true
- that:
- - "result.changed == true"
- when: test_helsinki
-
- - name: "Check Idempotence"
- nxos_bgp: *set1
- with_items: "{{ vrfs }}"
- register: result
- when: test_helsinki
-
- - assert: &false
- that:
- - "result.changed == false"
- when: test_helsinki
-
- - name: "reset helsinki"
- nxos_bgp: &reset1
- asn: 65535
- vrf: "{{ item }}"
- graceful_restart: true
- graceful_restart_timers_restart: default
- graceful_restart_timers_stalepath_time: default
- neighbor_down_fib_accelerate: false
- reconnect_interval: default
- timer_bgp_hold: default
- timer_bgp_keepalive: default
- with_items: "{{ vrfs }}"
- register: result
- when: test_helsinki
-
- - assert: *true
- when: test_helsinki
-
- - name: "Check Idempotence"
- nxos_bgp: *reset1
- with_items: "{{ vrfs }}"
- register: result
- when: test_helsinki
-
- - assert: *false
- when: test_helsinki
-
- rescue:
- - debug: msg="Tests can fail on helsinki images"
-
- always:
- - name: "Disable feature bgp"
- nxos_feature:
- feature: bgp
- state: disabled
- ignore_errors: yes
- when: test_helsinki
-
- - debug: msg="END connection={{ ansible_connection }} nxos_bgp parameter test"
diff --git a/test/integration/targets/nxos_bgp/tests/common/isolate.yaml b/test/integration/targets/nxos_bgp/tests/common/isolate.yaml
deleted file mode 100644
index 0d507f6eea..0000000000
--- a/test/integration/targets/nxos_bgp/tests/common/isolate.yaml
+++ /dev/null
@@ -1,76 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_bgp parameter test"
-
-
-- debug: msg="This bgp_isolate is not supported on {{ image_version }}"
- when: imagetag is search("A8")
-- set_fact: bgp_isolate="false"
-- set_fact: bgp_isolate="true"
- when: imagetag is not search("A8")
-
-- name: "Disable feature BGP"
- nxos_feature:
- feature: bgp
- state: disabled
- ignore_errors: yes
-
-- name: "Enable feature BGP"
- nxos_feature:
- feature: bgp
- state: enabled
- ignore_errors: yes
-
-- block:
- # these tasks will fail on n3k running A8
- # due to no support
- - name: "set isolate"
- nxos_bgp: &set1
- asn: 65535
- isolate: false
- register: result
- when: bgp_isolate
-
- - assert: &true
- that:
- - "result.changed == true"
- when: bgp_isolate
-
- - name: "Check Idempotence"
- nxos_bgp: *set1
- register: result
- when: bgp_isolate
-
- - assert: &false
- that:
- - "result.changed == false"
- when: bgp_isolate
-
- - name: "reset isolate"
- nxos_bgp: &reset1
- asn: 65535
- isolate: true
- register: result
- when: bgp_isolate
-
- - assert: *true
- when: bgp_isolate
-
- - name: "Check Idempotence"
- nxos_bgp: *reset1
- register: result
- when: bgp_isolate
-
- - assert: *false
- when: bgp_isolate
-
- rescue:
- - debug: msg="Tests can fail on A8 images"
-
- always:
- - name: "Disable feature bgp"
- nxos_feature:
- feature: bgp
- state: disabled
- ignore_errors: yes
-
- - debug: msg="END connection={{ ansible_connection }} nxos_bgp parameter test"
diff --git a/test/integration/targets/nxos_bgp/tests/common/param.yaml b/test/integration/targets/nxos_bgp/tests/common/param.yaml
deleted file mode 100644
index fdcd33c5ce..0000000000
--- a/test/integration/targets/nxos_bgp/tests/common/param.yaml
+++ /dev/null
@@ -1,259 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_bgp parameter test"
-
-- name: "Disable feature BGP"
- nxos_feature:
- feature: bgp
- state: disabled
- ignore_errors: yes
-
-- name: "Enable feature BGP"
- nxos_feature:
- feature: bgp
- state: enabled
- ignore_errors: yes
-
-- block:
- - name: "set multi vrf params"
- nxos_bgp: &set_multi_vrf
- asn: 65535
- vrf: "{{ item }}"
- router_id: 192.0.2.1
- bestpath_always_compare_med: true
- bestpath_aspath_multipath_relax: true
- bestpath_compare_routerid: true
- bestpath_cost_community_ignore: true
- bestpath_med_confed: true
- bestpath_med_missing_as_worst: true
- bestpath_med_non_deterministic: true
-# grace_restart is failing with error code -32603 only on CLI transport, nxapi ok
-# graceful_restart: false
- graceful_restart_helper: true
- log_neighbor_changes: true
- maxas_limit: 50
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Check Idempotence"
- nxos_bgp: *set_multi_vrf
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: "reset multi vrf params"
- nxos_bgp: &reset_multi_vrf
- asn: 65535
- vrf: "{{ item }}"
- bestpath_always_compare_med: false
- bestpath_aspath_multipath_relax: false
- bestpath_compare_routerid: false
- bestpath_cost_community_ignore: false
- bestpath_med_confed: false
- bestpath_med_missing_as_worst: false
- bestpath_med_non_deterministic: false
- graceful_restart_helper: false
- log_neighbor_changes: false
- maxas_limit: default
- router_id: default
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp: *reset_multi_vrf
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *false
-
- - name: "set clusterid"
- nxos_bgp: &set_cluster_id
- asn: 65535
- vrf: "{{ item }}"
- cluster_id: 10.0.0.1
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp: *set_cluster_id
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *false
-
- - name: "reset cluster_id"
- nxos_bgp: &reset_cluster_id
- asn: 65535
- vrf: "{{ item }}"
- cluster_id: default
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp: *reset_cluster_id
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *false
-
- - name: "set confederation"
- nxos_bgp: &set_confederation
- asn: 65535
- confederation_id: 99
- confederation_peers:
- - 16
- - 22
- - 18
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp: *set_confederation
- register: result
-
- - assert: *false
-
- - name: "reset confederation"
- nxos_bgp: &reset_confederation
- asn: 65535
- confederation_id: default
- confederation_peers: default
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp: *reset_confederation
- register: result
-
- - assert: *false
-
- - name: "set confederation_local_as"
- nxos_bgp: &set_confederation_la
- asn: 65535
- vrf: myvrf
- local_as: 33
- confederation_id: 99
- confederation_peers:
- - 16
- - 22
- - 18
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp: *set_confederation_la
- register: result
-
- - assert: *false
-
- - name: "reset confederation local_as"
- nxos_bgp: &reset_confederation_la
- asn: 65535
- vrf: myvrf
- local_as: default
- confederation_id: default
- confederation_peers: default
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp: *reset_confederation_la
- register: result
-
- - assert: *false
-
- - name: "set local_as"
- nxos_bgp: &set_local_as
- asn: 65535
- vrf: myvrf
- local_as: 33
- confederation_id: 99
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp: *set_local_as
- register: result
-
- - assert: *false
-
- - name: "reset local_as"
- nxos_bgp: &reset_local_as
- asn: 65535
- vrf: myvrf
- confederation_id: default
- local_as: default
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp: *reset_local_as
- register: result
-
- - assert: *false
-
- - name: "set default vrf params"
- nxos_bgp: &set_def_vrf
- asn: 65535
- event_history_cli: size_medium
- event_history_detail: size_large
- event_history_events: size_medium
- event_history_periodic: size_small
- enforce_first_as: false
- fast_external_fallover: false
- flush_routes: true
- shutdown: true
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp: *set_def_vrf
- register: result
-
- - assert: *false
-
- - name: "reset default vrf params"
- nxos_bgp: &reset_def_vrf
- asn: 65535
- event_history_detail: default
- enforce_first_as: true
- fast_external_fallover: true
- flush_routes: false
- shutdown: false
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp: *reset_def_vrf
- register: result
-
- - assert: *false
-
- always:
- - name: "Disable feature bgp"
- nxos_feature:
- feature: bgp
- state: disabled
- ignore_errors: yes
-
- - debug: msg="END connection={{ ansible_connection }} nxos_bgp parameter test"
diff --git a/test/integration/targets/nxos_bgp/tests/common/sanity.yaml b/test/integration/targets/nxos_bgp/tests/common/sanity.yaml
deleted file mode 100644
index 580588144d..0000000000
--- a/test/integration/targets/nxos_bgp/tests/common/sanity.yaml
+++ /dev/null
@@ -1,132 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_bgp sanity test"
-
-- set_fact: neighbor_down_fib_accelerate="true"
- when: (not titanium) and ((imagetag != 'N1') and (imagetag != 'D1'))
-
-- set_fact: reconnect_interval="55"
- when: (not titanium) and ((imagetag != 'N1') and (imagetag != 'D1'))
-
-- set_fact: isolate="false"
- when: platform is not match("N35")
-
-- name: "Enable feature BGP"
- nxos_feature:
- feature: bgp
- state: enabled
- ignore_errors: yes
-
-- name: "Setup"
- nxos_bgp: &remove
- asn: 65535
- state: absent
- ignore_errors: yes
- register: result
-
-- block:
- - name: "Configure BGP defaults"
- nxos_bgp: &configure_default
- asn: 65535
- router_id: 192.0.2.1
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Check Idempotence"
- nxos_bgp: *configure_default
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: "Remove BGP"
- nxos_bgp: *remove
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp: *remove
- register: result
-
- - assert: *false
-
- - name: "Configure BGP non defaults"
- nxos_bgp: &configure_non_default
- asn: 65535
- router_id: 192.0.2.1
- bestpath_always_compare_med: true
- bestpath_aspath_multipath_relax: true
- bestpath_compare_routerid: true
- bestpath_cost_community_ignore: true
- bestpath_med_confed: true
- bestpath_med_missing_as_worst: true
- bestpath_med_non_deterministic: true
- cluster_id: 10.0.0.1
- confederation_id: 99
- disable_policy_batching: true
- enforce_first_as: false
- fast_external_fallover: false
- flush_routes: true
- graceful_restart_helper: true
- graceful_restart_timers_restart: 130
- graceful_restart_timers_stalepath_time: 310
- isolate: "{{isolate|default(omit)}}"
- log_neighbor_changes: true
- maxas_limit: 50
- neighbor_down_fib_accelerate: "{{neighbor_down_fib_accelerate|default(omit)}}"
- reconnect_interval: "{{reconnect_interval|default(omit)}}"
- shutdown: true
- timer_bestpath_limit: 255
- timer_bgp_hold: 110
- timer_bgp_keepalive: 45
- event_history_cli: size_medium
- event_history_detail: size_large
- event_history_events: size_medium
- event_history_periodic: size_small
- suppress_fib_pending: true
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp: *configure_non_default
- register: result
-
- - assert: *false
-
- - name: "Remove BGP"
- nxos_bgp: *remove
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp: *remove
- register: result
-
- - assert: *false
-
- - name: "Disable feature bgp"
- nxos_feature:
- feature: bgp
- state: disabled
-
- rescue:
- - name: "Cleanup BGP"
- nxos_bgp: *remove
- ignore_errors: yes
-
- - name: "Disable feature bgp"
- nxos_feature:
- feature: bgp
- state: disabled
- ignore_errors: yes
-
- always:
- - debug: msg="END connection={{ ansible_connection }} nxos_bgp sanity test"
diff --git a/test/integration/targets/nxos_bgp/tests/common/supp_fib.yaml b/test/integration/targets/nxos_bgp/tests/common/supp_fib.yaml
deleted file mode 100644
index d9fdbdb3ef..0000000000
--- a/test/integration/targets/nxos_bgp/tests/common/supp_fib.yaml
+++ /dev/null
@@ -1,113 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_bgp parameter test"
-
-- set_fact: bgp_best_path_limit="false"
-- set_fact: bgp_best_path_limit="true"
- when: imagetag is not search("I2")
-
-- set_fact: bgp_suppress_fib_supported="false"
-- set_fact: bgp_suppress_fib_supported="true"
- when: imagetag is not search("A8|D1|I2|I4")
-
-- name: "Disable feature BGP"
- nxos_feature:
- feature: bgp
- state: disabled
- ignore_errors: yes
-
-- name: "Enable feature BGP"
- nxos_feature:
- feature: bgp
- state: enabled
- ignore_errors: yes
-
-- block:
- # this task will fail on n9k running I2
- # due to no support
- - name: "set bestpath limit"
- nxos_bgp: &set1
- asn: 65535
- vrf: "{{ item }}"
- timer_bestpath_limit: 255
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Check Idempotence"
- nxos_bgp: *set1
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: "reset bestpath limit"
- nxos_bgp: &reset1
- asn: 65535
- vrf: "{{ item }}"
- timer_bestpath_limit: default
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp: *reset1
- with_items: "{{ vrfs }}"
- register: result
- when: bgp_best_path_limit
-
- - assert: *false
- when: bgp_best_path_limit
-
- # Property does not nvgen on some images
- # still try and set it but don't check idempotence
- - name: "set suppress fib"
- nxos_bgp: &set2
- asn: 65535
- suppress_fib_pending: false
- register: result
-
- - assert: *true
- when: bgp_suppress_fib_supported
-
- - name: "Check Idempotence"
- nxos_bgp: *set2
- register: result
- when: bgp_suppress_fib_supported
-
- - assert: *false
- when: bgp_suppress_fib_supported
-
- - name: "reset suppress fib"
- nxos_bgp: &reset2
- asn: 65535
- suppress_fib_pending: true
- register: result
-
- - assert: *true
- when: bgp_suppress_fib_supported
-
- - name: "Check Idempotence"
- nxos_bgp: *reset2
- register: result
- when: bgp_suppress_fib_supported
-
- - assert: *false
- when: bgp_suppress_fib_supported
-
- rescue:
- - debug: msg="Tests can fail on I2/I4/A8/Fretta or helsinki images"
-
- always:
- - name: "Disable feature bgp"
- nxos_feature:
- feature: bgp
- state: disabled
- ignore_errors: yes
-
- - debug: msg="END connection={{ ansible_connection }} nxos_bgp parameter test"
diff --git a/test/integration/targets/nxos_bgp_af/defaults/main.yaml b/test/integration/targets/nxos_bgp_af/defaults/main.yaml
deleted file mode 100644
index 525b7aab90..0000000000
--- a/test/integration/targets/nxos_bgp_af/defaults/main.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-testcase: "*"
-vrfs:
- - default
- - myvrf
diff --git a/test/integration/targets/nxos_bgp_af/meta/main.yml b/test/integration/targets/nxos_bgp_af/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_bgp_af/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_bgp_af/tasks/cli.yaml b/test/integration/targets/nxos_bgp_af/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_bgp_af/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_bgp_af/tasks/main.yaml b/test/integration/targets/nxos_bgp_af/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_bgp_af/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_bgp_af/tasks/nxapi.yaml b/test/integration/targets/nxos_bgp_af/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_bgp_af/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_bgp_af/tests/common/sanity.yaml b/test/integration/targets/nxos_bgp_af/tests/common/sanity.yaml
deleted file mode 100644
index 00af4422e5..0000000000
--- a/test/integration/targets/nxos_bgp_af/tests/common/sanity.yaml
+++ /dev/null
@@ -1,320 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_bgp_af sanity test"
-
-- set_fact: advertise_l2vpn_evpn="true"
- when: platform is search('N9K')
-
-- name: "Enable feature BGP"
- nxos_feature:
- feature: bgp
- state: enabled
- ignore_errors: yes
-
-- name: "Enable feature nv overlay"
- nxos_feature:
- feature: nv overlay
- state: enabled
- ignore_errors: yes
-
-- name: "Setup"
- nxos_bgp: &remove
- asn: 65535
- state: absent
- ignore_errors: yes
-
-- block:
- - name: "Enable nv overlay evpn"
- nxos_config:
- lines:
- - nv overlay evpn
- when: platform is search('N9K')
-
- - name: "Configure BGP_AF 1"
- nxos_bgp_af: &configure1
- asn: 65535
- vrf: testing
- afi: ipv4
- safi: unicast
- advertise_l2vpn_evpn: "{{advertise_l2vpn_evpn|default(omit)}}"
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Check Idempotence"
- nxos_bgp_af: *configure1
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: "Remove BGP"
- nxos_bgp_af: &remove_af
- asn: 65535
- vrf: testing
- afi: ipv4
- safi: unicast
- state: absent
- register: result
-
- - assert: *true
-
- - name: "Configure BGP_AF 2"
- nxos_bgp_af: &configure2
- asn: 65535
- vrf: "{{ item }}"
- afi: ipv4
- safi: unicast
- dampening_state: True
- additional_paths_install: true
- additional_paths_receive: true
- additional_paths_selection: RouteMap
- additional_paths_send: true
- client_to_client: False
- default_information_originate: true
- state: present
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp_af: *configure2
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *false
-
- - name: "Configure BGP_AF def2"
- nxos_bgp_af: &configuredef2
- asn: 65535
- vrf: "{{ item }}"
- afi: ipv4
- safi: unicast
- dampening_state: False
- additional_paths_install: False
- additional_paths_receive: False
- additional_paths_selection: default
- additional_paths_send: False
- client_to_client: True
- default_information_originate: False
- state: present
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp_af: *configuredef2
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *false
-
- - name: "Remove BGP"
- nxos_bgp_af: &remove_af_vrf
- asn: 65535
- vrf: "{{ item }}"
- afi: ipv4
- safi: unicast
- state: absent
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Configure BGP_AF 3"
- nxos_bgp_af: &configure3
- asn: 65535
- vrf: "{{ item }}"
- afi: ipv4
- safi: unicast
- dampening_routemap: 'abcd'
- default_metric: 50
- distance_ebgp: 30
- distance_ibgp: 60
- distance_local: 90
- maximum_paths: 9
- maximum_paths_ibgp: 9
- next_hop_route_map: RouteMap
- suppress_inactive: true
- table_map: RouteMap
- table_map_filter: true
- state: present
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp_af: *configure3
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *false
-
- - name: "Configure BGP_AF def3"
- nxos_bgp_af: &configuredef3
- asn: 65535
- vrf: "{{ item }}"
- afi: ipv4
- safi: unicast
- dampening_routemap: default
- default_metric: default
- distance_ebgp: default
- distance_ibgp: default
- distance_local: default
- maximum_paths: default
- maximum_paths_ibgp: default
- next_hop_route_map: default
- suppress_inactive: False
- table_map: default
- table_map_filter: False
- state: present
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp_af: *configuredef3
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *false
-
- - name: "Remove BGP"
- nxos_bgp_af: *remove_af_vrf
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Configure BGP_AF 4"
- nxos_bgp_af: &configure4
- asn: 65535
- vrf: "{{ item }}"
- afi: ipv4
- safi: unicast
- dampen_igp_metric: 200
- dampening_half_time: 1
- dampening_max_suppress_time: 4
- dampening_reuse_time: 2
- dampening_suppress_time: 3
- inject_map: [['lax_inject_map', 'lax_exist_map'], ['nyc_inject_map', 'nyc_exist_map', 'copy-attributes'], ['fsd_inject_map', 'fsd_exist_map']]
- networks: [['10.0.0.0/16', 'routemap_LA'], ['192.168.1.1/32', 'Chicago'], ['192.168.2.0/24'], ['192.168.3.0/24', 'routemap_NYC']]
- redistribute: [['direct', 'rm_direct'], ['lisp', 'rm_lisp']]
- state: present
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp_af: *configure4
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *false
-
- - name: "Configure BGP_AF 5"
- nxos_bgp_af: &configure5
- asn: 65535
- vrf: "{{ item }}"
- afi: ipv4
- safi: unicast
- dampen_igp_metric: 300
- dampening_half_time: 10
- dampening_max_suppress_time: 40
- dampening_reuse_time: 20
- dampening_suppress_time: 30
- inject_map: [['fsd_inject_map', 'fsd_exist_map']]
- networks: [['192.168.2.0/24']]
- redistribute: [['lisp', 'rm_lisp']]
- state: present
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp_af: *configure5
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *false
-
- - name: "Configure BGP_AF def5"
- nxos_bgp_af: &configuredef5
- asn: 65535
- vrf: "{{ item }}"
- afi: ipv4
- safi: unicast
- dampen_igp_metric: default
- dampening_half_time: default
- dampening_max_suppress_time: default
- dampening_reuse_time: default
- dampening_suppress_time: default
- inject_map: default
- networks: default
- redistribute: default
- state: present
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp_af: *configuredef5
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *false
-
- - name: "Remove BGP"
- nxos_bgp_af: *remove_af_vrf
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp_af: *remove_af_vrf
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *false
-
- rescue:
- - name: "Cleanup BGP"
- nxos_bgp: *remove
- ignore_errors: yes
-
- always:
- - name: "Disable feature bgp"
- nxos_feature: &disable_bgp
- feature: bgp
- state: disabled
-
- - name: "Disable feature nv overlay"
- nxos_feature: &disable_nvoverlay
- feature: nv overlay
- state: disabled
- ignore_errors: yes
-
- # Some platforms will timeout if the
- # 'no nv overlay evpn' command is sent
- # too quickly following bgp disablement.
- - pause:
- seconds: 5
-
- - name: "Remove nv overlay evpn"
- nxos_config:
- lines:
- - no nv overlay evpn
- when: platform is search('N9K')
-
- - debug: msg="END connection={{ ansible_connection }} nxos_bgp_af sanity test"
diff --git a/test/integration/targets/nxos_bgp_neighbor/defaults/main.yaml b/test/integration/targets/nxos_bgp_neighbor/defaults/main.yaml
deleted file mode 100644
index 525b7aab90..0000000000
--- a/test/integration/targets/nxos_bgp_neighbor/defaults/main.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-testcase: "*"
-vrfs:
- - default
- - myvrf
diff --git a/test/integration/targets/nxos_bgp_neighbor/meta/main.yml b/test/integration/targets/nxos_bgp_neighbor/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_bgp_neighbor/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_bgp_neighbor/tasks/cli.yaml b/test/integration/targets/nxos_bgp_neighbor/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_bgp_neighbor/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_bgp_neighbor/tasks/main.yaml b/test/integration/targets/nxos_bgp_neighbor/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_bgp_neighbor/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_bgp_neighbor/tasks/nxapi.yaml b/test/integration/targets/nxos_bgp_neighbor/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_bgp_neighbor/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_bgp_neighbor/tests/common/sanity.yaml b/test/integration/targets/nxos_bgp_neighbor/tests/common/sanity.yaml
deleted file mode 100644
index c8960ca95d..0000000000
--- a/test/integration/targets/nxos_bgp_neighbor/tests/common/sanity.yaml
+++ /dev/null
@@ -1,338 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_bgp_neighbor sanity test"
-
-- set_fact: intname="{{ nxos_int1 }}"
-
-- set_fact: log_neighbor_changese="enable"
- when: (imagetag and (imagetag is version_compare('D1', 'ne')) and (imagetag is version_compare('N1', 'ne')))
-- set_fact: log_neighbor_changesd="disable"
- when: (imagetag and (imagetag is version_compare('D1', 'ne')) and (imagetag is version_compare('N1', 'ne')))
-
-- debug:
- var: titanium
-
-- set_fact: remove_private_asa="all"
- when: not titanium
-- set_fact: remove_private_asr="replace-as"
- when: not titanium
-
-- name: "Setup: Disable features"
- nxos_feature:
- feature: "{{ item }}"
- state: disabled
- loop: ['bgp', 'bfd']
- ignore_errors: yes
-
-- name: "Setup: Enable features"
- nxos_feature:
- feature: "{{ item }}"
- state: enabled
- loop: ['bgp', 'bfd']
-
-- block:
- - name: "Configure BGP neighbor1"
- nxos_bgp_neighbor: &configure1
- asn: 65535
- neighbor: 192.0.2.3/32
- vrf: "{{ item }}"
- connected_check: true
- capability_negotiation: true
- dynamic_capability: true
- ebgp_multihop: 2
- low_memory_exempt: true
- maximum_peers: 10
- suppress_4_byte_as: true
- timers_keepalive: 90
- timers_holdtime: 270
- log_neighbor_changes: "{{log_neighbor_changese|default(omit)}}"
- local_as: 22.33
- remote_as: 33.22
- description: "just a description"
- update_source: "{{ intname.capitalize() }}"
- shutdown: true
- state: present
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Check Idempotence"
- nxos_bgp_neighbor: *configure1
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: "Configure BGP neighbor2"
- nxos_bgp_neighbor: &configure2
- asn: 65535
- neighbor: 192.0.2.3/32
- vrf: "{{ item }}"
- connected_check: False
- capability_negotiation: False
- dynamic_capability: False
- ebgp_multihop: default
- low_memory_exempt: False
- maximum_peers: default
- suppress_4_byte_as: False
- timers_keepalive: default
- timers_holdtime: default
- log_neighbor_changes: "{{log_neighbor_changesd|default(omit)}}"
- local_as: default
- remote_as: default
- description: default
- update_source: default
- shutdown: False
- state: present
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp_neighbor: *configure2
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *false
-
- - name: "Remove BGP"
- nxos_bgp_neighbor: &remove
- asn: 65535
- neighbor: 192.0.2.3/32
- vrf: "{{ item }}"
- state: absent
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp_neighbor: *remove
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *false
-
- - name: "Configure BGP neighbor3"
- nxos_bgp_neighbor: &configure3
- asn: 65535
- neighbor: 192.0.2.3/32
- vrf: "{{ item }}"
- description: "tested by ansible"
- remove_private_as: "{{remove_private_asa|default(omit)}}"
- state: present
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp_neighbor: *configure3
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *false
-
- - name: "Configure BGP neighbor4"
- nxos_bgp_neighbor: &configure4
- asn: 65535
- neighbor: 192.0.2.3/32
- vrf: "{{ item }}"
- description: "tested by ansible"
- remove_private_as: "{{remove_private_asr|default(omit)}}"
- state: present
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp_neighbor: *configure4
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *false
-
- - name: "Remove BGP"
- nxos_bgp_neighbor: *remove
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Configure BGP neighbor 3des password"
- nxos_bgp_neighbor: &configure_3des_password
- asn: 65535
- neighbor: 192.0.2.3/32
- vrf: "{{ item }}"
- remote_as: 30
- pwd: '386c0565965f89de'
- pwd_type: 3des
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp_neighbor: *configure_3des_password
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *false
-
- - name: "Remove BGP"
- nxos_bgp_neighbor: *remove
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Configure BGP neighbor type 7 password"
- nxos_bgp_neighbor: &configure_type7_password
- asn: 65535
- neighbor: 192.0.2.3/32
- vrf: "{{ item }}"
- remote_as: 30
- pwd: '386c0565965f89de'
- pwd_type: cisco_type_7
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp_neighbor: *configure_type7_password
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *false
-
- - name: "Remove BGP neighbor password"
- nxos_bgp_neighbor: &remove_password
- asn: 65535
- neighbor: 192.0.2.3/32
- vrf: "{{ item }}"
- remote_as: 30
- pwd: default
- pwd_type: default
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp_neighbor: *remove_password
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *false
-
- - name: "Remove BGP"
- nxos_bgp_neighbor: *remove
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Configure BGP neighbor transport type passive"
- nxos_bgp_neighbor: &configure_transport_passive
- asn: 65535
- neighbor: 192.0.2.3
- vrf: "{{ item }}"
- remote_as: 30
- transport_passive_only: true
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp_neighbor: *configure_transport_passive
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *false
-
- - name: "Configure BGP neighbor transport type default"
- nxos_bgp_neighbor: &configure_transport_default
- asn: 65535
- neighbor: 192.0.2.3
- vrf: "{{ item }}"
- remote_as: 30
- transport_passive_only: false
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp_neighbor: *configure_transport_default
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *false
-
- - name: "Remove BGP"
- nxos_bgp_neighbor: &removenp
- asn: 65535
- neighbor: 192.0.2.3
- vrf: "{{ item }}"
- state: absent
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp_neighbor: *removenp
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *false
-
- - name: "Configure BFD enable"
- nxos_bgp_neighbor: &bfd_enable
- asn: 65535
- neighbor: 192.168.1.1
- bfd: enable
- state: present
- register: result
-
- - assert: *true
-
- - name: Check BFD enable Idempotence
- nxos_bgp_neighbor: *bfd_enable
- register: result
-
- - assert: *false
-
- - name: Configure BFD disable Idempotence
- nxos_bgp_neighbor: &bfd_disable
- asn: 65535
- neighbor: 192.168.1.1
- bfd: disable
- state: present
- register: result
-
- - assert: *true
-
- - name: Check BFD disable Idempotence
- nxos_bgp_neighbor: *bfd_disable
- register: result
-
- - assert: *false
-
- always:
- - name: "Teardown: Disable features"
- nxos_feature:
- feature: "{{ item }}"
- state: disabled
- loop: ['bgp', 'bfd']
- ignore_errors: yes
-
-- debug: msg="END connection={{ ansible_connection }} nxos_bgp_neighbor sanity test"
diff --git a/test/integration/targets/nxos_bgp_neighbor_af/defaults/main.yaml b/test/integration/targets/nxos_bgp_neighbor_af/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_bgp_neighbor_af/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_bgp_neighbor_af/meta/main.yml b/test/integration/targets/nxos_bgp_neighbor_af/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_bgp_neighbor_af/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_bgp_neighbor_af/tasks/cli.yaml b/test/integration/targets/nxos_bgp_neighbor_af/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_bgp_neighbor_af/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_bgp_neighbor_af/tasks/main.yaml b/test/integration/targets/nxos_bgp_neighbor_af/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_bgp_neighbor_af/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_bgp_neighbor_af/tasks/nxapi.yaml b/test/integration/targets/nxos_bgp_neighbor_af/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_bgp_neighbor_af/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_bgp_neighbor_af/tests/common/sanity.yaml b/test/integration/targets/nxos_bgp_neighbor_af/tests/common/sanity.yaml
deleted file mode 100644
index 19594e7321..0000000000
--- a/test/integration/targets/nxos_bgp_neighbor_af/tests/common/sanity.yaml
+++ /dev/null
@@ -1,288 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_bgp_neighbor_af sanity test"
-
-- set_fact: soft_reconfiguration_ina="always"
- when: imagetag is not search("D1|N1")
-
-- name: "Disable feature BGP"
- nxos_feature: &disable_bgp
- feature: bgp
- state: disabled
- ignore_errors: yes
-
-- name: "Enable feature BGP"
- nxos_feature:
- feature: bgp
- state: enabled
- ignore_errors: yes
-
-- block:
- - name: "Configure BGP neighbor address-family"
- nxos_bgp_neighbor_af: &configure1
- asn: 65535
- neighbor: '192.0.2.3'
- afi: ipv4
- safi: unicast
- additional_paths_receive: 'enable'
- additional_paths_send: 'enable'
- advertise_map_exist: ['ansible_rm', 'my_exist_map']
- allowas_in: True
- default_originate: True
- disable_peer_as_check: True
- filter_list_in: 'my_filter_list_in'
- filter_list_out: 'my_filter_list_out'
- max_prefix_limit: 100
- max_prefix_threshold: 50
- max_prefix_warning: 'true'
- next_hop_self: True
- next_hop_third_party: False
- prefix_list_in: 'pfx_in'
- prefix_list_out: 'pfx_out'
- send_community: 'both'
- soft_reconfiguration_in: 'enable'
- suppress_inactive: True
- unsuppress_map: 'unsup_map'
- weight: '30'
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Check Idempotence"
- nxos_bgp_neighbor_af: *configure1
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: "Configure BGP neighbor address-family def1"
- nxos_bgp_neighbor_af: &configure_def1
- asn: 65535
- neighbor: '192.0.2.3'
- afi: ipv4
- safi: unicast
- additional_paths_receive: 'inherit'
- additional_paths_send: 'inherit'
- advertise_map_exist: default
- allowas_in: False
- default_originate: False
- disable_peer_as_check: False
- filter_list_in: default
- filter_list_out: default
- max_prefix_limit: default
- max_prefix_threshold: default
- max_prefix_warning: False
- next_hop_self: False
- next_hop_third_party: False
- prefix_list_in: default
- prefix_list_out: default
- send_community: 'none'
- soft_reconfiguration_in: 'inherit'
- suppress_inactive: False
- unsuppress_map: default
- weight: default
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp_neighbor_af: *configure_def1
- register: result
-
- - assert: *false
-
- - name: "Setup: Remove BGP config"
- nxos_bgp_neighbor_af: &removenaf
- asn: 65535
- neighbor: '192.0.2.3'
- afi: ipv4
- safi: unicast
- state: absent
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp_neighbor_af: *removenaf
- register: result
-
- - assert: *false
-
- - name: "Configure BGP neighbor address-family"
- nxos_bgp_neighbor_af: &configure2
- asn: 65535
- neighbor: '192.0.2.3'
- afi: ipv4
- safi: unicast
- allowas_in_max: '5'
- advertise_map_non_exist: ['ansible_rm', 'my_non_exist_map']
- default_originate_route_map: 'my_route_map'
- max_prefix_limit: 100
- max_prefix_interval: 30
- max_prefix_threshold: 50
- route_map_in: 'rm_in'
- route_map_out: 'rm_out'
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp_neighbor_af: *configure2
- register: result
-
- - assert: *false
-
- - name: "Configure BGP neighbor address-family def2"
- nxos_bgp_neighbor_af: &configure_def2
- asn: 65535
- neighbor: '192.0.2.3'
- afi: ipv4
- safi: unicast
- allowas_in_max: default
- advertise_map_non_exist: default
- default_originate_route_map: default
- max_prefix_limit: default
- max_prefix_interval: default
- max_prefix_threshold: default
- route_map_in: default
- route_map_out: default
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp_neighbor_af: *configure_def2
- register: result
-
- - assert: *false
-
- - name: "Setup: Remove BGP config"
- nxos_bgp_neighbor_af: *removenaf
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp_neighbor_af: *removenaf
- register: result
-
- - assert: *false
-
- - name: "Configure eBGP"
- nxos_bgp_neighbor:
- asn: 65535
- vrf: 'blue'
- neighbor: '192.0.2.3'
- remote_as: 2
-
- - name: "Configure BGP neighbor 3"
- nxos_bgp_neighbor_af: &configure3
- asn: 65535
- vrf: 'blue'
- neighbor: '192.0.2.3'
- afi: ipv4
- safi: unicast
- additional_paths_receive: 'disable'
- additional_paths_send: 'disable'
- as_override: 'true'
- send_community: 'standard'
- soft_reconfiguration_in: "{{soft_reconfiguration_ina|default(omit)}}"
- soo: '3:3'
- next_hop_third_party: True
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp_neighbor_af: *configure3
- register: result
-
- - assert: *false
-
- - name: "Configure BGP neighbor def3"
- nxos_bgp_neighbor_af: &configure_def3
- asn: 65535
- vrf: 'blue'
- neighbor: '192.0.2.3'
- afi: ipv4
- safi: unicast
- additional_paths_receive: 'inherit'
- additional_paths_send: 'inherit'
- as_override: False
- send_community: default
- soo: default
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp_neighbor_af: *configure_def3
- register: result
-
- - assert: *false
-
- - name: "Setup: Remove BGP config"
- nxos_bgp: &remove
- asn: 65535
- state: absent
- register: result
-
- - assert: *true
-
- - name: "Configure BGP neighbor af route_reflector_client"
- nxos_bgp_neighbor:
- asn: 65535
- neighbor: '192.0.2.2'
- remote_as: 65535
-
- - name: "Configure BGP neighbor 4"
- nxos_bgp_neighbor_af: &configure4
- asn: 65535
- neighbor: '192.0.2.2'
- afi: ipv4
- safi: unicast
- route_reflector_client: 'true'
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp_neighbor_af: *configure4
- register: result
-
- - assert: *false
-
- - name: "Configure BGP neighbor def4"
- nxos_bgp_neighbor_af: &configure_def4
- asn: 65535
- neighbor: '192.0.2.2'
- afi: ipv4
- safi: unicast
- route_reflector_client: False
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_bgp_neighbor_af: *configure_def4
- register: result
-
- - assert: *false
-
- always:
- - name: "Cleanup BGP"
- nxos_bgp: *remove
- ignore_errors: yes
-
- - name: "Disable feature bgp"
- nxos_feature: *disable_bgp
-
- - debug: msg="END connection={{ ansible_connection }} nxos_bgp_neighbor_af sanity test"
diff --git a/test/integration/targets/nxos_command/defaults/main.yaml b/test/integration/targets/nxos_command/defaults/main.yaml
deleted file mode 100644
index 9ef5ba5165..0000000000
--- a/test/integration/targets/nxos_command/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "*"
-test_items: []
diff --git a/test/integration/targets/nxos_command/meta/main.yml b/test/integration/targets/nxos_command/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_command/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_command/tasks/cli.yaml b/test/integration/targets/nxos_command/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_command/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_command/tasks/main.yaml b/test/integration/targets/nxos_command/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_command/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_command/tasks/nxapi.yaml b/test/integration/targets/nxos_command/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_command/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_command/tests/cli/cli_command.yaml b/test/integration/targets/nxos_command/tests/cli/cli_command.yaml
deleted file mode 100644
index 3fd3807e13..0000000000
--- a/test/integration/targets/nxos_command/tests/cli/cli_command.yaml
+++ /dev/null
@@ -1,26 +0,0 @@
----
-- debug:
- msg: "START cli/cli_command.yaml on connection={{ ansible_connection }}"
-
-- 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"
-
-- debug: msg="END cli/cli_command.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_command/tests/cli/contains.yaml b/test/integration/targets/nxos_command/tests/cli/contains.yaml
deleted file mode 100644
index bb6868af30..0000000000
--- a/test/integration/targets/nxos_command/tests/cli/contains.yaml
+++ /dev/null
@@ -1,18 +0,0 @@
----
-- debug: msg="START common/contains.yaml on connection={{ ansible_connection }}"
-
-- name: test contains operator
- nxos_command:
- commands:
- - show version
- - show interface mgmt0 | json
- wait_for:
- - "result[0] contains NX-OS"
- - "result[1].TABLE_interface.ROW_interface.interface contains mgmt"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- debug: msg="END common/contains.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_command/tests/cli/sanity.yaml b/test/integration/targets/nxos_command/tests/cli/sanity.yaml
deleted file mode 100644
index 8bc723d687..0000000000
--- a/test/integration/targets/nxos_command/tests/cli/sanity.yaml
+++ /dev/null
@@ -1,66 +0,0 @@
----
-- debug: msg="START cli/sanity.yaml on connection={{ ansible_connection }}"
-
-- name: "Disable feature BGP"
- nxos_feature:
- feature: bgp
- state: disabled
-
-- block:
- - name: "Run show running-config bgp - should fail"
- nxos_command:
- commands:
- - sh running-config bgp
- ignore_errors: yes
- register: result
-
- - assert: &fail
- that:
- - "result.failed == true"
-
- - name: "Enable feature BGP"
- nxos_feature:
- feature: bgp
- state: enabled
-
- - name: "Configure BGP defaults"
- nxos_bgp: &configure_default
- asn: 65535
- router_id: 192.0.2.1
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Run show running-config bgp - should pass"
- nxos_command:
- commands:
- - sh running-config bgp
- register: result
-
- - assert:
- that:
- - "result.failed == false"
- - "'65535' in result.stdout[0]"
-
- - name: "Run an invalid command - should fail"
- nxos_command:
- commands:
- - show interface bief
- ignore_errors: yes
- register: result
-
- - assert: *fail
-
- rescue:
- - debug: msg="nxos_command sanity test failure detected"
-
- always:
- - name: "Disable feature bgp"
- nxos_feature:
- feature: bgp
- state: disabled
-
-- debug: msg="END cli/sanity.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_command/tests/common/bad_operator.yaml b/test/integration/targets/nxos_command/tests/common/bad_operator.yaml
deleted file mode 100644
index 6a3659093f..0000000000
--- a/test/integration/targets/nxos_command/tests/common/bad_operator.yaml
+++ /dev/null
@@ -1,19 +0,0 @@
----
-- debug: msg="START common/bad_operator.yaml on connection={{ ansible_connection }}"
-
-- name: test bad operator
- nxos_command:
- commands:
- - show version
- - show interface mgmt0 | json
- wait_for:
- - "result[1].TABLE_interface.ROW_interface.state foo up"
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - "result.failed == true"
- - "result.msg is defined"
-
-- debug: msg="END common/bad_operator.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_command/tests/common/equal.yaml b/test/integration/targets/nxos_command/tests/common/equal.yaml
deleted file mode 100644
index a81eb3c5c7..0000000000
--- a/test/integration/targets/nxos_command/tests/common/equal.yaml
+++ /dev/null
@@ -1,30 +0,0 @@
----
-- debug: msg="START common/equal.yaml on connection={{ ansible_connection }}"
-
-- name: test eq operator
- nxos_command:
- commands:
- - show version
- - show interface mgmt0 | json
- wait_for:
- - "result[1].TABLE_interface.ROW_interface.state eq up"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: test == operator
- nxos_command:
- commands:
- - show version
- - show interface mgmt0 | json
- wait_for:
- - "result[1].TABLE_interface.ROW_interface.state == up"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- debug: msg="END common/equal.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_command/tests/common/greaterthan.yaml b/test/integration/targets/nxos_command/tests/common/greaterthan.yaml
deleted file mode 100644
index 0b8db6a90b..0000000000
--- a/test/integration/targets/nxos_command/tests/common/greaterthan.yaml
+++ /dev/null
@@ -1,30 +0,0 @@
----
-- debug: msg="START common/greaterthan.yaml on connection={{ ansible_connection }}"
-
-- name: test gt operator
- nxos_command:
- commands:
- - show version
- - show interface mgmt0 | json
- wait_for:
- - "result[1].TABLE_interface.ROW_interface.eth_ip_mask gt 0"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: test > operator
- nxos_command:
- commands:
- - show version
- - show interface mgmt0 | json
- wait_for:
- - "result[1].TABLE_interface.ROW_interface.eth_ip_mask > 0"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- debug: msg="END common/greaterthan.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_command/tests/common/greaterthanorequal.yaml b/test/integration/targets/nxos_command/tests/common/greaterthanorequal.yaml
deleted file mode 100644
index 3e0c27ca73..0000000000
--- a/test/integration/targets/nxos_command/tests/common/greaterthanorequal.yaml
+++ /dev/null
@@ -1,30 +0,0 @@
----
-- debug: msg="START common/greaterthanorequal.yaml on connection={{ ansible_connection }}"
-
-- name: test ge operator
- nxos_command:
- commands:
- - show version
- - show interface mgmt0 | json
- wait_for:
- - "result[1].TABLE_interface.ROW_interface.eth_ip_mask ge 0"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: test >= operator
- nxos_command:
- commands:
- - show version
- - show interface mgmt0 | json
- wait_for:
- - "result[1].TABLE_interface.ROW_interface.eth_ip_mask >= 0"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- debug: msg="END common/greaterthanorequal.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_command/tests/common/invalid.yaml b/test/integration/targets/nxos_command/tests/common/invalid.yaml
deleted file mode 100644
index 6532a5eae0..0000000000
--- a/test/integration/targets/nxos_command/tests/common/invalid.yaml
+++ /dev/null
@@ -1,26 +0,0 @@
----
-- debug: msg="START common/invalid.yaml on connection={{ ansible_connection }}"
-
-- name: run invalid command
- nxos_command:
- commands: ['show foo']
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - "result.failed == true"
-
-- name: run commands that include invalid command
- nxos_command:
- commands:
- - show version
- - show foo
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - "result.failed == true"
-
-- debug: msg="END common/invalid.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_command/tests/common/lessthan.yaml b/test/integration/targets/nxos_command/tests/common/lessthan.yaml
deleted file mode 100644
index 7d9509b649..0000000000
--- a/test/integration/targets/nxos_command/tests/common/lessthan.yaml
+++ /dev/null
@@ -1,30 +0,0 @@
----
-- debug: msg="START common/lessthan.yaml on connection={{ ansible_connection }}"
-
-- name: test lt operator
- nxos_command:
- commands:
- - show version
- - show interface mgmt0 | json
- wait_for:
- - "result[1].TABLE_interface.ROW_interface.eth_ip_mask lt 33"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: test < operator
- nxos_command:
- commands:
- - show version
- - show interface mgmt0 | json
- wait_for:
- - "result[1].TABLE_interface.ROW_interface.eth_ip_mask lt 33"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- debug: msg="END common/lessthan.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_command/tests/common/lessthanorequal.yaml b/test/integration/targets/nxos_command/tests/common/lessthanorequal.yaml
deleted file mode 100644
index 70d0f63662..0000000000
--- a/test/integration/targets/nxos_command/tests/common/lessthanorequal.yaml
+++ /dev/null
@@ -1,30 +0,0 @@
----
-- debug: msg="START common/lessthanorequal.yaml on connection={{ ansible_connection }}"
-
-- name: test le operator
- nxos_command:
- commands:
- - show version
- - show interface mgmt0 | json
- wait_for:
- - "result[1].TABLE_interface.ROW_interface.eth_ip_mask le 32"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: test <= operator
- nxos_command:
- commands:
- - show version
- - show interface mgmt0 | json
- wait_for:
- - "result[1].TABLE_interface.ROW_interface.eth_ip_mask <= 32"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- debug: msg="END common/lessthanorequal.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_command/tests/common/not_comparison_operator.yaml b/test/integration/targets/nxos_command/tests/common/not_comparison_operator.yaml
deleted file mode 100644
index b24ffb1c65..0000000000
--- a/test/integration/targets/nxos_command/tests/common/not_comparison_operator.yaml
+++ /dev/null
@@ -1,18 +0,0 @@
----
-- debug: msg="START common/not_comparison_operator.yaml on connection={{ ansible_connection }}"
-
-- name: test 'not' keyword in wait_for
- nxos_command:
- commands:
- - show version
- wait_for:
- - "result[0] not contains QWERTYQWERTYQWERTY"
- - "result[0] == not QWERTYQWERTYQWERTY"
- - "result[0] matches not QWERTYQWERTYQWERTY"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- debug: msg="END common/not_comparison_operator.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_command/tests/common/notequal.yaml b/test/integration/targets/nxos_command/tests/common/notequal.yaml
deleted file mode 100644
index 14f38431b2..0000000000
--- a/test/integration/targets/nxos_command/tests/common/notequal.yaml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-- debug: msg="START common/notequal.yaml on connection={{ ansible_connection }}"
-
-- name: test neq operator
- nxos_command:
- commands:
- - show version
- - show interface mgmt0 | json
- wait_for:
- - "result[1].TABLE_interface.ROW_interface.state neq down"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
-
-- name: test != operator
- nxos_command:
- commands:
- - show version
- - show interface mgmt0 | json
- wait_for:
- - "result[1].TABLE_interface.ROW_interface.state != down"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
-
-- debug: msg="END common/notequal.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_command/tests/common/output.yaml b/test/integration/targets/nxos_command/tests/common/output.yaml
deleted file mode 100644
index e8ee7ed9bb..0000000000
--- a/test/integration/targets/nxos_command/tests/common/output.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-- debug: msg="START common/output.yaml on connection={{ ansible_connection }}"
-
-- name: get output for single command
- nxos_command:
- commands: ['show version']
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: get output for multiple commands
- nxos_command:
- commands:
- - show version
- - show interface
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- debug: msg="END common/output.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_command/tests/common/timeout.yaml b/test/integration/targets/nxos_command/tests/common/timeout.yaml
deleted file mode 100644
index a190b27be2..0000000000
--- a/test/integration/targets/nxos_command/tests/common/timeout.yaml
+++ /dev/null
@@ -1,18 +0,0 @@
----
-- debug: msg="START common/timeout.yaml on connection={{ ansible_connection }}"
-
-- name: test bad condition
- nxos_command:
- commands:
- - show version
- 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 common/timeout.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_command/tests/nxapi/contains.yaml b/test/integration/targets/nxos_command/tests/nxapi/contains.yaml
deleted file mode 100644
index 2737af1bfa..0000000000
--- a/test/integration/targets/nxos_command/tests/nxapi/contains.yaml
+++ /dev/null
@@ -1,18 +0,0 @@
----
-- debug: msg="START common/contains.yaml on connection={{ ansible_connection }}"
-
-- name: test contains operator
- nxos_command:
- commands:
- - { command: 'show version', output: 'text' }
- - { command: 'show interface mgmt0', output: 'json' }
- wait_for:
- - "result[0] contains NX-OS"
- - "result[1].TABLE_interface.ROW_interface.interface contains mgmt"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- debug: msg="END common/contains.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_command/tests/nxapi/sanity.yaml b/test/integration/targets/nxos_command/tests/nxapi/sanity.yaml
deleted file mode 100644
index bff006a4c1..0000000000
--- a/test/integration/targets/nxos_command/tests/nxapi/sanity.yaml
+++ /dev/null
@@ -1,66 +0,0 @@
----
-- debug: msg="START nxapi/sanity.yaml on connection={{ ansible_connection }}"
-
-- name: "Disable feature BGP"
- nxos_feature:
- feature: bgp
- state: disabled
-
-- block:
- - name: "Run show running-config bgp - should fail"
- nxos_command:
- commands:
- - sh running-config bgp
- ignore_errors: yes
- register: result
-
- - assert: &fail
- that:
- - "result.failed == true"
-
- - name: "Enable feature BGP"
- nxos_feature:
- feature: bgp
- state: enabled
-
- - name: "Configure BGP defaults"
- nxos_bgp: &configure_default
- asn: 65535
- router_id: 192.0.2.1
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Run show running-config bgp - should pass"
- nxos_command:
- commands:
- - sh running-config bgp
- register: result
-
- - assert:
- that:
- - "result.failed == false"
- - "'65535' in result.stdout[0]|to_json"
-
- - name: "Run an invalid command - should fail"
- nxos_command:
- commands:
- - show interface bief
- ignore_errors: yes
- register: result
-
- - assert: *fail
-
- rescue:
- - debug: msg="nxos_command sanity test failure detected"
-
- always:
- - name: "Disable feature bgp"
- nxos_feature:
- feature: bgp
- state: disabled
-
-- debug: msg="END nxapi/sanity.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_config/defaults/main.yaml b/test/integration/targets/nxos_config/defaults/main.yaml
deleted file mode 100644
index 9ef5ba5165..0000000000
--- a/test/integration/targets/nxos_config/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "*"
-test_items: []
diff --git a/test/integration/targets/nxos_config/meta/main.yml b/test/integration/targets/nxos_config/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_config/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_config/tasks/cli.yaml b/test/integration/targets/nxos_config/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_config/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_config/tasks/cli_config.yaml b/test/integration/targets/nxos_config/tasks/cli_config.yaml
deleted file mode 100644
index f5d5b551fb..0000000000
--- a/test/integration/targets/nxos_config/tasks/cli_config.yaml
+++ /dev/null
@@ -1,16 +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 case (connection=network_cli)
- include: "{{ test_case_to_run }} ansible_connection=network_cli"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_config/tasks/main.yaml b/test/integration/targets/nxos_config/tasks/main.yaml
deleted file mode 100644
index f882511828..0000000000
--- a/test/integration/targets/nxos_config/tasks/main.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
----
-# Some of the tests in this suite change the hostname to switch.
-# This block/always ensures the hostname gets changed back to
-# the correct name.
-- block:
- - { include: cli.yaml, tags: ['cli'] }
- - { include: nxapi.yaml, tags: ['nxapi'] }
- - { include: cli_config.yaml, tags: ['cli_config'] }
-
- always:
- - name: "Change hostname back to {{ inventory_hostname_short }}"
- nxos_config:
- lines:
- - "hostname {{ inventory_hostname_short }}"
- match: none
diff --git a/test/integration/targets/nxos_config/tasks/nxapi.yaml b/test/integration/targets/nxos_config/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_config/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_config/templates/basic/base_running_config b/test/integration/targets/nxos_config/templates/basic/base_running_config
deleted file mode 100644
index 563371d9d0..0000000000
--- a/test/integration/targets/nxos_config/templates/basic/base_running_config
+++ /dev/null
@@ -1,10 +0,0 @@
-version 7.0(3)I6(1)
-hostname an-nxos9k-02.ansible.com
-vdc an-nxos9k-02 id 1
- limit-resource vlan minimum 16 maximum 4094
- limit-resource vrf minimum 2 maximum 4096
- limit-resource port-channel minimum 0 maximum 511
- limit-resource u4route-mem minimum 96 maximum 96
- limit-resource u6route-mem minimum 24 maximum 24
- limit-resource m4route-mem minimum 58 maximum 58
- limit-resource m6route-mem minimum 8 maximum 8
diff --git a/test/integration/targets/nxos_config/templates/basic/config.j2 b/test/integration/targets/nxos_config/templates/basic/config.j2
deleted file mode 100644
index 5c79ec8c24..0000000000
--- a/test/integration/targets/nxos_config/templates/basic/config.j2
+++ /dev/null
@@ -1,4 +0,0 @@
-interface loopback1
- description this is a test
- shutdown
-
diff --git a/test/integration/targets/nxos_config/templates/basic/configblock.j2 b/test/integration/targets/nxos_config/templates/basic/configblock.j2
deleted file mode 100644
index ec03c24a22..0000000000
--- a/test/integration/targets/nxos_config/templates/basic/configblock.j2
+++ /dev/null
@@ -1,5 +0,0 @@
-ip access-list test
- 10 permit ip 192.0.2.1/32 any log
- 20 permit ip 192.0.2.2/32 any log
- 30 permit ip 192.0.2.3/32 any log
- 40 permit ip 192.0.2.4/32 any log
diff --git a/test/integration/targets/nxos_config/templates/basic/configexact1.j2 b/test/integration/targets/nxos_config/templates/basic/configexact1.j2
deleted file mode 100644
index ec03c24a22..0000000000
--- a/test/integration/targets/nxos_config/templates/basic/configexact1.j2
+++ /dev/null
@@ -1,5 +0,0 @@
-ip access-list test
- 10 permit ip 192.0.2.1/32 any log
- 20 permit ip 192.0.2.2/32 any log
- 30 permit ip 192.0.2.3/32 any log
- 40 permit ip 192.0.2.4/32 any log
diff --git a/test/integration/targets/nxos_config/templates/basic/configexact2.j2 b/test/integration/targets/nxos_config/templates/basic/configexact2.j2
deleted file mode 100644
index 3fc6800d42..0000000000
--- a/test/integration/targets/nxos_config/templates/basic/configexact2.j2
+++ /dev/null
@@ -1,6 +0,0 @@
-ip access-list test
- 10 permit ip 192.0.2.1/32 any log
- 20 permit ip 192.0.2.2/32 any log
- 30 permit ip 192.0.2.3/32 any log
- 40 permit ip 192.0.2.4/32 any log
- 50 permit ip 192.0.2.5/32 any log
diff --git a/test/integration/targets/nxos_config/templates/basic/configstrict1.j2 b/test/integration/targets/nxos_config/templates/basic/configstrict1.j2
deleted file mode 100644
index 1e7e6f4445..0000000000
--- a/test/integration/targets/nxos_config/templates/basic/configstrict1.j2
+++ /dev/null
@@ -1,6 +0,0 @@
-no ip access-list test
-ip access-list test
- 10 permit ip 192.0.2.1/32 any log
- 20 permit ip 192.0.2.2/32 any log
- 30 permit ip 192.0.2.3/32 any log
- 40 permit ip 192.0.2.4/32 any log
diff --git a/test/integration/targets/nxos_config/templates/basic/intended_running_config b/test/integration/targets/nxos_config/templates/basic/intended_running_config
deleted file mode 100644
index ab96584bf3..0000000000
--- a/test/integration/targets/nxos_config/templates/basic/intended_running_config
+++ /dev/null
@@ -1,10 +0,0 @@
-version 7.0(3)I6(1)
-hostname an-nxos9k-01.ansible.com
-vdc an-nxos9k-01 id 1
- limit-resource vlan minimum 16 maximum 4094
- limit-resource vrf minimum 2 maximum 4096
- limit-resource port-channel minimum 0 maximum 511
- limit-resource u4route-mem minimum 96 maximum 96
- limit-resource u6route-mem minimum 24 maximum 24
- limit-resource m4route-mem minimum 58 maximum 58
- limit-resource m6route-mem minimum 8 maximum 8
diff --git a/test/integration/targets/nxos_config/templates/basic/setupexact.j2 b/test/integration/targets/nxos_config/templates/basic/setupexact.j2
deleted file mode 100644
index 815e003cc6..0000000000
--- a/test/integration/targets/nxos_config/templates/basic/setupexact.j2
+++ /dev/null
@@ -1,7 +0,0 @@
-no ip access-list test
-ip access-list test
- 10 permit ip 192.0.2.1/32 any log
- 20 permit ip 192.0.2.2/32 any log
- 30 permit ip 192.0.2.3/32 any log
- 40 permit ip 192.0.2.4/32 any log
- 50 permit ip 192.0.2.5/32 any log
diff --git a/test/integration/targets/nxos_config/templates/basic/setupstrict.j2 b/test/integration/targets/nxos_config/templates/basic/setupstrict.j2
deleted file mode 100644
index 815e003cc6..0000000000
--- a/test/integration/targets/nxos_config/templates/basic/setupstrict.j2
+++ /dev/null
@@ -1,7 +0,0 @@
-no ip access-list test
-ip access-list test
- 10 permit ip 192.0.2.1/32 any log
- 20 permit ip 192.0.2.2/32 any log
- 30 permit ip 192.0.2.3/32 any log
- 40 permit ip 192.0.2.4/32 any log
- 50 permit ip 192.0.2.5/32 any log
diff --git a/test/integration/targets/nxos_config/templates/config.js b/test/integration/targets/nxos_config/templates/config.js
deleted file mode 100644
index d2ec0c0c71..0000000000
--- a/test/integration/targets/nxos_config/templates/config.js
+++ /dev/null
@@ -1,4 +0,0 @@
-interface Ethernet2/5
- description test description from ansible
- shutdown
-
diff --git a/test/integration/targets/nxos_config/templates/defaults/config.j2 b/test/integration/targets/nxos_config/templates/defaults/config.j2
deleted file mode 100644
index df0cac701c..0000000000
--- a/test/integration/targets/nxos_config/templates/defaults/config.j2
+++ /dev/null
@@ -1,4 +0,0 @@
-interface Ethernet2/5
- description this is a test
- no shutdown
-
diff --git a/test/integration/targets/nxos_config/templates/defaults/test.j2 b/test/integration/targets/nxos_config/templates/defaults/test.j2
deleted file mode 100644
index 9705ee1494..0000000000
--- a/test/integration/targets/nxos_config/templates/defaults/test.j2
+++ /dev/null
@@ -1,4 +0,0 @@
-interface Ethernet2/5
- description this is a test
- shutdown
-
diff --git a/test/integration/targets/nxos_config/tests/cli/diff.yaml b/test/integration/targets/nxos_config/tests/cli/diff.yaml
deleted file mode 100644
index 21c164bd73..0000000000
--- a/test/integration/targets/nxos_config/tests/cli/diff.yaml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-- debug: msg="START cli/diff.yaml on connection={{ ansible_connection }}"
-
-- name: setup hostname
- nxos_config:
- lines: hostname switch
-
-- name: nxos_config diff against retrieved config
- nxos_config:
- diff_against: intended
- intended_config: "{{ lookup('file', '{{ role_path }}/templates/basic/intended_running_config') }}"
- diff: true
- register: result
-
-- assert:
- that:
- - "'hostname an-nxos9k-01.ansible.com' in result['diff']['after']"
- - "'hostname switch' in result['diff']['before']"
-
-- name: nxos_config diff against provided running_config
- nxos_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-nxos9k-01.ansible.com' in result['diff']['after']"
- - "'hostname an-nxos9k-02.ansible.com' in result['diff']['before']"
-
-- debug: msg="END cli/diff.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_config/tests/cli/multilevel.yaml b/test/integration/targets/nxos_config/tests/cli/multilevel.yaml
deleted file mode 100644
index c40624be79..0000000000
--- a/test/integration/targets/nxos_config/tests/cli/multilevel.yaml
+++ /dev/null
@@ -1,52 +0,0 @@
----
-- debug: msg="START cli/mulitlevel.yaml"
-
-- name: get config
- nxos_command:
- commands: show running-config
- register: config
-
-- name: enable feature bgp
- nxos_config:
- lines: feature bgp
- when: "'feature bgp' not in config.stdout[0]"
-
-- name: remove bgp
- nxos_config:
- lines: no router bgp 1
- when: "'router bgp 1' in config.stdout[0]"
-
-- name: configure multi level command
- nxos_config:
- lines: maximum-paths 14
- parents:
- - router bgp 1
- - address-family ipv4 unicast
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'router bgp 1' in result.updates"
- - "'address-family ipv4 unicast' in result.updates"
- - "'maximum-paths 14' in result.updates"
-
-- name: check multi level command
- nxos_config:
- lines: maximum-paths 14
- parents:
- - router bgp 1
- - address-family ipv4 unicast
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- nxos_config:
- lines:
- - no feature bgp
- match: none
-
-- debug: msg="END cli/mulitlevel.yaml"
diff --git a/test/integration/targets/nxos_config/tests/cli/sublevel.yaml b/test/integration/targets/nxos_config/tests/cli/sublevel.yaml
deleted file mode 100644
index 9e186d514c..0000000000
--- a/test/integration/targets/nxos_config/tests/cli/sublevel.yaml
+++ /dev/null
@@ -1,36 +0,0 @@
----
-- debug: msg='START cli/sublevel.yaml'
-
-- name: setup
- nxos_config:
- lines: no ip access-list test
- match: none
-
-- name: configure sub level command
- nxos_config:
- lines: 10 permit ip any any log
- parents: ip access-list test
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'ip access-list test' in result.updates"
- - "'10 permit ip any any log' in result.updates"
-
-- name: configure sub level command idempotent check
- nxos_config:
- lines: 10 permit ip any any log
- parents: ip access-list test
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- nxos_config:
- lines: no ip access-list test
- match: none
-
-- debug: msg='END cli/sublevel.yaml'
diff --git a/test/integration/targets/nxos_config/tests/cli/sublevel_exact.yaml b/test/integration/targets/nxos_config/tests/cli/sublevel_exact.yaml
deleted file mode 100644
index 820d9ab926..0000000000
--- a/test/integration/targets/nxos_config/tests/cli/sublevel_exact.yaml
+++ /dev/null
@@ -1,58 +0,0 @@
----
-- debug: msg='START cli/sublevel_exact.yaml'
-
-- name: setup
- nxos_config:
- commands:
- - 10 permit ip 192.0.2.1/32 any log
- - 20 permit ip 192.0.2.2/32 any log
- - 30 permit ip 192.0.2.3/32 any log
- - 40 permit ip 192.0.2.4/32 any log
- - 50 permit ip 192.0.2.5/32 any log
- parents: ip access-list test
- before: no ip access-list test
- match: none
-
-- name: configure sub level command using exact match
- nxos_config:
- commands:
- - 10 permit ip 192.0.2.1/32 any log
- - 20 permit ip 192.0.2.2/32 any log
- - 30 permit ip 192.0.2.3/32 any log
- - 40 permit ip 192.0.2.4/32 any log
- parents: ip access-list test
- match: exact
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'ip access-list test' in result.updates"
- - "'10 permit ip 192.0.2.1/32 any log' in result.updates"
- - "'20 permit ip 192.0.2.2/32 any log' in result.updates"
- - "'30 permit ip 192.0.2.3/32 any log' in result.updates"
- - "'40 permit ip 192.0.2.4/32 any log' in result.updates"
- - "'50 permit ip 192.0.2.5/32 any log' not in result.updates"
-
-- name: check sub level command using exact match
- nxos_config:
- lines:
- - 10 permit ip 192.0.2.1/32 any log
- - 20 permit ip 192.0.2.2/32 any log
- - 30 permit ip 192.0.2.3/32 any log
- - 40 permit ip 192.0.2.4/32 any log
- - 50 permit ip 192.0.2.5/32 any log
- parents: ip access-list test
- match: exact
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- nxos_config:
- lines: no ip access-list test
- match: none
-
-- debug: msg='END cli/sublevel_exact.yaml'
diff --git a/test/integration/targets/nxos_config/tests/cli/sublevel_strict.yaml b/test/integration/targets/nxos_config/tests/cli/sublevel_strict.yaml
deleted file mode 100644
index a50bd107ab..0000000000
--- a/test/integration/targets/nxos_config/tests/cli/sublevel_strict.yaml
+++ /dev/null
@@ -1,59 +0,0 @@
----
-- debug: msg='START cli/sublevel_strict.yaml'
-
-- name: setup
- nxos_config:
- commands:
- - 10 permit ip 192.0.2.1/32 any log
- - 20 permit ip 192.0.2.2/32 any log
- - 30 permit ip 192.0.2.3/32 any log
- - 40 permit ip 192.0.2.4/32 any log
- - 50 permit ip 192.0.2.5/32 any log
- parents: ip access-list test
- before: no ip access-list test
- match: none
-
-- name: configure sub level command using strict match
- nxos_config:
- lines:
- - 10 permit ip 192.0.2.1/32 any log
- - 30 permit ip 192.0.2.3/32 any log
- - 20 permit ip 192.0.2.2/32 any log
- - 40 permit ip 192.0.2.4/32 any log
- parents: ip access-list test
- before: no ip access-list test
- match: strict
- replace: block
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'ip access-list test' in result.updates"
- - "'10 permit ip 192.0.2.1/32 any log' in result.updates"
- - "'20 permit ip 192.0.2.2/32 any log' in result.updates"
- - "'30 permit ip 192.0.2.3/32 any log' in result.updates"
- - "'40 permit ip 192.0.2.4/32 any log' in result.updates"
- - "'50 permit ip 192.0.2.5/32 any log' not in result.updates"
-
-- name: check sub level command using strict match
- nxos_config:
- lines:
- - 10 permit ip 192.0.2.1/32 any log
- - 20 permit ip 192.0.2.2/32 any log
- - 30 permit ip 192.0.2.3/32 any log
- - 40 permit ip 192.0.2.4/32 any log
- parents: ip access-list test
- match: strict
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- nxos_config:
- commands: no ip access-list test
- match: none
-
-- debug: msg='END cli/sublevel_strict.yaml'
diff --git a/test/integration/targets/nxos_config/tests/cli/toplevel_after.yaml b/test/integration/targets/nxos_config/tests/cli/toplevel_after.yaml
deleted file mode 100644
index 45bdc66cd3..0000000000
--- a/test/integration/targets/nxos_config/tests/cli/toplevel_after.yaml
+++ /dev/null
@@ -1,40 +0,0 @@
----
-- debug: msg='START cli/toplevel_after.yaml'
-
-- name: setup
- nxos_config:
- lines:
- - "snmp-server contact ansible"
- - "hostname switch"
- match: none
-
-- name: configure top level command with before
- nxos_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
- nxos_config:
- lines: hostname foo
- after: snmp-server contact foo
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- nxos_config:
- lines:
- - "no snmp-server contact"
- - "hostname switch"
- match: none
-
-- debug: msg='END cli/toplevel_after.yaml'
diff --git a/test/integration/targets/nxos_config/tests/cli/toplevel_before.yaml b/test/integration/targets/nxos_config/tests/cli/toplevel_before.yaml
deleted file mode 100644
index f60c43f089..0000000000
--- a/test/integration/targets/nxos_config/tests/cli/toplevel_before.yaml
+++ /dev/null
@@ -1,40 +0,0 @@
----
-- debug: msg='START cli/toplevel_before.yaml'
-
-- name: setup
- nxos_config:
- lines:
- - "snmp-server contact ansible"
- - "hostname switch"
- match: none
-
-- name: configure top level command with before
- nxos_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
- nxos_config:
- lines: hostname foo
- before: snmp-server contact foo
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- nxos_config:
- lines:
- - "no snmp-server contact"
- - "hostname switch"
- match: none
-
-- debug: msg='END cli/toplevel_before.yaml'
diff --git a/test/integration/targets/nxos_config/tests/cli_config/cli_backup.yaml b/test/integration/targets/nxos_config/tests/cli_config/cli_backup.yaml
deleted file mode 100644
index a431c01fde..0000000000
--- a/test/integration/targets/nxos_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/nxos_config/tests/cli_config/cli_basic.yaml b/test/integration/targets/nxos_config/tests/cli_config/cli_basic.yaml
deleted file mode 100644
index 57111467ae..0000000000
--- a/test/integration/targets/nxos_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 loopback1
- no description
- no 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/nxos_config/tests/cli_config/cli_block_replace.yaml b/test/integration/targets/nxos_config/tests/cli_config/cli_block_replace.yaml
deleted file mode 100644
index 5cd710048c..0000000000
--- a/test/integration/targets/nxos_config/tests/cli_config/cli_block_replace.yaml
+++ /dev/null
@@ -1,30 +0,0 @@
----
-- debug: msg="START cli_config/cli_block_replace.yaml on connection={{ ansible_connection }}"
-
-- name: setup - remove configuration
- cli_config: &rm
- config: "no ip access-list test"
- 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: *rm
-
-- debug: msg="END cli_config/cli_block_replace.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_config/tests/cli_config/cli_exact_match.yaml b/test/integration/targets/nxos_config/tests/cli_config/cli_exact_match.yaml
deleted file mode 100644
index 4eb2ee52a9..0000000000
--- a/test/integration/targets/nxos_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 test
- diff_match: none
-
-- debug: msg="END cli_config/cli_exact_match.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_config/tests/cli_config/cli_strict_match.yaml b/test/integration/targets/nxos_config/tests/cli_config/cli_strict_match.yaml
deleted file mode 100644
index c43b093500..0000000000
--- a/test/integration/targets/nxos_config/tests/cli_config/cli_strict_match.yaml
+++ /dev/null
@@ -1,25 +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
- diff_replace: block
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: teardown
- cli_config:
- config: no ip access-list test
- diff_match: none
-
-- debug: msg="END cli_config/cli_strict_match.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_config/tests/common/backup.yaml b/test/integration/targets/nxos_config/tests/common/backup.yaml
deleted file mode 100644
index d7cea3c432..0000000000
--- a/test/integration/targets/nxos_config/tests/common/backup.yaml
+++ /dev/null
@@ -1,126 +0,0 @@
----
-- debug: msg="START common/backup.yaml on connection={{ ansible_connection }}"
-
-# Select interface for test
-- set_fact: intname="{{ nxos_int1 }}"
-
-- name: setup
- nxos_config:
- commands:
- - no description
- - no shutdown
- parents:
- - "interface {{ intname }}"
- match: none
-
-- name: collect any backup files
- find: &backups
- paths: "{{ role_path }}/backup"
- pattern: "{{ inventory_hostname_short }}_config*"
- connection: local
- register: backup_files
-
-- name: delete backup files
- file:
- path: "{{ item.path }}"
- state: absent
- with_items: "{{backup_files.files|default([])}}"
-
-- name: configure device with config
- nxos_config:
- commands:
- - description this is a test
- - shutdown
- parents:
- - "interface {{ intname }}"
- backup: yes
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "result.updates is defined"
-
-- name: collect any backup files
- find: *backups
- connection: local
- register: backup_files
-
-- 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
- nxos_config:
- backup: yes
- backup_options:
- filename: backup.cfg
- dir_path: "{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}"
- 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
- nxos_config:
- backup: yes
- backup_options:
- filename: backup.cfg
- 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
- nxos_config:
- backup: yes
- backup_options:
- dir_path: "{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}"
- 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 common/backup.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_config/tests/common/defaults.yaml b/test/integration/targets/nxos_config/tests/common/defaults.yaml
deleted file mode 100644
index c0a17c2011..0000000000
--- a/test/integration/targets/nxos_config/tests/common/defaults.yaml
+++ /dev/null
@@ -1,50 +0,0 @@
----
-- debug: msg="START common/defaults.yaml on connection={{ ansible_connection }}"
-
-# Select interface for test
-- set_fact: intname="{{ nxos_int1 }}"
-
-- name: setup
- nxos_config:
- commands:
- - no description
- - shutdown
- parents:
- - "interface {{ intname }}"
- match: none
-
-- name: configure device with defaults included
- nxos_config:
- commands:
- - description this is a test
- - no shutdown
- parents:
- - "interface {{ intname }}"
- defaults: yes
- register: result
-
-- debug: var=result
-
-- assert:
- that:
- - "result.changed == true"
- - "result.updates is defined"
-
-- name: check device with defaults included
- nxos_config:
- commands:
- - description this is a test
- - no shutdown
- parents:
- - "interface {{ intname }}"
- defaults: yes
- register: result
-
-- debug: var=result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.updates is not defined"
-
-- debug: msg="END common/defaults.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_config/tests/common/sanity.yaml b/test/integration/targets/nxos_config/tests/common/sanity.yaml
deleted file mode 100644
index 58206d1cf7..0000000000
--- a/test/integration/targets/nxos_config/tests/common/sanity.yaml
+++ /dev/null
@@ -1,71 +0,0 @@
----
-- debug: msg="START common/sanity.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- nxos_config:
- lines: ip access-list test
- match: none
-
-- name: "nxos_config sanity test"
- nxos_config:
- lines:
- - 10 permit ip 192.0.2.1/32 any log
- - 20 permit ip 192.0.2.2/32 any log
- - 30 permit ip 192.0.2.3/32 any log
- - 40 permit ip 192.0.2.4/32 any log
- - 50 permit ip 192.0.2.5/32 any log
- parents: ip access-list test
- before: no ip access-list test
- match: exact
-
-- name: "nxos_config sanity test - replace block"
- nxos_config:
- lines:
- - 10 permit ip 192.0.2.1/32 any log
- - 20 permit ip 192.0.2.2/32 any log
- - 30 permit ip 192.0.2.3/32 any log
- - 40 permit ip 192.0.2.4/32 any log
- parents: ip access-list test
- before: no ip access-list test
- replace: block
-
-- name: teardown
- nxos_config:
- lines: no ip access-list test
- match: none
-
-- debug: msg='Verify https://github.com/ansible/ansible/issues/50635'
-
-- name: PUT INTERFACE INTO DEFAULT STATE
- nxos_config:
- lines:
- - "default interface {{ nxos_int1 }}"
-
-- name: MAKE INTERFACE A SWITCHPORT
- nxos_config:
- lines:
- - switchport
- parents: "interface {{ nxos_int1 }}"
-
-- name: CONFIGURE EDGE TRUNK TYPE
- nxos_config: &config
- lines:
- - description foo
- - switchport access vlan 3333
- - spanning-tree port type edge
- parents: "interface {{ nxos_int1 }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: IDEMPOTENCE CHECK
- nxos_config: *config
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- debug: msg="END common/sanity.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_config/tests/common/save.yaml b/test/integration/targets/nxos_config/tests/common/save.yaml
deleted file mode 100644
index 19e6b7c127..0000000000
--- a/test/integration/targets/nxos_config/tests/common/save.yaml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-- debug: msg="START common/save.yaml on connection={{ ansible_connection }}"
-
-# Select interface for test
-- set_fact: intname="{{ nxos_int1 }}"
-
-- name: setup
- nxos_config:
- commands:
- - no description
- - no shutdown
- parents:
- - "interface {{ intname }}"
- match: none
-
-- name: save config
- nxos_config:
- save_when: always
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: save should always run
- nxos_config:
- save_when: always
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- debug: msg="END common/save.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_config/tests/common/src_basic.yaml b/test/integration/targets/nxos_config/tests/common/src_basic.yaml
deleted file mode 100644
index c8bc469fb9..0000000000
--- a/test/integration/targets/nxos_config/tests/common/src_basic.yaml
+++ /dev/null
@@ -1,38 +0,0 @@
----
-- debug: msg="START common/src_basic.yaml on connection={{ ansible_connection }}"
-
-- set_fact: intname="loopback1"
-
-- name: setup
- nxos_config:
- commands:
- - no description
- - no shutdown
- parents:
- - "interface {{ intname }}"
- match: none
-
-- name: configure device with config
- nxos_config:
- src: basic/config.j2
- defaults: yes
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-# https://github.com/ansible/ansible-modules-core/issues/4807
- - "result.updates is defined"
-
-- name: check device with config
- nxos_config:
- src: basic/config.j2
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-# https://github.com/ansible/ansible-modules-core/issues/4807
- - "result.updates is not defined"
-
-- debug: msg="END common/src_basic.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_config/tests/common/src_invalid.yaml b/test/integration/targets/nxos_config/tests/common/src_invalid.yaml
deleted file mode 100644
index f0e721fc31..0000000000
--- a/test/integration/targets/nxos_config/tests/common/src_invalid.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-- debug: msg="START common/src_invalid.yaml on connection={{ ansible_connection }}"
-
-
-# Defend https://github.com/ansible/ansible-modules-core/issues/4797
-- name: configure with invalid src
- nxos_config:
- src: basic/foobar.j2
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - "result.failed == true"
- - "result.msg == 'path specified in src not found'"
-
-- debug: msg="END common/src_invalid.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_config/tests/common/src_match_none.yaml b/test/integration/targets/nxos_config/tests/common/src_match_none.yaml
deleted file mode 100644
index fd2c2d2644..0000000000
--- a/test/integration/targets/nxos_config/tests/common/src_match_none.yaml
+++ /dev/null
@@ -1,50 +0,0 @@
----
-- debug: msg="START common/src_match_none.yaml on connection={{ ansible_connection }}"
-
-# Select interface for test
-- set_fact: intname="{{ nxos_int1 }}"
-
-- name: setup
- nxos_config:
- commands:
- - no description
- - no shutdown
- parents:
- - "interface {{ intname }}"
- match: none
-
-- name: configure device with config
- nxos_config:
- commands:
- - description this is a test
- - shutdown
- parents:
- - "interface {{ intname }}"
- match: none
- defaults: yes
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-# Defend https://github.com/ansible/ansible-modules-core/issues/4807
- - "result.updates is defined"
-
-- name: check device with config
- nxos_config:
- commands:
- - description this is a test
- - shutdown
- parents:
- - "interface {{ intname }}"
- defaults: yes
- register: result
-
-- assert:
- that:
- # Idempotent test
-# Defend https://github.com/ansible/ansible-modules-core/issues/4807
- - "result.changed == false"
- - "result.updates is not defined"
-
-- debug: msg="END common/src_match_none.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_config/tests/common/sublevel_block.yaml b/test/integration/targets/nxos_config/tests/common/sublevel_block.yaml
deleted file mode 100644
index 3e6c4c2ab2..0000000000
--- a/test/integration/targets/nxos_config/tests/common/sublevel_block.yaml
+++ /dev/null
@@ -1,48 +0,0 @@
----
-- debug: msg='START common/sublevel_block.yaml on connection={{ ansible_connection }}'
-
-- name: setup
- nxos_config: &clear
- lines: no ip access-list test
- match: none
- ignore_errors: yes
-
-- name: configure sub level command using block replace
- nxos_config:
- lines:
- - 10 permit ip 192.0.2.1/32 any log
- - 20 permit ip 192.0.2.2/32 any log
- - 30 permit ip 192.0.2.3/32 any log
- - 40 permit ip 192.0.2.4/32 any log
- parents: ip access-list test
- replace: block
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'ip access-list test' in result.updates"
- - "'10 permit ip 192.0.2.1/32 any log' in result.updates"
- - "'20 permit ip 192.0.2.2/32 any log' in result.updates"
- - "'30 permit ip 192.0.2.3/32 any log' in result.updates"
- - "'40 permit ip 192.0.2.4/32 any log' in result.updates"
-
-- name: check sub level command using block replace
- nxos_config:
- lines:
- - 10 permit ip 192.0.2.1/32 any log
- - 20 permit ip 192.0.2.2/32 any log
- - 30 permit ip 192.0.2.3/32 any log
- - 40 permit ip 192.0.2.4/32 any log
- parents: ip access-list test
- replace: block
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- nxos_config: *clear
-
-- debug: msg='END common/sublevel_block.yaml on connection={{ ansible_connection }}'
diff --git a/test/integration/targets/nxos_config/tests/common/toplevel.yaml b/test/integration/targets/nxos_config/tests/common/toplevel.yaml
deleted file mode 100644
index 3589ea7fdb..0000000000
--- a/test/integration/targets/nxos_config/tests/common/toplevel.yaml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-- debug: msg='START common/toplevel.yaml on connection={{ ansible_connection }}'
-
-- name: setup
- nxos_config:
- lines: hostname switch
- match: none
-
-- name: configure top level command
- nxos_config:
- lines: hostname foo
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'hostname foo' in result.updates"
-
-- name: configure top level command idempotent check
- nxos_config:
- lines: hostname foo
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- nxos_config:
- lines: hostname switch
- match: none
-
-- debug: msg='END common/toplevel.yaml on connection={{ ansible_connection }}'
diff --git a/test/integration/targets/nxos_config/tests/common/toplevel_nonidempotent.yaml b/test/integration/targets/nxos_config/tests/common/toplevel_nonidempotent.yaml
deleted file mode 100644
index c619a7650a..0000000000
--- a/test/integration/targets/nxos_config/tests/common/toplevel_nonidempotent.yaml
+++ /dev/null
@@ -1,35 +0,0 @@
----
-- debug: msg="START common/nonidempotent.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- nxos_config:
- lines: hostname switch
- match: none
-
-- name: configure top level command
- nxos_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
- nxos_config:
- lines: hostname foo
- match: strict
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: teardown
- nxos_config:
- lines: hostname switch
- match: none
-
-- debug: msg="END common/nonidempotent.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_config/tests/nxapi/multilevel.yaml b/test/integration/targets/nxos_config/tests/nxapi/multilevel.yaml
deleted file mode 100644
index 892582559a..0000000000
--- a/test/integration/targets/nxos_config/tests/nxapi/multilevel.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
----
-- debug: msg="START nxapi/mulitlevel.yaml"
-
-- name: setup
- nxos_config:
- lines: feature bgp
- match: none
-
-- name: configure multi level command
- nxos_config:
- lines: maximum-paths 14
- parents:
- - router bgp 1
- - address-family ipv4 unicast
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'router bgp 1' in result.updates"
- - "'address-family ipv4 unicast' in result.updates"
- - "'maximum-paths 14' in result.updates"
-
-- name: test multi level command
- nxos_config:
- lines: maximum-paths 14
- parents:
- - router bgp 1
- - address-family ipv4 unicast
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- nxos_config:
- lines: no feature bgp
- match: none
-
-- debug: msg="END nxapi/mulitlevel.yaml"
diff --git a/test/integration/targets/nxos_config/tests/nxapi/sublevel.yaml b/test/integration/targets/nxos_config/tests/nxapi/sublevel.yaml
deleted file mode 100644
index 05d97670f0..0000000000
--- a/test/integration/targets/nxos_config/tests/nxapi/sublevel.yaml
+++ /dev/null
@@ -1,37 +0,0 @@
----
-- debug: msg="START nxapi/sublevel.yaml"
-
-- name: setup
- nxos_config:
- lines: no ip access-list test
- match: none
- ignore_errors: yes
-
-- name: configure sub level command
- nxos_config:
- lines: 10 permit ip any any log
- parents: ip access-list test
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'ip access-list test' in result.updates"
- - "'10 permit ip any any log' in result.updates"
-
-- name: configure sub level command idempotent check
- nxos_config:
- lines: 10 permit ip any any log
- parents: ip access-list test
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- nxos_config:
- lines: no ip access-list test
- match: none
-
-- debug: msg="END nxapi/sublevel.yaml"
diff --git a/test/integration/targets/nxos_config/tests/nxapi/sublevel_exact.yaml b/test/integration/targets/nxos_config/tests/nxapi/sublevel_exact.yaml
deleted file mode 100644
index c3e4382d99..0000000000
--- a/test/integration/targets/nxos_config/tests/nxapi/sublevel_exact.yaml
+++ /dev/null
@@ -1,59 +0,0 @@
----
-- debug: msg="START nxapi/sublevel_exact.yaml"
-
-- name: setup
- nxos_config:
- lines:
- - 10 permit ip 192.0.2.1/32 any log
- - 20 permit ip 192.0.2.2/32 any log
- - 30 permit ip 192.0.2.3/32 any log
- - 40 permit ip 192.0.2.4/32 any log
- - 50 permit ip 192.0.2.5/32 any log
- parents: ip access-list test
- match: none
- ignore_errors: yes
-
-- name: configure sub level command using exact match
- nxos_config:
- lines:
- - 10 permit ip 192.0.2.1/32 any log
- - 20 permit ip 192.0.2.2/32 any log
- - 30 permit ip 192.0.2.3/32 any log
- - 40 permit ip 192.0.2.4/32 any log
- parents: ip access-list test
- before: no ip access-list test
- match: exact
- replace: block
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'ip access-list test' in result.updates"
- - "'10 permit ip 192.0.2.1/32 any log' in result.updates"
- - "'20 permit ip 192.0.2.2/32 any log' in result.updates"
- - "'30 permit ip 192.0.2.3/32 any log' in result.updates"
- - "'40 permit ip 192.0.2.4/32 any log' in result.updates"
- - "'50 permit ip 192.0.2.5/32 any log' not in result.updates"
-
-- name: check sub level command using exact match
- nxos_config:
- lines:
- - 10 permit ip 192.0.2.1/32 any log
- - 20 permit ip 192.0.2.2/32 any log
- - 30 permit ip 192.0.2.3/32 any log
- - 40 permit ip 192.0.2.4/32 any log
- parents: ip access-list test
- match: exact
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- nxos_config:
- lines: no ip access-list test
- match: none
-
-- debug: msg="END nxapi/sublevel_exact.yaml"
diff --git a/test/integration/targets/nxos_config/tests/nxapi/sublevel_strict.yaml b/test/integration/targets/nxos_config/tests/nxapi/sublevel_strict.yaml
deleted file mode 100644
index 3b0bc378aa..0000000000
--- a/test/integration/targets/nxos_config/tests/nxapi/sublevel_strict.yaml
+++ /dev/null
@@ -1,58 +0,0 @@
----
-- debug: msg="START nxapi/sublevel_strict.yaml"
-
-- name: setup
- nxos_config:
- lines:
- - 10 permit ip 192.0.2.1/32 any log
- - 20 permit ip 192.0.2.2/32 any log
- - 30 permit ip 192.0.2.3/32 any log
- - 40 permit ip 192.0.2.4/32 any log
- - 50 permit ip 192.0.2.5/32 any log
- parents: ip access-list test
- match: none
-
-- name: configure sub level command using strict match
- nxos_config:
- lines:
- - 10 permit ip 192.0.2.1/32 any log
- - 30 permit ip 192.0.2.2/32 any log
- - 20 permit ip 192.0.2.3/32 any log
- - 40 permit ip 192.0.2.4/32 any log
- parents: ip access-list test
- before: no ip access-list test
- match: strict
- replace: block
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'ip access-list test' in result.updates"
- - "'10 permit ip 192.0.2.1/32 any log' in result.updates"
- - "'30 permit ip 192.0.2.2/32 any log' in result.updates"
- - "'20 permit ip 192.0.2.3/32 any log' in result.updates"
- - "'40 permit ip 192.0.2.4/32 any log' in result.updates"
- - "'50 permit ip 192.0.2.5/32 any log' not in result.updates"
-
-- name: check sub level command using strict match
- nxos_config:
- lines:
- - 10 permit ip 192.0.2.1/32 any log
- - 20 permit ip 192.0.2.3/32 any log
- - 30 permit ip 192.0.2.2/32 any log
- - 40 permit ip 192.0.2.4/32 any log
- parents: ip access-list test
- match: strict
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- nxos_config:
- lines: no ip access-list test
- match: none
-
-- debug: msg="END nxapi/sublevel_strict.yaml"
diff --git a/test/integration/targets/nxos_config/tests/nxapi/toplevel_after.yaml b/test/integration/targets/nxos_config/tests/nxapi/toplevel_after.yaml
deleted file mode 100644
index 8749be5fd5..0000000000
--- a/test/integration/targets/nxos_config/tests/nxapi/toplevel_after.yaml
+++ /dev/null
@@ -1,40 +0,0 @@
----
-- debug: msg="START nxapi/toplevel_after.yaml"
-
-- name: setup
- nxos_config:
- lines:
- - "snmp-server contact ansible"
- - "hostname switch"
- match: none
-
-- name: configure top level command with before
- nxos_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
- nxos_config:
- lines: hostname foo
- after: snmp-server contact foo
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- nxos_config:
- lines:
- - "no snmp-server contact ansible"
- - "hostname switch"
- match: none
-
-- debug: msg="END nxapi/toplevel_after.yaml"
diff --git a/test/integration/targets/nxos_config/tests/nxapi/toplevel_before.yaml b/test/integration/targets/nxos_config/tests/nxapi/toplevel_before.yaml
deleted file mode 100644
index a67530773b..0000000000
--- a/test/integration/targets/nxos_config/tests/nxapi/toplevel_before.yaml
+++ /dev/null
@@ -1,40 +0,0 @@
----
-- debug: msg="START nxapi/toplevel_before.yaml"
-
-- name: setup
- nxos_config:
- lines:
- - "snmp-server contact ansible"
- - "hostname switch"
- match: none
-
-- name: configure top level command with before
- nxos_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
- nxos_config:
- lines: hostname foo
- before: snmp-server contact foo
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- nxos_config:
- lines:
- - "no snmp-server contact ansible"
- - "hostname switch"
- match: none
-
-- debug: msg="END nxapi/toplevel_before.yaml"
diff --git a/test/integration/targets/nxos_devicealias/defaults/main.yaml b/test/integration/targets/nxos_devicealias/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_devicealias/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_devicealias/meta/main.yml b/test/integration/targets/nxos_devicealias/meta/main.yml
deleted file mode 100644
index 42c635d6d2..0000000000
--- a/test/integration/targets/nxos_devicealias/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-# dependencies:
-# - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_devicealias/tasks/cli.yaml b/test/integration/targets/nxos_devicealias/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_devicealias/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_devicealias/tasks/main.yaml b/test/integration/targets/nxos_devicealias/tasks/main.yaml
deleted file mode 100644
index eb3f9ca07c..0000000000
--- a/test/integration/targets/nxos_devicealias/tasks/main.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-#---
-# Check platform type and skip if not MDS
----
-- name: Check platform type and skip if not MDS
- nxos_command:
- commands: show version | grep MDS
- register: result
-
-- set_fact: skip_test=False
-- set_fact: skip_test=True
- when: result.stdout[0] is not search('MDS')
-
-- include: cli.yaml
- tags: 'cli'
- when: not skip_test
- \ No newline at end of file
diff --git a/test/integration/targets/nxos_devicealias/tests/common/sanity.yaml b/test/integration/targets/nxos_devicealias/tests/common/sanity.yaml
deleted file mode 100644
index 26d7f68198..0000000000
--- a/test/integration/targets/nxos_devicealias/tests/common/sanity.yaml
+++ /dev/null
@@ -1,42 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_devicealias sanity test"
-
-- name: Setup - Remove device alias if configured
- nxos_devicealias: &remove
- da:
- - { name: 'ansible_test1_add', remove: True}
- - { name: 'ansible_test2_add', remove: True}
- ignore_errors: yes
-
-- block:
-
- - name: Configure device alias
- nxos_devicealias: &config
- da:
- - { name: 'ansible_test1_add', pwwn: '57:bb:cc:dd:ee:ff:11:67'}
- - { name: 'ansible_test2_add', pwwn: '65:22:21:20:19:18:1a:0d'}
- register: result
-
- - assert: &true
- that:
- - result.changed == true
- - assert:
- that:
- - result.commands == ["terminal dont-ask", "device-alias database", "device-alias name ansible_test1_add pwwn 57:bb:cc:dd:ee:ff:11:67", "device-alias name ansible_test2_add pwwn 65:22:21:20:19:18:1a:0d", "device-alias commit", "no terminal dont-ask"]
-
- - name: Idempotence Check
- nxos_devicealias: *config
- register: result
-
- - assert: &false
- that:
- - result.changed == false
- - assert:
- that:
- - result.commands == []
-
- always:
- - name: Remove device alias config
- nxos_devicealias: *remove
-
- - debug: msg="END connection={{ ansible_connection }} nxos_devicealias sanity test"
diff --git a/test/integration/targets/nxos_evpn_global/defaults/main.yaml b/test/integration/targets/nxos_evpn_global/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_evpn_global/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_evpn_global/meta/main.yml b/test/integration/targets/nxos_evpn_global/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_evpn_global/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_evpn_global/tasks/cli.yaml b/test/integration/targets/nxos_evpn_global/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_evpn_global/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_evpn_global/tasks/main.yaml b/test/integration/targets/nxos_evpn_global/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_evpn_global/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_evpn_global/tasks/nxapi.yaml b/test/integration/targets/nxos_evpn_global/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_evpn_global/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_evpn_global/tests/common/sanity.yaml b/test/integration/targets/nxos_evpn_global/tests/common/sanity.yaml
deleted file mode 100644
index 523c2aa776..0000000000
--- a/test/integration/targets/nxos_evpn_global/tests/common/sanity.yaml
+++ /dev/null
@@ -1,68 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_evpn_global sanity test"
-
-- name: "Setup"
- nxos_config: &remove_evpn_config
- lines: no nv overlay evpn
- match: none
- ignore_errors: yes
-
-- name: "Disable feature nv overlay"
- nxos_feature: &disable_feature_nv_overlay
- feature: nv overlay
- state: disabled
- ignore_errors: yes
-
-- block:
- - name: "Enable feature nv overlay"
- nxos_feature: &enable_feature_nv_overlay
- feature: nv overlay
- state: enabled
- ignore_errors: yes
-
- - name: "Enable nv overlay evpn"
- nxos_evpn_global: &enable_evpn
- nv_overlay_evpn: true
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "CHECK IDEMPOTENCE - enable nv overlay evpn"
- nxos_evpn_global: *enable_evpn
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: "Disable nv overlay evpn"
- nxos_evpn_global: &disable_evpn
- nv_overlay_evpn: false
- register: result
-
- - assert: *true
-
- - name: "CHECK DEMPOTENCE - Disable nv overlay evpn"
- nxos_evpn_global: *disable_evpn
- register: result
-
- - assert: *false
-
- when: not ( platform is search('N3K|N35|N3L'))
-
- rescue:
- - debug: msg="connection={{ ansible_connection }} nxos_evpn_global sanity test - FALURE ENCOUNTERED"
-
- always:
-
- - name: "Cleanup - Disable nv overlay evpn"
- nxos_config: *remove_evpn_config
- ignore_errors: yes
-
- - name: "Cleanup - Disable feature nv overlay"
- nxos_feature: *disable_feature_nv_overlay
- ignore_errors: yes
-
- - debug: msg="END connection={{ ansible_connection }} nxos_evpn_global sanity test"
diff --git a/test/integration/targets/nxos_evpn_vni/defaults/main.yaml b/test/integration/targets/nxos_evpn_vni/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_evpn_vni/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_evpn_vni/meta/main.yml b/test/integration/targets/nxos_evpn_vni/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_evpn_vni/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_evpn_vni/tasks/cli.yaml b/test/integration/targets/nxos_evpn_vni/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_evpn_vni/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_evpn_vni/tasks/main.yaml b/test/integration/targets/nxos_evpn_vni/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_evpn_vni/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_evpn_vni/tasks/nxapi.yaml b/test/integration/targets/nxos_evpn_vni/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_evpn_vni/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_evpn_vni/tests/common/sanity.yaml b/test/integration/targets/nxos_evpn_vni/tests/common/sanity.yaml
deleted file mode 100644
index ee6c73cf97..0000000000
--- a/test/integration/targets/nxos_evpn_vni/tests/common/sanity.yaml
+++ /dev/null
@@ -1,112 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_evpn_vni sanity test"
-
-- set_fact: nvoe_supported="{{ platform is not search('N3K|N3L|N35')}}"
-
-- name: "Setup"
- nxos_config: &remove_evpn
- lines: no nv overlay evpn
- match: none
- ignore_errors: yes
- when: nvoe_supported
-
-- block:
- - name: "Enable feature BGP"
- nxos_feature:
- feature: bgp
- state: enabled
-
- - name: "Enable nv overlay evpn"
- nxos_config:
- lines: nv overlay evpn
- match: none
-
- - name: "Configure nxos_evpn_vni"
- nxos_evpn_vni: &evpn_vni
- vni: 6000
- route_distinguisher: "60:10"
- route_target_import:
- - auto
- - "5000:10"
- - "4100:100"
- route_target_export:
- - auto
- - "5000:10"
- - "192.0.2.1:43"
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Check Idempotence"
- nxos_evpn_vni: *evpn_vni
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: "Configure nxos_evpn_vni"
- nxos_evpn_vni: &evpn_vni1
- vni: 6000
- route_distinguisher: "50:20"
- route_target_import: auto
- route_target_export: auto
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_evpn_vni: *evpn_vni1
- register: result
-
- - assert: *false
-
- - name: "Configure nxos_evpn_vni"
- nxos_evpn_vni: &evpn_vni_def
- vni: 6000
- route_distinguisher: default
- route_target_import: default
- route_target_export: default
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_evpn_vni: *evpn_vni_def
- register: result
-
- - assert: *false
-
- - name: "remove nxos_evpn_vni"
- nxos_evpn_vni: &rvni
- vni: 6000
- state: absent
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_evpn_vni: *rvni
- register: result
-
- - assert: *false
-
- when: nvoe_supported
-
-
- always:
- - block:
- - name: "Remove nv overlay evpn"
- nxos_config: *remove_evpn
- ignore_errors: yes
-
- - name: "Disable feature bgp"
- nxos_feature:
- feature: bgp
- state: disabled
- ignore_errors: yes
- when: nvoe_supported
-
-- debug: msg="END connection={{ ansible_connection }} nxos_evpn_vni sanity test"
diff --git a/test/integration/targets/nxos_facts/defaults/main.yaml b/test/integration/targets/nxos_facts/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_facts/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_facts/meta/main.yml b/test/integration/targets/nxos_facts/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_facts/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_facts/tasks/cli.yaml b/test/integration/targets/nxos_facts/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_facts/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_facts/tasks/main.yaml b/test/integration/targets/nxos_facts/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_facts/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_facts/tasks/nxapi.yaml b/test/integration/targets/nxos_facts/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_facts/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_facts/tests/common/all_facts.yaml b/test/integration/targets/nxos_facts/tests/common/all_facts.yaml
deleted file mode 100644
index 530ccca1ca..0000000000
--- a/test/integration/targets/nxos_facts/tests/common/all_facts.yaml
+++ /dev/null
@@ -1,31 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }}/all_facts.yaml"
-
-- name: test getting all facts
- nxos_facts:
- gather_subset:
- - all
- 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"
- - "result.ansible_facts.ansible_net_interfaces is defined"
- - "result.ansible_facts.ansible_net_config is defined"
- - "result.ansible_facts.ansible_net_model 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"
-
-- debug: msg="END connection={{ ansible_connection }}/all_facts.yaml"
diff --git a/test/integration/targets/nxos_facts/tests/common/default_facts.yaml b/test/integration/targets/nxos_facts/tests/common/default_facts.yaml
deleted file mode 100644
index 1a3c4cb33f..0000000000
--- a/test/integration/targets/nxos_facts/tests/common/default_facts.yaml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }}/default_facts.yaml"
-
-- name: test getting default facts
- nxos_facts:
- 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_model is defined" #default
- - "result.ansible_facts.ansible_net_interfaces is defined" #interfaces
- # FIXME
-# - "result.ansible_facts.ansible_net_interfaces.Ethernet1.ipv4.masklen > 1" # interfaces
-
- # ... and not present
- - "result.ansible_facts.ansible_net_config is not defined" # config
-
-- debug: msg="END cli/default.yaml"
diff --git a/test/integration/targets/nxos_facts/tests/common/invalid_subset.yaml b/test/integration/targets/nxos_facts/tests/common/invalid_subset.yaml
deleted file mode 100644
index 048d2c54a2..0000000000
--- a/test/integration/targets/nxos_facts/tests/common/invalid_subset.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }}/invalid_subset.yaml"
-
-- name: test invalid subset (foobar)
- nxos_facts:
- gather_subset:
- - "foobar"
- 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
- - "'Subset must be one of' in result.msg"
-
-- debug: msg="END connection={{ ansible_connection }}/invalid_subset.yaml"
diff --git a/test/integration/targets/nxos_facts/tests/common/not_hardware.yaml b/test/integration/targets/nxos_facts/tests/common/not_hardware.yaml
deleted file mode 100644
index 0e54e51950..0000000000
--- a/test/integration/targets/nxos_facts/tests/common/not_hardware.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }}/not_hardware_facts.yaml"
-
-- name: test not hardware
- nxos_facts:
- gather_subset:
- - "!hardware"
- 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
- # FIXME
-# - "result.ansible_facts.ansible_net_interfaces.['Ethernet2/15'].mtu > 1" # interfaces
- # ... and not present
- - "result.ansible_facts.ansible_net_filesystems is not defined"
-
-- debug: msg="END connection={{ ansible_connection }}/not_hardware_facts.yaml"
diff --git a/test/integration/targets/nxos_facts/tests/common/sanity.yaml b/test/integration/targets/nxos_facts/tests/common/sanity.yaml
deleted file mode 100644
index 728852b881..0000000000
--- a/test/integration/targets/nxos_facts/tests/common/sanity.yaml
+++ /dev/null
@@ -1,91 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_facts sanity test"
-
-- name: "nxos_facts gather hardware facts"
- nxos_facts:
- gather_subset: hardware
- 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"
-
- # Other facts are not present
- - "'config' not in result.ansible_facts.ansible_net_gather_subset"
- - "'interfaces' not 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"
-
-- name: "nxos_facts gather config facts"
- nxos_facts:
- gather_subset: config
- 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"
-
- # Other facts are not present
- - "'hardware' not in result.ansible_facts.ansible_net_gather_subset"
- - "'interfaces' not in result.ansible_facts.ansible_net_gather_subset"
-
- # Items from those subsets are present
- - "result.ansible_facts.ansible_net_config is defined"
-
-- name: "nxos_facts gather config and hardware facts"
- nxos_facts:
- gather_subset:
- - hardware
- - config
- 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"
- - "'config' in result.ansible_facts.ansible_net_gather_subset"
-
- # Other facts are not present
- - "'interfaces' not in result.ansible_facts.ansible_net_gather_subset"
-
- # Items from those subsets are present
- - "result.ansible_facts.ansible_net_filesystems is defined"
- - "result.ansible_facts.ansible_net_config 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"
-
-- name: "nxos_facts gather features facts"
- nxos_facts:
- gather_subset: features
- register: result
-
-- assert:
- that:
- # _facts modules should never report a change
- - "result.changed == false"
-
- # Correct subsets are present
- - "'features' in result.ansible_facts.ansible_net_gather_subset"
-
- # Items from the subset is present
- - "result.ansible_facts.ansible_net_features_enabled is defined"
-
-- debug: msg="END connection={{ ansible_connection }} nxos_facts sanity test"
diff --git a/test/integration/targets/nxos_feature/defaults/main.yaml b/test/integration/targets/nxos_feature/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_feature/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_feature/meta/main.yml b/test/integration/targets/nxos_feature/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_feature/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_feature/tasks/cli.yaml b/test/integration/targets/nxos_feature/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_feature/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_feature/tasks/main.yaml b/test/integration/targets/nxos_feature/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_feature/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_feature/tasks/nxapi.yaml b/test/integration/targets/nxos_feature/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_feature/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_feature/tests/common/configure.yaml b/test/integration/targets/nxos_feature/tests/common/configure.yaml
deleted file mode 100644
index 2c02bea4c8..0000000000
--- a/test/integration/targets/nxos_feature/tests/common/configure.yaml
+++ /dev/null
@@ -1,54 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }}/configure.yaml"
-
-- name: setup
- nxos_config:
- lines: no feature bgp
- match: none
-
-- name: enable bgp
- nxos_feature:
- feature: bgp
- state: enabled
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: verify bgp
- nxos_feature:
- feature: bgp
- state: enabled
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: disable bgp
- nxos_feature:
- feature: bgp
- state: disabled
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: verify bgp
- nxos_feature:
- feature: bgp
- state: disabled
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- nxos_config:
- lines: no feature bgp
- match: none
-
-- debug: msg="END connection={{ ansible_connection }}/configure.yaml"
diff --git a/test/integration/targets/nxos_feature/tests/common/invalid.yaml b/test/integration/targets/nxos_feature/tests/common/invalid.yaml
deleted file mode 100644
index 477eaf6416..0000000000
--- a/test/integration/targets/nxos_feature/tests/common/invalid.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }}/invalid.yaml"
-
-- name: configure invalid feature name
- nxos_feature:
- feature: invalid
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - result.failed == true
-
-- debug: msg="END connection={{ ansible_connection }}/invalid.yaml"
diff --git a/test/integration/targets/nxos_file_copy/defaults/main.yaml b/test/integration/targets/nxos_file_copy/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_file_copy/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_file_copy/meta/main.yml b/test/integration/targets/nxos_file_copy/meta/main.yml
deleted file mode 100644
index 1530e79eed..0000000000
--- a/test/integration/targets/nxos_file_copy/meta/main.yml
+++ /dev/null
@@ -1,5 +0,0 @@
-dependencies:
- # prepare_nxos_tests is not needed for this test and simply adds overhead.
- # This can be uncommented in the future if needed.
- #
- # - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_file_copy/tasks/cli.yaml b/test/integration/targets/nxos_file_copy/tasks/cli.yaml
deleted file mode 100644
index 9243812668..0000000000
--- a/test/integration/targets/nxos_file_copy/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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
diff --git a/test/integration/targets/nxos_file_copy/tasks/main.yaml b/test/integration/targets/nxos_file_copy/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_file_copy/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_file_copy/tasks/nxapi.yaml b/test/integration/targets/nxos_file_copy/tasks/nxapi.yaml
deleted file mode 100644
index 653bcfefe9..0000000000
--- a/test/integration/targets/nxos_file_copy/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_file_copy/tests/cli/input_validation.yaml b/test/integration/targets/nxos_file_copy/tests/cli/input_validation.yaml
deleted file mode 100644
index 7f747a02f4..0000000000
--- a/test/integration/targets/nxos_file_copy/tests/cli/input_validation.yaml
+++ /dev/null
@@ -1,66 +0,0 @@
----
-- debug: msg="START nxos_file_copy input_validation test"
-
-- name: "Input Validation - param should be type <path>"
- nxos_file_copy:
- remote_file: 500
- file_pull: True
- register: result
- ignore_errors: true
-
-- assert:
- that:
- - not result is search('argument remote_file is of type')
-
-- name: "Input Validation - param should be type <int>"
- nxos_file_copy:
- file_pull_timeout: 'foobar'
- register: result
- ignore_errors: true
-
-- assert:
- that:
- - result is search("argument file_pull_timeout is of type <class 'ansible.parsing.yaml.objects.AnsibleUnicode'> and we were unable to convert to int")
-
-- name: "Input Validation - param should be type <bool>"
- nxos_file_copy:
- file_pull: 'foobar'
- register: result
- ignore_errors: true
-
-- assert:
- that:
- - result is search("argument file_pull is of type <class 'ansible.parsing.yaml.objects.AnsibleUnicode'> and we were unable to convert to bool")
-
-- name: "Input Validation - param <file_pull> <remote_file> dependency"
- nxos_file_copy:
- file_pull: True
- register: result
- ignore_errors: true
-
-- assert:
- that:
- - result is search("Playbook parameter <remote_file> required when <file_pull> is True")
-
-- name: "Input Validation - param <file_pull> <remote_scp_server> dependency"
- nxos_file_copy:
- file_pull: True
- remote_file: "/network-integration.cfg"
- register: result
- ignore_errors: true
-
-- assert:
- that:
- - result is search('Playbook parameter <remote_scp_server> required when <file_pull> is True')
-
-- name: "Input Validation - remote_scp_server params together"
- nxos_file_copy:
- remote_scp_server: "{{ inventory_hostname_short }}"
- register: result
- ignore_errors: true
-
-- assert:
- that:
- - result is search('Playbook parameters <remote_scp_server>, <remote_scp_server_user> must be set together')
-
-- debug: msg="END nxos_file_copy input_validation test"
diff --git a/test/integration/targets/nxos_file_copy/tests/cli/negative.yaml b/test/integration/targets/nxos_file_copy/tests/cli/negative.yaml
deleted file mode 100644
index 58d091663c..0000000000
--- a/test/integration/targets/nxos_file_copy/tests/cli/negative.yaml
+++ /dev/null
@@ -1,133 +0,0 @@
----
-- debug: msg="START nxos_file_copy negative test"
-
-# This test uses a file that is committed to the Ansible core repository.
-# The file name and relative path is test/integration/targets/network-integration.cfg
-- set_fact: test_source_file="network-integration.cfg"
-- set_fact: test_destination_file="test_destination_file"
-
-# -------------------------
-# Tests for file_pull False
-# -------------------------
-- name: "Attempt to copy file to invalid file_system"
- nxos_file_copy:
- file_pull: False
- local_file: "./{{ test_source_file }}"
- file_system: "invalid_media_type:"
- connect_ssh_port: "{{ ansible_ssh_port }}"
- register: result
- ignore_errors: true
-
-- assert:
- that:
- - result is search('Invalid nxos filesystem invalid_media_type:')
-
-- name: "Attempt to copy source file that does not exist on Ansible controller"
- nxos_file_copy:
- file_pull: False
- local_file: "./{{ test_source_file }}_does_not_exist"
- file_system: "bootflash:"
- connect_ssh_port: "{{ ansible_ssh_port }}"
- register: result
- ignore_errors: true
-
-- assert:
- that:
- - result is search('Local file ./network-integration.cfg_does_not_exist not found')
-
-# -------------------------
-# Tests for file_pull True
-# -------------------------
-- name: "Try and copy file using an invalid remote scp server name"
- nxos_file_copy:
- file_pull: True
- file_pull_timeout: 10
- remote_file: "/{{ test_destination_file }}"
- local_file: "{{ test_destination_file }}_copy"
- local_file_directory: "dir1/dir2/dir3"
- remote_scp_server: "scp_server_gone.example.com"
- remote_scp_server_user: "{{ ansible_ssh_user }}"
- remote_scp_server_password: "{{ ansible_ssh_pass }}"
- register: result
- ignore_errors: true
-
-- assert:
- that:
- - "result.changed == false"
- - "'copy scp:' in result.copy_cmd"
- - "'bootflash:' in result.file_system"
- - "'No Transfer' in result.transfer_status"
-
-- assert:
- that:
- - result.error_data is search("ERROR Could not resolve hostname|Copying to.*from this server name is not permitted")
-
-- name: "Try and copy file using an invalid remote scp server ip address"
- nxos_file_copy:
- file_pull: True
- file_pull_timeout: 300
- remote_file: "/{{ test_destination_file }}"
- local_file: "{{ test_destination_file }}_copy"
- local_file_directory: "dir1/dir2/dir3"
- remote_scp_server: "192.168.55.55"
- remote_scp_server_user: "{{ ansible_ssh_user }}"
- remote_scp_server_password: "{{ ansible_ssh_pass }}"
- register: result
- ignore_errors: true
-
-- assert:
- that:
- - "result.changed == false"
- - "'copy scp:' in result.copy_cmd"
- - "'timed out' in result.error_data"
- - "'bootflash:' in result.file_system"
- - "'No Transfer' in result.transfer_status"
-
-# Sometimes the previous negative test needs a few seconds after the timeout
-# failure before the next negative test is executed.
-- pause:
- seconds: 10
-
-- name: "Try and copy file using an invalid username"
- nxos_file_copy:
- file_pull: True
- file_pull_timeout: 10
- remote_file: "/{{ test_destination_file }}"
- local_file: "{{ test_destination_file }}_copy"
- local_file_directory: "dir1/dir2/dir3"
- remote_scp_server: "{{ inventory_hostname_short }}"
- remote_scp_server_user: "invalid_user_name"
- remote_scp_server_password: "{{ ansible_ssh_pass }}"
- register: result
- ignore_errors: true
-
-- assert:
- that:
- - "result.changed == false"
- - "'copy scp:' in result.copy_cmd"
- - "'Too many authentication failures' in result.error_data"
- - "'bootflash:' in result.file_system"
- - "'No Transfer' in result.transfer_status"
-
-- name: "Try and copy file using an invalid password"
- nxos_file_copy:
- file_pull: True
- file_pull_timeout: 10
- remote_file: "/{{ test_destination_file }}"
- local_file: "{{ test_destination_file }}_copy"
- local_file_directory: "dir1/dir2/dir3"
- remote_scp_server: "{{ inventory_hostname_short }}"
- remote_scp_server_user: "{{ ansible_ssh_user }}"
- remote_scp_server_password: "invalid_password"
- register: result
- ignore_errors: true
-
-- assert:
- that:
- - "result.changed == false"
- - "'copy scp:' in result.copy_cmd"
- - "'Too many authentication failures' in result.error_data"
- - "'bootflash:' in result.file_system"
- - "'No Transfer' in result.transfer_status"
-
-- debug: msg="END nxos_file_copy negative test"
diff --git a/test/integration/targets/nxos_file_copy/tests/cli/sanity.yaml b/test/integration/targets/nxos_file_copy/tests/cli/sanity.yaml
deleted file mode 100644
index 3fa3ea84f3..0000000000
--- a/test/integration/targets/nxos_file_copy/tests/cli/sanity.yaml
+++ /dev/null
@@ -1,137 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_file_copy sanity test"
-
-# This test uses a file that is committed to the Ansible core repository.
-# The file name and relative path is test/integration/targets/network-integration.cfg
-- set_fact: test_source_file="network-integration.cfg"
-- set_fact: test_destination_file="test_destination_file"
-
-- name: "Setup - Remove existing file"
- nxos_command: &remove_file
- commands:
- - terminal dont-ask
- - "delete {{ test_source_file }}"
- - "delete {{ test_destination_file }}"
- - "delete bootflash:/dir1/dir2/dir3/*"
- - rmdir dir1/dir2/dir3
- - rmdir dir1/dir2
- - rmdir dir1
- ignore_errors: yes
-
-- name: "Setup - Turn on feature scp-server"
- nxos_feature:
- feature: scp-server
- state: enabled
-
-- block:
- - name: "Copy {{ test_source_file }} file from Ansible controller to bootflash"
- nxos_file_copy: &copy_file_same_name
- local_file: "./{{ test_source_file }}"
- file_system: "bootflash:"
- connect_ssh_port: "{{ ansible_ssh_port }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'bootflash:' in result.file_system"
- - "'./{{ test_source_file }}' in result.local_file"
- - "'network-integration.cfg' in result.remote_file"
- - "'Sent: File copied to remote device.' in result.transfer_status"
-
- - name: "Idempotence - Copy {{ test_source_file }} file from Ansible controller to bootflash"
- nxos_file_copy: *copy_file_same_name
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: "Setup - Remove existing file"
- nxos_command: *remove_file
- register: result
-
- - name: "Copy {{ test_source_file }} file from Ansible controller to bootflash renamed as {{ test_destination_file }}"
- nxos_file_copy: &copy_file_different_name
- local_file: "./{{ test_source_file }}"
- remote_file: "{{ test_destination_file }}"
- file_system: "bootflash:"
- connect_ssh_port: "{{ ansible_ssh_port }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'bootflash:' in result.file_system"
- - "'./{{ test_source_file }}' in result.local_file"
- - "'{{ test_destination_file }}' in result.remote_file"
- - "'Sent: File copied to remote device.' in result.transfer_status"
-
- - name: "Idempotence - Copy {{ test_source_file }} file from Ansible controller to bootflash renamed as {{ test_destination_file }}"
- nxos_file_copy: *copy_file_different_name
- register: result
-
- - name: "Verify file_pull true options have no impact when file_true is false"
- nxos_file_copy:
- file_pull: False
- file_pull_timeout: 1200
- file_pull_compact: True
- file_pull_kstack: True
- local_file_directory: "dir1/dir2/dir3"
- remote_scp_server: "{{ inventory_hostname_short }}"
- remote_scp_server_user: "{{ ansible_ssh_user }}"
- remote_scp_server_password: "{{ ansible_ssh_pass }}"
- # Parameters above are only used when file_pull is True
- local_file: "./{{ test_source_file }}"
- remote_file: "{{ test_destination_file }}"
- file_system: "bootflash:"
- connect_ssh_port: "{{ ansible_ssh_port }}"
- register: result
-
- - assert: *false
-
- # This step validates the ability to initiate the copy from the nxos device
- # to pull a file from a remote file server to the nxos bootflash device.
- #
- # In this case we are using the nxos device as the remote file server so we
- # copy a file from bootflash: to bootflash:dir1/dir2/dir3
- - name: "Initiate copy from nxos device to copy {{ test_destination_file }} to bootflash:dir1/dir2/dir3/{{ test_destination_file }}_copy"
- nxos_file_copy: &copy_pull
- file_pull: True
- file_pull_timeout: 30
- remote_file: "/{{ test_destination_file }}"
- local_file: "{{ test_destination_file }}_copy"
- local_file_directory: "dir1/dir2/dir3"
- remote_scp_server: "{{ inventory_hostname_short }}"
- remote_scp_server_user: "{{ ansible_ssh_user }}"
- remote_scp_server_password: "{{ ansible_ssh_pass }}"
- register: result
-
- - assert: &overwrite
- that:
- - "result.changed == true"
- - "'copy scp:' in result.copy_cmd"
- - "'bootflash:' in result.file_system"
- - "'bootflash:dir1/dir2/dir3/{{ test_destination_file }}_copy' in result.local_file"
- - "'/{{ test_destination_file }}' in result.remote_file"
- - "'Received: File copied/pulled to nxos device from remote scp server.' in result.transfer_status"
- - "'{{ inventory_hostname_short }}' in result.remote_scp_server"
-
- - name: "Overwrite the file"
- nxos_file_copy: *copy_pull
- register: result
-
- - assert: *overwrite
-
- always:
-
- - name: "Remove file"
- nxos_command: *remove_file
- ignore_errors: yes
-
- - name: "Turn off feature scp-server"
- nxos_feature:
- feature: scp-server
- state: disabled
-
- - debug: msg="END connection={{ ansible_connection }} nxos_file_copy sanity test"
diff --git a/test/integration/targets/nxos_file_copy/tests/nxapi/badtransport.yaml b/test/integration/targets/nxos_file_copy/tests/nxapi/badtransport.yaml
deleted file mode 100644
index d6f629af35..0000000000
--- a/test/integration/targets/nxos_file_copy/tests/nxapi/badtransport.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
----
-- debug: msg="START nxapi/badtransport.yaml"
-
-- name: Sending transport other than cli should fail
- nxos_file_copy:
- local_file: "./network-integration.cfg"
- file_system: "bootflash:"
- connect_ssh_port: "{{ ansible_ssh_port }}"
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - result.failed and result.msg is search('Connection type must be <network_cli>')
-
-- debug: msg="END nxapi/badtransport.yaml"
diff --git a/test/integration/targets/nxos_gir/defaults/main.yaml b/test/integration/targets/nxos_gir/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_gir/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_gir/meta/main.yml b/test/integration/targets/nxos_gir/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_gir/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_gir/tasks/cli.yaml b/test/integration/targets/nxos_gir/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_gir/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_gir/tasks/main.yaml b/test/integration/targets/nxos_gir/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_gir/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_gir/tasks/nxapi.yaml b/test/integration/targets/nxos_gir/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_gir/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_gir/tests/common/sanity.yaml b/test/integration/targets/nxos_gir/tests/common/sanity.yaml
deleted file mode 100644
index 99e3292dc7..0000000000
--- a/test/integration/targets/nxos_gir/tests/common/sanity.yaml
+++ /dev/null
@@ -1,112 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_gir sanity test"
-- set_fact: gir_run='{{ true if (platform is not search("N35")) else false }}'
-
-- name: Setup0
- nxos_config: &cleanup0
- lines:
- - no system mode maintenance timeout 30
- - no configure maintenance profile normal-mode
- - no configure maintenance profile maintenance-mode
- match: none
- ignore_errors: yes
-
-- name: Setup1
- nxos_gir:
- system_mode_maintenance: false
- ignore_errors: yes
-
-- block:
- - name: "Put system in maintenance mode with reload reset reason"
- nxos_gir: &reset_reason
- system_mode_maintenance_on_reload_reset_reason: manual_reload
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Check Idempotence"
- nxos_gir: *reset_reason
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: "Remove reload reason"
- nxos_gir: &remove_reason
- system_mode_maintenance_on_reload_reset_reason: manual_reload
- state: absent
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_gir: *remove_reason
- register: result
-
- - assert: *false
-
- - name: "Put system in maintenance mode with timeout"
- nxos_gir: &mtime
- system_mode_maintenance_timeout: 30
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_gir: *mtime
- register: result
-
- - assert: *false
-
- - name: "Remove maintenance mode timeout"
- nxos_gir: &remove_timeout
- system_mode_maintenance_timeout: 30
- state: absent
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_gir: *remove_timeout
- register: result
-
- - assert: *false
-
- - name: "Put system in maintenance mode"
- nxos_gir: &configure_system_mode_maintenance
- system_mode_maintenance: true
- register: result
-
- - assert: *true
-
- when: gir_run
-
- rescue:
-
- - debug: msg="connection={{ ansible_connection }} nxos_gir failure detected"
-
- always:
-
- - name: "Remove snapshots"
- nxos_snapshot:
- action: delete_all
- ignore_errors: yes
-
- - name: Teardown0
- nxos_config: *cleanup0
- ignore_errors: yes
-
- - name: "Put system back in normal mode"
- nxos_gir:
- system_mode_maintenance: false
- # Try again if cli is blocking while changing modes
- retries: 3
- delay: 30
- register: result
- until: result is not failed
- ignore_errors: yes
-
-- debug: msg="END connection={{ ansible_connection }} nxos_gir sanity test"
diff --git a/test/integration/targets/nxos_gir_profile_management/defaults/main.yaml b/test/integration/targets/nxos_gir_profile_management/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_gir_profile_management/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_gir_profile_management/meta/main.yml b/test/integration/targets/nxos_gir_profile_management/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_gir_profile_management/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_gir_profile_management/tasks/cli.yaml b/test/integration/targets/nxos_gir_profile_management/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_gir_profile_management/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_gir_profile_management/tasks/main.yaml b/test/integration/targets/nxos_gir_profile_management/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_gir_profile_management/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_gir_profile_management/tasks/nxapi.yaml b/test/integration/targets/nxos_gir_profile_management/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_gir_profile_management/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_gir_profile_management/tests/common/sanity.yaml b/test/integration/targets/nxos_gir_profile_management/tests/common/sanity.yaml
deleted file mode 100644
index 5911da91bb..0000000000
--- a/test/integration/targets/nxos_gir_profile_management/tests/common/sanity.yaml
+++ /dev/null
@@ -1,104 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_gir_profile_management sanity test"
-
-- name: "Setup - Remove maintenace mode profiles"
- nxos_gir_profile_management: &remove_maintenance
- mode: maintenance
- state: absent
- ignore_errors: yes
-
-- name: "Setup - Remove normal mode profiles"
- nxos_gir_profile_management: &remove_normal
- mode: normal
- state: absent
- ignore_errors: yes
-
-- name: "Setup - Turn on feature eigrp"
- nxos_feature:
- feature: eigrp
- state: enabled
- ignore_errors: yes
-
-- block:
- - name: "Create maintenace mode profile"
- nxos_gir_profile_management: &create_maintenance_profile
- mode: maintenance
- commands:
- - router eigrp 11
- - isolate
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Check Idempotence - Create maintenace mode profile"
- nxos_gir_profile_management: *create_maintenance_profile
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: "Create normal mode profile"
- nxos_gir_profile_management: &create_normal_profile
- mode: normal
- commands:
- - router eigrp 11
- - isolate
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence - Create normal mode profile"
- nxos_gir_profile_management: *create_normal_profile
- register: result
-
- - assert: *false
-
- - name: "Remove maintenance mode profile"
- nxos_gir_profile_management: *remove_maintenance
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence - Remove maintenance mode profile"
- nxos_gir_profile_management: *remove_maintenance
- register: result
-
- - assert: *false
-
- - name: "Remove normal mode profile"
- nxos_gir_profile_management: *remove_normal
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence - Remove normal mode profile"
- nxos_gir_profile_management: *remove_normal
- register: result
-
- - assert: *false
-
- when: not ( platform is match('N35')) and not titanium
-
- rescue:
-
- - debug: msg="connection={{ ansible_connection }} nxos_gir_profile_management failure detected"
-
- always:
-
- - name: "Remove normal mode profile"
- nxos_gir_profile_management: *remove_normal
-
- - name: "Remove maintenance mode profile"
- nxos_gir_profile_management: *remove_maintenance
-
- - name: "Turn off feature eigrp"
- nxos_feature:
- feature: eigrp
- state: disabled
-
- - debug: msg="END connection={{ ansible_connection }} nxos_gir_profile_management sanity test"
diff --git a/test/integration/targets/nxos_hsrp/defaults/main.yaml b/test/integration/targets/nxos_hsrp/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_hsrp/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_hsrp/meta/main.yml b/test/integration/targets/nxos_hsrp/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_hsrp/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_hsrp/tasks/cli.yaml b/test/integration/targets/nxos_hsrp/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_hsrp/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_hsrp/tasks/main.yaml b/test/integration/targets/nxos_hsrp/tasks/main.yaml
deleted file mode 100644
index fea9337c14..0000000000
--- a/test/integration/targets/nxos_hsrp/tasks/main.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-# Use block to ensure that both cli and nxapi tests
-# will run even if there are failures or errors.
-- block:
- - { include: cli.yaml, tags: ['cli'] }
- always:
- - { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_hsrp/tasks/nxapi.yaml b/test/integration/targets/nxos_hsrp/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_hsrp/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_hsrp/tests/common/sanity.yaml b/test/integration/targets/nxos_hsrp/tests/common/sanity.yaml
deleted file mode 100644
index 9e09820a9f..0000000000
--- a/test/integration/targets/nxos_hsrp/tests/common/sanity.yaml
+++ /dev/null
@@ -1,152 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_hsrp sanity test"
-
-# Select interface for test
-- set_fact: intname1="{{ nxos_int1 }}"
-- set_fact: intname2="{{ nxos_int2 }}"
-
-- block:
- - name: "Enable feature hsrp"
- nxos_feature:
- feature: hsrp
- state: enabled
-
- - name: "change int1 mode"
- nxos_config:
- commands:
- - no switchport
- parents:
- - "interface {{ intname1 }}"
- match: none
-
- - name: "change int2 mode"
- nxos_config:
- commands:
- - no switchport
- parents:
- - "interface {{ intname2 }}"
- match: none
-
- - name: "configure nxos_hsrp"
- nxos_hsrp: &conf1000
- group: 1000
- version: 2
- vip: 10.1.1.1
- priority: 150
- interface: "{{ intname1 }}"
- preempt: enabled
- auth_type: md5
- auth_string: "7 1234"
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Conf Idempotence"
- nxos_hsrp: *conf1000
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: "configure group 100"
- nxos_hsrp: &conf100
- group: 100
- version: 2
- vip: 192.0.2.2
- priority: 25
- interface: "{{ intname1 }}"
- preempt: enabled
- auth_type: md5
- auth_string: "0 1234"
- register: result
-
- - assert: *true
-
- - name: "Conf Idempotence"
- nxos_hsrp: *conf100
- register: result
-
- - assert: *false
-
- - name: "change group 100"
- nxos_hsrp: &chg100
- group: 100
- version: 2
- vip: default
- priority: default
- interface: "{{ intname1 }}"
- preempt: disabled
- auth_type: md5
- auth_string: "0 1234"
- register: result
-
- - assert: *true
-
- - name: "Conf Idempotence"
- nxos_hsrp: *chg100
- register: result
-
- - assert: *false
-
- - name: "configure group 200"
- nxos_hsrp: &conf200
- group: 200
- vip: 192.0.2.3
- version: 1
- interface: "{{ intname2 }}"
- auth_type: text
- auth_string: "1234"
- register: result
-
- - assert: *true
-
- - name: "Conf Idempotence"
- nxos_hsrp: *conf200
- register: result
-
- - assert: *false
-
- - name: "change group 200"
- nxos_hsrp: &chg200
- group: 200
- vip: 192.0.2.3
- version: 2
- interface: "{{ intname2 }}"
- auth_type: text
- auth_string: default
- register: result
-
- - assert: *true
-
- - name: "Conf Idempotence"
- nxos_hsrp: *chg200
- register: result
-
- - assert: *false
-
- - name: "remove nxos_hsrp"
- nxos_hsrp: &remove
- group: 1000
- interface: "{{ intname1 }}"
- state: absent
- register: result
-
- - assert: *true
-
- - name: "Remove Idempotence"
- nxos_hsrp: *remove
- register: result
-
- - assert: *false
-
- always:
- - name: "Disable feature hsrp"
- nxos_feature:
- feature: hsrp
- state: disabled
- ignore_errors: yes
-
-- debug: msg="END connection={{ ansible_connection }} nxos_hsrp sanity test"
diff --git a/test/integration/targets/nxos_hsrp_interfaces/defaults/main.yaml b/test/integration/targets/nxos_hsrp_interfaces/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_hsrp_interfaces/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_hsrp_interfaces/meta/main.yml b/test/integration/targets/nxos_hsrp_interfaces/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_hsrp_interfaces/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_hsrp_interfaces/tasks/cli.yaml b/test/integration/targets/nxos_hsrp_interfaces/tasks/cli.yaml
deleted file mode 100644
index 6c7ea4a7f9..0000000000
--- a/test/integration/targets/nxos_hsrp_interfaces/tasks/cli.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_hsrp_interfaces/tasks/main.yaml b/test/integration/targets/nxos_hsrp_interfaces/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/nxos_hsrp_interfaces/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/nxos_hsrp_interfaces/tasks/nxapi.yaml b/test/integration/targets/nxos_hsrp_interfaces/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_hsrp_interfaces/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_hsrp_interfaces/tests/cli/deleted.yaml b/test/integration/targets/nxos_hsrp_interfaces/tests/cli/deleted.yaml
deleted file mode 100644
index 01331dfd2d..0000000000
--- a/test/integration/targets/nxos_hsrp_interfaces/tests/cli/deleted.yaml
+++ /dev/null
@@ -1,57 +0,0 @@
----
-- debug:
- msg: "Start nxos_hsrp_interfaces deleted integration tests connection={{ ansible_connection }}"
-
-- set_fact: test_int1="{{ nxos_int1 }}"
-- set_fact: test_int2="{{ nxos_int2 }}"
-- set_fact:
- bfd_enable: enable
- bfd_disable: disable
- when: platform is not search('N35')
-
-- block:
- - name: setup1
- cli_config: &setup_teardown
- config: |
- no feature bfd
- no feature hsrp
- default interface {{ test_int1 }}
- default interface {{ test_int2 }}
-
- - name: setup2
- cli_config:
- config: |
- feature bfd
- feature hsrp
- interface {{ test_int1 }}
- no switchport
- hsrp bfd
- interface {{ test_int2 }}
- no switchport
-
- - name: deleted
- nxos_hsrp_interfaces: &deleted
- config:
- - name: "{{ test_int1 }}"
- bfd: "{{ bfd_disable|default(omit)}}"
- state: deleted
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'no hsrp bfd' in result.commands"
- msg: "Assert failed. 'result.commands': {{ result.commands }}"
-
- - name: Idempotence - deleted
- nxos_hsrp_interfaces: *deleted
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config: *setup_teardown
diff --git a/test/integration/targets/nxos_hsrp_interfaces/tests/cli/merged.yaml b/test/integration/targets/nxos_hsrp_interfaces/tests/cli/merged.yaml
deleted file mode 100644
index baf56458fc..0000000000
--- a/test/integration/targets/nxos_hsrp_interfaces/tests/cli/merged.yaml
+++ /dev/null
@@ -1,65 +0,0 @@
----
-- debug:
- msg: "Start nxos_hsrp_interfaces merged integration tests connection={{ ansible_connection }}"
-
-- set_fact: test_int1="{{ nxos_int1 }}"
-- set_fact: test_int2="{{ nxos_int2 }}"
-- set_fact:
- bfd_enable: enable
- bfd_disable: disable
- when: platform is not search('N35')
-
-- block:
- - name: setup1
- cli_config: &setup_teardown
- config: |
- no feature bfd
- no feature hsrp
- default interface {{ test_int1 }}
- default interface {{ test_int2 }}
-
- - name: setup2
- cli_config:
- config: |
- feature bfd
- feature hsrp
- interface {{ test_int1 }}
- no switchport
- hsrp bfd
- interface {{ test_int2 }}
- no switchport
-
- - name: Merged
- nxos_hsrp_interfaces: &merged
- config:
- - name: "{{ test_int1 }}"
- bfd: "{{ bfd_disable|default(omit)}}"
- state: merged
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'no hsrp bfd' in result.commands"
- msg: "Assert failed. 'result.commands': {{ result.commands }}"
-
- - name: Gather hsrp_interfaces facts
- nxos_facts:
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: hsrp_interfaces
-
- - name: Idempotence - Merged
- nxos_hsrp_interfaces: *merged
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
- when: bfd_enable is defined
-
- always:
- - name: teardown
- cli_config: *setup_teardown
diff --git a/test/integration/targets/nxos_hsrp_interfaces/tests/cli/overridden.yaml b/test/integration/targets/nxos_hsrp_interfaces/tests/cli/overridden.yaml
deleted file mode 100644
index 5d2aa44139..0000000000
--- a/test/integration/targets/nxos_hsrp_interfaces/tests/cli/overridden.yaml
+++ /dev/null
@@ -1,58 +0,0 @@
----
-- debug:
- msg: "Start nxos_hsrp_interfaces overridden integration tests connection={{ ansible_connection }}"
-
-- set_fact: test_int1="{{ nxos_int1 }}"
-- set_fact: test_int2="{{ nxos_int2 }}"
-- set_fact:
- bfd_enable: enable
- bfd_disable: disable
- when: platform is not search('N35')
-
-- block:
- - name: setup1
- cli_config: &setup_teardown
- config: |
- no feature bfd
- no feature hsrp
- default interface {{ test_int1 }}
- default interface {{ test_int2 }}
-
- - name: setup2
- cli_config:
- config: |
- feature bfd
- feature hsrp
- interface {{ test_int1 }}
- no switchport
- interface {{ test_int2 }}
- no switchport
- hsrp bfd
-
- - name: Overridden
- nxos_hsrp_interfaces: &overridden
- config:
- - name: "{{ test_int1 }}"
- bfd: "{{ bfd_enable|default(omit)}}"
- state: overridden
- register: result
-
- - assert:
- that:
- - result.changed == true
- - result.commands[1] == 'no hsrp bfd' # test_int2 reset to defaults
- - result.commands[3] == 'hsrp bfd' # test_int1 set to playval
- msg: "Assert failed. 'result.commands': {{ result.commands }}"
-
- - name: Idempotence - Overridden
- nxos_hsrp_interfaces: *overridden
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config: *setup_teardown
diff --git a/test/integration/targets/nxos_hsrp_interfaces/tests/cli/replaced.yaml b/test/integration/targets/nxos_hsrp_interfaces/tests/cli/replaced.yaml
deleted file mode 100644
index 6eed615368..0000000000
--- a/test/integration/targets/nxos_hsrp_interfaces/tests/cli/replaced.yaml
+++ /dev/null
@@ -1,57 +0,0 @@
----
-- debug:
- msg: "Start nxos_hsrp_interfaces replaced integration tests connection={{ ansible_connection }}"
-
-- set_fact: test_int1="{{ nxos_int1 }}"
-- set_fact: test_int2="{{ nxos_int2 }}"
-- set_fact:
- bfd_enable: enable
- bfd_disable: disable
- when: platform is not search('N35')
-
-- block:
- - name: setup1
- cli_config: &setup_teardown
- config: |
- no feature bfd
- no feature hsrp
- default interface {{ test_int1 }}
- default interface {{ test_int2 }}
-
- - name: setup2
- cli_config:
- config: |
- feature bfd
- feature hsrp
- interface {{ test_int1 }}
- no switchport
- hsrp bfd
- interface {{ test_int2 }}
- no switchport
-
- - name: Replaced
- nxos_hsrp_interfaces: &replaced
- config:
- - name: "{{ test_int1 }}"
- bfd: "{{ bfd_disable|default(omit)}}"
- state: replaced
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'no hsrp bfd' in result.commands"
- msg: "Assert failed. 'result.commands': {{ result.commands }}"
-
- - name: Idempotence - Replaced
- nxos_hsrp_interfaces: *replaced
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config: *setup_teardown
diff --git a/test/integration/targets/nxos_igmp/defaults/main.yaml b/test/integration/targets/nxos_igmp/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_igmp/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_igmp/meta/main.yml b/test/integration/targets/nxos_igmp/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_igmp/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_igmp/tasks/cli.yaml b/test/integration/targets/nxos_igmp/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_igmp/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_igmp/tasks/main.yaml b/test/integration/targets/nxos_igmp/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_igmp/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_igmp/tasks/nxapi.yaml b/test/integration/targets/nxos_igmp/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_igmp/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_igmp/tests/common/sanity.yaml b/test/integration/targets/nxos_igmp/tests/common/sanity.yaml
deleted file mode 100644
index 62b2e12950..0000000000
--- a/test/integration/targets/nxos_igmp/tests/common/sanity.yaml
+++ /dev/null
@@ -1,68 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_igmp sanity test"
-
-- set_fact: restart="true"
- when: platform is not match("N35")
-
-- block:
-
- - name: Configure igmp with non-default values
- nxos_igmp: &non-default
- flush_routes: true
- enforce_rtr_alert: true
- restart: false
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Check Idempotence - Configure igmp interface with non-default values"
- nxos_igmp: *non-default
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: Configure igmp defaults
- nxos_igmp: &default
- flush_routes: false
- enforce_rtr_alert: false
- restart: "{{restart|default(omit)}}"
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence - Configure igmp with defaults"
- nxos_igmp: *default
- register: result
-
- - assert: *false
-
- - name: Configure igmp non-defaults again
- nxos_igmp: *non-default
- register: result
-
- - name: Configure igmp state as values
- nxos_igmp: &sdefault
- state: default
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence - Configure igmp with state default"
- nxos_igmp: *sdefault
- register: result
-
- - assert: *false
-
- always:
- - name: Configure igmp with default values
- nxos_igmp: *sdefault
- register: result
- ignore_errors: yes
-
- - debug: msg="END connection={{ ansible_connection }} nxos_igmp sanity test"
diff --git a/test/integration/targets/nxos_igmp_interface/defaults/main.yaml b/test/integration/targets/nxos_igmp_interface/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_igmp_interface/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_igmp_interface/meta/main.yml b/test/integration/targets/nxos_igmp_interface/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_igmp_interface/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_igmp_interface/tasks/cli.yaml b/test/integration/targets/nxos_igmp_interface/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_igmp_interface/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_igmp_interface/tasks/main.yaml b/test/integration/targets/nxos_igmp_interface/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_igmp_interface/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_igmp_interface/tasks/nxapi.yaml b/test/integration/targets/nxos_igmp_interface/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_igmp_interface/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_igmp_interface/tests/common/sanity.yaml b/test/integration/targets/nxos_igmp_interface/tests/common/sanity.yaml
deleted file mode 100644
index c3df0bb2ba..0000000000
--- a/test/integration/targets/nxos_igmp_interface/tests/common/sanity.yaml
+++ /dev/null
@@ -1,179 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_igmp_interface sanity test"
-
-# Select interface for test
-- set_fact: intname="{{ nxos_int1 }}"
-
-- set_fact: restart="true"
- when: platform is not match("N35")
-
-- name: "Enable feature PIM"
- nxos_feature:
- feature: pim
- state: enabled
- ignore_errors: yes
-
-- name: Put interface in default mode
- nxos_config:
- commands:
- - "default interface {{ intname }}"
- match: none
- ignore_errors: yes
-
-- block:
-
- - name: put interface in L3 and enable PIM
- nxos_config:
- commands:
- - no switchport
- - ip pim sparse-mode
- parents:
- - "interface {{ intname }}"
- match: none
-
- - name: Configure igmp interface with non-default values
- nxos_igmp_interface: &non-default
- interface: "{{ intname }}"
- version: 3
- startup_query_interval: 60
- startup_query_count: 5
- robustness: 6
- querier_timeout: 2000
- query_mrt: 12
- query_interval: 200
- last_member_qrt: 2
- last_member_query_count: 4
- report_llg: true
- immediate_leave: true
- group_timeout: 300
- oif_ps:
- - source: 192.0.2.1
- prefix: 239.255.255.2
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Check Idempotence - Configure igmp interface with non-default values"
- nxos_igmp_interface: *non-default
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: Configure igmp interface with some default values
- nxos_igmp_interface: &sdef
- interface: "{{ intname }}"
- version: default
- startup_query_interval: default
- startup_query_count: default
- robustness: default
- querier_timeout: default
- query_mrt: default
- query_interval: default
- last_member_qrt: default
- last_member_query_count: default
- group_timeout: default
- oif_ps:
- - {'prefix': '238.2.2.6'}
- - {'prefix': '238.2.2.5'}
- - {'source': '192.0.2.1', 'prefix': '238.2.2.5'}
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence - Configure igmp interface with some default values"
- nxos_igmp_interface: *sdef
- register: result
-
- - assert: *false
-
- - name: restart igmp
- nxos_igmp_interface: &restart
- interface: "{{ intname }}"
- restart: "{{restart|default(omit)}}"
-
- - name: Configure igmp interface with default oif_ps
- nxos_igmp_interface: &defoif
- interface: "{{ intname }}"
- oif_ps: default
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence - Configure igmp interface with default oif_ps"
- nxos_igmp_interface: *defoif
- register: result
-
- - assert: *false
-
- - name: Configure igmp interface with oif_routemap
- nxos_igmp_interface: &orm
- interface: "{{ intname }}"
- version: 3
- startup_query_interval: 60
- startup_query_count: 5
- robustness: 6
- oif_routemap: abcd
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence - Configure igmp interface with oif_routemap"
- nxos_igmp_interface: *orm
- register: result
-
- - assert: *false
-
- - name: Configure igmp interface with default state
- nxos_igmp_interface: &default
- interface: "{{ intname }}"
- state: default
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence - Configure igmp interface with default state"
- nxos_igmp_interface: *default
- register: result
-
- - assert: *false
-
- - name: Configure igmp interface with absent state
- nxos_igmp_interface: &absent
- interface: "{{ intname }}"
- state: absent
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence - Configure igmp interface with absent state"
- nxos_igmp_interface: *absent
- register: result
-
- - assert: *false
-
- always:
- - name: Configure igmp interface with absent state
- nxos_igmp_interface: *absent
- register: result
-
- - name: Put interface in default mode
- nxos_config:
- commands:
- - "default interface {{ intname }}"
- match: none
-
- - name: "Disable feature PIM"
- nxos_feature:
- feature: pim
- state: disabled
- ignore_errors: yes
-
- - debug: msg="END connection={{ ansible_connection }} nxos_igmp_interface sanity test"
diff --git a/test/integration/targets/nxos_igmp_snooping/defaults/main.yaml b/test/integration/targets/nxos_igmp_snooping/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_igmp_snooping/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_igmp_snooping/meta/main.yml b/test/integration/targets/nxos_igmp_snooping/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_igmp_snooping/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_igmp_snooping/tasks/cli.yaml b/test/integration/targets/nxos_igmp_snooping/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_igmp_snooping/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_igmp_snooping/tasks/main.yaml b/test/integration/targets/nxos_igmp_snooping/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_igmp_snooping/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_igmp_snooping/tasks/nxapi.yaml b/test/integration/targets/nxos_igmp_snooping/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_igmp_snooping/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_igmp_snooping/tests/common/sanity.yaml b/test/integration/targets/nxos_igmp_snooping/tests/common/sanity.yaml
deleted file mode 100644
index 25e55b3872..0000000000
--- a/test/integration/targets/nxos_igmp_snooping/tests/common/sanity.yaml
+++ /dev/null
@@ -1,109 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_igmp_snooping sanity test"
-
-- meta: end_host
- # show ip igmp snooping | json does not work on some platforms
- when: platform is search('N6K')
-
-- set_fact: gt_run="false"
-- block:
- - set_fact: gt_run="true"
- - set_fact: group_timeout="never"
- - set_fact: def_group_timeout="default"
- when: platform is not search('N35|N5K|N6K')
-
-- name: Setup
- nxos_igmp_snooping: &default
- state: default
-
-- block:
- - name: Configure igmp snooping with non-default values
- nxos_igmp_snooping: &non-default
- snooping: false
- # group_timeout: n/a when snooping:false
- link_local_grp_supp: false
- report_supp: false
- v3_report_supp: true
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
- - block:
- - name: "Check Idempotence - Configure igmp snooping with non-default values"
- nxos_igmp_snooping: *non-default
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
- when: (imagetag and (imagetag is version_compare('D1', 'ne')))
-
- - block:
- - name: Negative Test config group-timeout when igmp snooping disabled
- nxos_igmp_snooping:
- snooping: false
- group_timeout: "{{group_timeout|default(omit)}}"
- state: present
- ignore_errors: yes
- register: result
-
- - assert:
- that:
- - "result.failed == true"
- - "result.msg == 'group-timeout cannot be enabled or changed when ip igmp snooping is disabled'"
-
- - name: Configure group-timeout non-default
- nxos_igmp_snooping: &non-defgt
- snooping: true
- group_timeout: "{{group_timeout|default(omit)}}"
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_igmp_snooping: *non-defgt
- register: result
-
- - assert: *false
- when: gt_run
-
- - name: Configure igmp snooping with default group timeout
- nxos_igmp_snooping: &defgt
- group_timeout: "{{def_group_timeout|default(omit)}}"
- state: present
- register: result
-
- - assert: *true
- when: gt_run
-
- - block:
- - name: "Check Idempotence"
- nxos_igmp_snooping: *defgt
- register: result
-
- - assert: *false
- when: gt_run or (imagetag and (imagetag is version_compare('D1', 'ne')))
-
- - name: Configure igmp snooping with default values
- nxos_igmp_snooping: *default
- register: result
-
- - assert: *true
-
- - block:
- - name: "Check Idempotence - Configure igmp snooping with default values"
- nxos_igmp_snooping: *default
- register: result
-
- - assert: *false
- when: (imagetag and (imagetag is version_compare('D1', 'ne')))
-
- always:
- - name: Configure igmp snooping with default values
- nxos_igmp_snooping: *default
- register: result
-
- - debug: msg="END connection={{ ansible_connection }} nxos_igmp_snooping sanity test"
diff --git a/test/integration/targets/nxos_install_os/defaults/main.yaml b/test/integration/targets/nxos_install_os/defaults/main.yaml
deleted file mode 100644
index a5a0790123..0000000000
--- a/test/integration/targets/nxos_install_os/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: ""
-test_items: []
diff --git a/test/integration/targets/nxos_install_os/meta/main.yml b/test/integration/targets/nxos_install_os/meta/main.yml
deleted file mode 100644
index 58de46745f..0000000000
--- a/test/integration/targets/nxos_install_os/meta/main.yml
+++ /dev/null
@@ -1,3 +0,0 @@
-dependencies:
- # Prepare nxos tests is not required for this test.
- #- prepare_nxos_tests
diff --git a/test/integration/targets/nxos_install_os/tasks/httpapi.yaml b/test/integration/targets/nxos_install_os/tasks/httpapi.yaml
deleted file mode 100644
index 34516c8eb0..0000000000
--- a/test/integration/targets/nxos_install_os/tasks/httpapi.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (ansible_connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_install_os/tasks/main.yaml b/test/integration/targets/nxos_install_os/tasks/main.yaml
deleted file mode 100644
index 0530efb6b3..0000000000
--- a/test/integration/targets/nxos_install_os/tasks/main.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-# Upgrade using SSH
-- include: network_cli.yaml
- when: ansible_connection == 'network_cli'
-
-# Upgrade using NX-API
-- include: httpapi.yaml
- when: ansible_connection == 'httpapi' \ No newline at end of file
diff --git a/test/integration/targets/nxos_install_os/tasks/network_cli.yaml b/test/integration/targets/nxos_install_os/tasks/network_cli.yaml
deleted file mode 100644
index 497a535b24..0000000000
--- a/test/integration/targets/nxos_install_os/tasks/network_cli.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (ansible_connection=network_cli)
- include: "{{ test_case_to_run }} ansible_connection=network_cli connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_install_os/tasks/upgrade/clear_persistent_sockets.yaml b/test/integration/targets/nxos_install_os/tasks/upgrade/clear_persistent_sockets.yaml
deleted file mode 100644
index 1e62116e7c..0000000000
--- a/test/integration/targets/nxos_install_os/tasks/upgrade/clear_persistent_sockets.yaml
+++ /dev/null
@@ -1,19 +0,0 @@
----
-# This playbook is only provided for reference as a brute force way to
-# clear persistent connections on an Ansible server. This was a workaround
-# for a problem with meta: reset_connection but should not be used in
-# ansible release 2.6 or later.
-- name: Clean up sockets with file module
- file:
- state: absent
- path: "{{ home }}/.ansible/pc/"
- delegate_to: 127.0.0.1
-
-- name: "Display socket info after delete"
- shell: "/bin/ls {{ home }}/.ansible"
- args:
- executable: /bin/bash
- delegate_to: 127.0.0.1
- register: output
-
-- debug: msg="Local Socket Info {{ output['stdout_lines'] }}"
diff --git a/test/integration/targets/nxos_install_os/tasks/upgrade/copy_kick_system_images.yaml b/test/integration/targets/nxos_install_os/tasks/upgrade/copy_kick_system_images.yaml
deleted file mode 100644
index 9e117835c7..0000000000
--- a/test/integration/targets/nxos_install_os/tasks/upgrade/copy_kick_system_images.yaml
+++ /dev/null
@@ -1,60 +0,0 @@
----
-- set_fact: ignore_errors_httpapi='no'
-- set_fact: ignore_errors_httpapi='yes'
- when: ansible_connection == 'httpapi'
-
-- include: targets/nxos_install_os/tasks/upgrade/enable_scp_server.yaml
-
-- name: 'Remove SSH known_hosts file before scp of image file'
- nxos_command:
- commands: 'run bash rm /var/home/admin/.ssh/known_hosts'
- ignore_errors: yes
-
-- name: "Copy {{ si }} to bootflash"
- nxos_file_copy:
- file_pull: True
- file_pull_timeout: 1200
- remote_file: "{{image_dir}}{{ si }}"
- remote_scp_server: "{{ remote_scp_server }}"
- remote_scp_server_user: "{{ remote_scp_user }}"
- remote_scp_server_password: "{{ remote_scp_password }}"
- register: result
-
-#- name: "Copy {{ si }} to bootflash"
-# expect:
-# command: "scp {{image_dir}}{{ si }} {{ ansible_ssh_user }}@{{ ansible_ssh_host }}:"
-# responses:
-# (?i)Are you sure you want to continue connecting.*: yes
-# (?i)password: "{{ ansible_ssh_pass }}"
-# timeout: 1800
-# register: result
-
-- debug:
- msg: "{{ item.key }} {{ item.value }}"
- with_dict: "{{ result }}"
-
-- name: "Copy {{ ki }} to bootflash"
- nxos_file_copy:
- file_pull: True
- file_pull_timeout: 1200
- remote_file: "{{image_dir}}{{ ki }}"
- remote_scp_server: "{{ remote_scp_server }}"
- remote_scp_server_user: "{{ remote_scp_user }}"
- remote_scp_server_password: "{{ remote_scp_password }}"
- when: ki is defined
- register: result
-
-#- name: "Copy {{ ki }} to bootflash"
-# expect:
-# command: "scp {{image_dir}}{{ ki }} {{ ansible_ssh_user }}@{{ ansible_ssh_host }}:"
-# responses:
-# (?i)Are you sure you want to continue connecting.*: yes
-# (?i)password: "{{ ansible_ssh_pass }}"
-# timeout: 1800
-# when: ki is defined
-# register: result
-
-- debug:
- msg: "{{ item.key }} {{ item.value }}"
- with_dict: "{{ result }}"
- when: ki is defined
diff --git a/test/integration/targets/nxos_install_os/tasks/upgrade/delete_files.yaml b/test/integration/targets/nxos_install_os/tasks/upgrade/delete_files.yaml
deleted file mode 100644
index 27157b690b..0000000000
--- a/test/integration/targets/nxos_install_os/tasks/upgrade/delete_files.yaml
+++ /dev/null
@@ -1,10 +0,0 @@
----
-- name: "Delete Files To Make Room On Bootflash"
- nxos_config: &remove_file
- lines:
- - terminal dont-ask
- - allow delete boot-image
- - "delete {{ item }}"
- match: none
- ignore_errors: yes
- with_items: "{{ delete_image_list }}"
diff --git a/test/integration/targets/nxos_install_os/tasks/upgrade/enable_scp_server.yaml b/test/integration/targets/nxos_install_os/tasks/upgrade/enable_scp_server.yaml
deleted file mode 100644
index f8a4e54e34..0000000000
--- a/test/integration/targets/nxos_install_os/tasks/upgrade/enable_scp_server.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-- name: "Setup - Turn on feature scp-server"
- nxos_feature:
- feature: scp-server
- state: enabled
diff --git a/test/integration/targets/nxos_install_os/tasks/upgrade/install_os.yaml b/test/integration/targets/nxos_install_os/tasks/upgrade/install_os.yaml
deleted file mode 100644
index a7d21a5117..0000000000
--- a/test/integration/targets/nxos_install_os/tasks/upgrade/install_os.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-- include: targets/nxos_install_os/tasks/upgrade/delete_files.yaml
- when: delete_files
-
-- include: "targets/nxos_install_os/tasks/upgrade/copy_kick_system_images.yaml ansible_connection=network_cli connection={{ cli }}"
- when: copy_images
-
-- include: targets/nxos_install_os/tasks/upgrade/install_with_kick.yaml
- when: ki is defined
-
-- include: targets/nxos_install_os/tasks/upgrade/install_system.yaml
- when: ki is undefined
-
-# Only needed when - meta: reset_connection does not work. Fixed in 2.6
-#- include: targets/nxos_install_os/tasks/upgrade/clear_persistent_sockets.yaml
-
-- meta: reset_connection
-
-- name: "Check installed OS for newly installed version {{ tv }}"
- nxos_command:
- commands: ['show version | json']
- register: output
-
-- debug: msg="Version detected {{ output['stdout_lines'][0]['kickstart_ver_str'] }}"
diff --git a/test/integration/targets/nxos_install_os/tasks/upgrade/install_system.yaml b/test/integration/targets/nxos_install_os/tasks/upgrade/install_system.yaml
deleted file mode 100644
index 09ed721649..0000000000
--- a/test/integration/targets/nxos_install_os/tasks/upgrade/install_system.yaml
+++ /dev/null
@@ -1,52 +0,0 @@
----
-- name: "Install OS image {{ si }}"
- check_mode: "{{ checkmode }}"
- nxos_install_os:
- system_image_file: "{{ si }}"
- issu: "{{ issu }}"
- register: result
- when: not force
-
-- name: "Remove old boot pointers if any"
- nxos_config:
- lines:
- - no boot nxos
- - no boot kickstart
- - no boot system
- match: line
- ignore_errors: yes
- when: force
-
-- name: "Set OS image {{ si }} boot pointers"
- nxos_config:
- lines:
- - "boot nxos bootflash:{{ si }}"
- - copy run start
- match: line
- when: force
-
-- name: "Boot image {{ si }} using reload"
- nxos_config:
- lines:
- - 'terminal dont-ask'
- - 'reload'
- ignore_errors: yes
- when: force
-
-- debug: msg=" {{ result['install_state'] }}"
- when: not force
-
-- name: Wait for device to come back up with new image
- wait_for:
- port: 22
- state: started
- timeout: 500
- delay: 60
- host: "{{ inventory_hostname }}"
- when: result.changed and not checkmode
-
-- debug: msg='Wait 5 mins to allow system to stabilize'
- when: result.changed and not checkmode
-- pause:
- seconds: 300
- when: result.changed and not checkmode
diff --git a/test/integration/targets/nxos_install_os/tasks/upgrade/install_with_kick.yaml b/test/integration/targets/nxos_install_os/tasks/upgrade/install_with_kick.yaml
deleted file mode 100644
index 8d02cb9a78..0000000000
--- a/test/integration/targets/nxos_install_os/tasks/upgrade/install_with_kick.yaml
+++ /dev/null
@@ -1,44 +0,0 @@
----
-- name: "Install OS image {{ si }}"
- check_mode: "{{ checkmode }}"
- nxos_install_os:
- system_image_file: "{{ si }}"
- kickstart_image_file: "{{ ki }}"
- issu: "{{ issu }}"
- register: result
- when: not force
-
-- name: "Set OS image {{ si }} boot pointers"
- nxos_config:
- lines:
- - no boot kickstart
- - no boot system
- - "boot kickstart bootflash:{{ ki }}"
- - "boot system bootflash:{{ si }}"
- - copy run start
- match: line
- when: force
-
-- name: "Boot image {{ si }} using reload"
- nxos_command:
- commands: 'terminal dont-ask ; reload'
- ignore_errors: yes
- when: force
-
-- debug: msg=" {{ result['install_state'] }}"
- when: not force
-
-- name: Wait for device to come back up with new image
- wait_for:
- port: 22
- state: started
- timeout: 500
- delay: 60
- host: "{{ inventory_hostname }}"
- when: result.changed and not checkmode
-
-- debug: msg='Wait 5 mins to allow system to stabilize'
- when: result.changed and not checkmode
-- pause:
- seconds: 300
- when: result.changed and not checkmode
diff --git a/test/integration/targets/nxos_install_os/tasks/upgrade/main_os_install.yaml b/test/integration/targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
deleted file mode 100644
index 5af834dc18..0000000000
--- a/test/integration/targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
----
-- debug: msg="***WARNING*** Remove meta end_play to verify this module ***WARNING***"
-
-- meta: end_play
-
-- include: targets/nxos_install_os/tasks/upgrade/install_os.yaml
diff --git a/test/integration/targets/nxos_install_os/tests/common/upgrade.yaml b/test/integration/targets/nxos_install_os/tests/common/upgrade.yaml
deleted file mode 100644
index 5211c51fc1..0000000000
--- a/test/integration/targets/nxos_install_os/tests/common/upgrade.yaml
+++ /dev/null
@@ -1,59 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
- when: connection is defined
-
-- set_fact: image_dir='/Users/mwiebe/Projects/nxos_ansible/images/'
-
-- set_fact: checkmode='no'
-- set_fact: issu='desired'
-- set_fact: copy_images=True
-
-# Set boot pointers and reload
-- set_fact: force=False
-
-- set_fact: delete_files=True
-- set_fact:
- delete_image_list:
- - nxos.7.0.3.I7.2.bin
- - nxos.7.0.3.I7.3.bin
-
-#---------------------------------------------------------#
-# Upgrade to 6.0(2)U6(1a) #
-#---------------------------------------------------------#
-
-- set_fact: si='n3000-uk9.6.0.2.U6.1a.bin'
-- set_fact: ki='n3000-uk9-kickstart.6.0.2.U6.1a.bin'
-
-- name: Upgrade to U6.1a
- include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
-
-#---------------------------------------------------------#
-# Upgrade to 6.0(2)U6(2a) #
-#---------------------------------------------------------#
-
-- set_fact: si='n3000-uk9.6.0.2.U6.2a.bin'
-- set_fact: ki='n3000-uk9-kickstart.6.0.2.U6.2a.bin'
-
-- name: Upgrade to U6.2a
- include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
-
-#---------------------------------------------------------#
-# Upgrade to 6.0(2)U6(3a) #
-#---------------------------------------------------------#
-
-- set_fact: si='n3000-s2-dk9.8.0.1.bin'
-- set_fact: ki='n3000-s2-kickstart.8.0.1.bin'
-
-- name: Upgrade to U6.3a
- include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
-
-#---------------------------------------------------------#
-# Upgrade to 7.0(3)I7(2) #
-#---------------------------------------------------------#
-
-- set_fact: si='nxos.7.0.3.I7.2.bin'
-
-- name: Upgrade to 7.0.3.I7.2
- include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
-
-- debug: msg="END connection={{ ansible_connection }} nxos_os_install upgrade"
diff --git a/test/integration/targets/nxos_install_os/tests/common/upgrade_n3172_greensboro.yaml b/test/integration/targets/nxos_install_os/tests/common/upgrade_n3172_greensboro.yaml
deleted file mode 100644
index 4c4086bd99..0000000000
--- a/test/integration/targets/nxos_install_os/tests/common/upgrade_n3172_greensboro.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
- when: connection is defined
-
-# Set directory pointer to software images
-- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/greensboro/REL_7_0_3_I7_4/'
-
-- set_fact: checkmode='no'
-- set_fact: issu='no'
-- set_fact: copy_images=True
-
-# Set boot pointers and reload
-- set_fact: force=False
-
-- set_fact: delete_files=True
-- set_fact:
- delete_image_list:
- - nxos*.bin
- - n3000*.bin
-
-#---------------------------------------------------------#
-# Upgrade Device #
-#---------------------------------------------------------#
-- set_fact: si='nxos.7.0.3.I7.4.bin'
-
-- name: Upgrade N3172 Device to Greensboro Release Image
- include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
diff --git a/test/integration/targets/nxos_install_os/tests/common/upgrade_n3172_u61a.yaml b/test/integration/targets/nxos_install_os/tests/common/upgrade_n3172_u61a.yaml
deleted file mode 100644
index 3d72792c6f..0000000000
--- a/test/integration/targets/nxos_install_os/tests/common/upgrade_n3172_u61a.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
- when: connection is defined
-
-# Set directory pointer to software images
-- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/602U6_1/'
-
-- set_fact: checkmode='no'
-- set_fact: issu='desired'
-- set_fact: copy_images=True
-
-# Set boot pointers and reload
-- set_fact: force=False
-
-- set_fact: delete_files=True
-- set_fact:
- delete_image_list:
- - n3000*.bin
- - nxos*.bin
-
-#---------------------------------------------------------#
-# Upgrade Device #
-#---------------------------------------------------------#
-- set_fact: si='n3000-uk9.6.0.2.U6.1a.bin'
-- set_fact: ki='n3000-uk9-kickstart.6.0.2.U6.1a.bin'
-
-- name: Upgrade N3500 Device to U61a Release Image
- include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
diff --git a/test/integration/targets/nxos_install_os/tests/common/upgrade_n3172_u62a.yaml b/test/integration/targets/nxos_install_os/tests/common/upgrade_n3172_u62a.yaml
deleted file mode 100644
index 35de71810b..0000000000
--- a/test/integration/targets/nxos_install_os/tests/common/upgrade_n3172_u62a.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
- when: connection is defined
-
-# Set directory pointer to software images
-- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/602U6_2/'
-
-- set_fact: checkmode='no'
-- set_fact: issu='no'
-- set_fact: copy_images=True
-
-# Set boot pointers and reload
-- set_fact: force=False
-
-- set_fact: delete_files=True
-- set_fact:
- delete_image_list:
- - n3000*.bin
- - nxos*.bin
-
-#---------------------------------------------------------#
-# Upgrade Device #
-#---------------------------------------------------------#
-- set_fact: si='n3000-uk9.6.0.2.U6.2a.bin'
-- set_fact: ki='n3000-uk9-kickstart.6.0.2.U6.2a.bin'
-
-- name: Upgrade N3500 Device to U62a Release Image
- include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
diff --git a/test/integration/targets/nxos_install_os/tests/common/upgrade_n3172_u63a.yaml b/test/integration/targets/nxos_install_os/tests/common/upgrade_n3172_u63a.yaml
deleted file mode 100644
index e9b02b3684..0000000000
--- a/test/integration/targets/nxos_install_os/tests/common/upgrade_n3172_u63a.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
- when: connection is defined
-
-# Set directory pointer to software images
-- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/602U6_3/'
-
-- set_fact: checkmode='no'
-- set_fact: issu='desired'
-- set_fact: copy_images=True
-
-# Set boot pointers and reload
-- set_fact: force=False
-
-- set_fact: delete_files=True
-- set_fact:
- delete_image_list:
- - n3000*.bin
- - nxos*.bin
-
-#---------------------------------------------------------#
-# Upgrade Device #
-#---------------------------------------------------------#
-- set_fact: si='n3000-uk9.6.0.2.U6.3a.bin'
-- set_fact: ki='n3000-uk9-kickstart.6.0.2.U6.3a.bin'
-
-- name: Upgrade N3500 Device to U63a Release Image
- include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
diff --git a/test/integration/targets/nxos_install_os/tests/common/upgrade_n35_62a88.yaml b/test/integration/targets/nxos_install_os/tests/common/upgrade_n35_62a88.yaml
deleted file mode 100644
index 2a87ff4b58..0000000000
--- a/test/integration/targets/nxos_install_os/tests/common/upgrade_n35_62a88.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
- when: connection is defined
-
-# Set directory pointer to software images
-- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/602A8_8/'
-
-- set_fact: checkmode='no'
-- set_fact: issu='desired'
-- set_fact: copy_images=True
-
-# Set boot pointers and reload
-- set_fact: force=False
-
-- set_fact: delete_files=True
-- set_fact:
- delete_image_list:
- - n3000*.bin
- - n3500*.bin
-
-#---------------------------------------------------------#
-# Upgrade Device #
-#---------------------------------------------------------#
-- set_fact: si='n3500-uk9.6.0.2.A8.8.bin'
-- set_fact: ki='n3500-uk9-kickstart.6.0.2.A8.8.bin'
-
-- name: Upgrade N3500 Device to A8_8 Release Image
- include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
diff --git a/test/integration/targets/nxos_install_os/tests/common/upgrade_n35_greensboro.yaml b/test/integration/targets/nxos_install_os/tests/common/upgrade_n35_greensboro.yaml
deleted file mode 100644
index 1ac5cb409d..0000000000
--- a/test/integration/targets/nxos_install_os/tests/common/upgrade_n35_greensboro.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
- when: connection is defined
-
-# Set directory pointer to software images
-- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/greensboro/REL_7_0_3_I7_4/'
-
-- set_fact: checkmode='no'
-- set_fact: issu='desired'
-- set_fact: copy_images=False
-
-# Set boot pointers and reload
-- set_fact: force=False
-
-- set_fact: delete_files=False
-- set_fact:
- delete_image_list:
- - nxos*.bin
- - n3500*.bin
-
-#---------------------------------------------------------#
-# Upgrade Device #
-#---------------------------------------------------------#
-- set_fact: si='nxos.7.0.3.I7.4.bin'
-
-- name: Upgrade N3500 Device to Greensboro Release Image
- include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
diff --git a/test/integration/targets/nxos_install_os/tests/common/upgrade_n5k_730_N11.yaml b/test/integration/targets/nxos_install_os/tests/common/upgrade_n5k_730_N11.yaml
deleted file mode 100644
index 4d119133f2..0000000000
--- a/test/integration/targets/nxos_install_os/tests/common/upgrade_n5k_730_N11.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
- when: connection is defined
-
-# Set directory pointer to software images
-- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/730_N11/'
-
-- set_fact: checkmode='no'
-- set_fact: issu='no'
-- set_fact: copy_images=True
-
-# Set boot pointers and reload
-- set_fact: force=False
-
-- set_fact: delete_files=True
-- set_fact:
- delete_image_list:
- - n6000*.bin
-
-#---------------------------------------------------------#
-# Upgrade Device #
-#---------------------------------------------------------#
-- set_fact: si='n6000-uk9.7.3.0.N1.1.bin'
-- set_fact: ki='n6000-uk9-kickstart.7.3.0.N1.1.bin'
-
-- name: Upgrade N5k Device to 7.3(0)N1(1) Release Image
- include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
diff --git a/test/integration/targets/nxos_install_os/tests/common/upgrade_n5k_733_N11.yaml b/test/integration/targets/nxos_install_os/tests/common/upgrade_n5k_733_N11.yaml
deleted file mode 100644
index 1e585567ad..0000000000
--- a/test/integration/targets/nxos_install_os/tests/common/upgrade_n5k_733_N11.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
- when: connection is defined
-
-# Set directory pointer to software images
-- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/733_N11/'
-
-- set_fact: checkmode='no'
-- set_fact: issu='no'
-- set_fact: copy_images=False
-
-# Set boot pointers and reload
-- set_fact: force=False
-
-- set_fact: delete_files=False
-- set_fact:
- delete_image_list:
- - n6000*.bin
-
-#---------------------------------------------------------#
-# Upgrade Device #
-#---------------------------------------------------------#
-- set_fact: si='n6000-uk9.7.3.3.N1.1.bin'
-- set_fact: ki='n6000-uk9-kickstart.7.3.3.N1.1.bin'
-
-- name: Upgrade N5k Device to 7.3(3)N1(1) Release Image
- include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
diff --git a/test/integration/targets/nxos_install_os/tests/common/upgrade_n7k_atherton.yaml b/test/integration/targets/nxos_install_os/tests/common/upgrade_n7k_atherton.yaml
deleted file mode 100644
index 31e0620fb2..0000000000
--- a/test/integration/targets/nxos_install_os/tests/common/upgrade_n7k_atherton.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
- when: connection is defined
-
-# Set directory pointer to software images
-- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/atherton/REL_8_0_1/'
-
-- set_fact: checkmode='no'
-- set_fact: issu='no'
-- set_fact: copy_images=True
-
-# Set boot pointers and reload
-- set_fact: force=False
-
-- set_fact: delete_files=True
-- set_fact:
- delete_image_list:
- - n7000*.bin
-
-#---------------------------------------------------------#
-# Upgrade Device #
-#---------------------------------------------------------#
-- set_fact: si='n7000-s2-dk9.8.0.1.bin'
-- set_fact: ki='n7000-s2-kickstart.8.0.1.bin'
-
-- name: Upgrade N7k Device to Atherton Release Image
- include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
diff --git a/test/integration/targets/nxos_install_os/tests/common/upgrade_n7k_helsinki.yaml b/test/integration/targets/nxos_install_os/tests/common/upgrade_n7k_helsinki.yaml
deleted file mode 100644
index ba6122e85b..0000000000
--- a/test/integration/targets/nxos_install_os/tests/common/upgrade_n7k_helsinki.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
- when: connection is defined
-
-# Set directory pointer to software images
-- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/helsinki/REL_7_3_0_D1_1/'
-
-- set_fact: checkmode='no'
-- set_fact: issu='no'
-- set_fact: copy_images=True
-
-# Set boot pointers and reload
-- set_fact: force=True
-
-- set_fact: delete_files=True
-- set_fact:
- delete_image_list:
- - n7000*.bin
-
-#---------------------------------------------------------#
-# Upgrade Device #
-#---------------------------------------------------------#
-- set_fact: si='n7000-s2-dk9.7.3.0.D1.1.bin'
-- set_fact: ki='n7000-s2-kickstart.7.3.0.D1.1.bin'
-
-- name: Upgrade N7k Device to Helsinki Release Image
- include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
diff --git a/test/integration/targets/nxos_install_os/tests/common/upgrade_n9k_greensboro.yaml b/test/integration/targets/nxos_install_os/tests/common/upgrade_n9k_greensboro.yaml
deleted file mode 100644
index b95cc27b1e..0000000000
--- a/test/integration/targets/nxos_install_os/tests/common/upgrade_n9k_greensboro.yaml
+++ /dev/null
@@ -1,39 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
- when: connection is defined
-
-# Set directory pointer to software images
-- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/greensboro/REL_7_0_3_I7_4/'
-
-- set_fact: checkmode='no'
-- set_fact: issu='desired'
-- set_fact: copy_images=True
-
-# Set boot pointers and reload
-- set_fact: force=False
-
-- set_fact: delete_files=True
-- set_fact:
- delete_image_list:
- - nxos*.bin
-
-#---------------------------------------------------------#
-# Remove incompatible features #
-#---------------------------------------------------------#
-- name: Unconfigure features that will conflict with upgrade
- nxos_config:
- lines:
- - terminal dont-ask
- - no feature nv overlay
- - no nxapi ssl protocols
- - no nxapi ssl ciphers weak
- match: none
- ignore_errors: yes
-
-#---------------------------------------------------------#
-# Upgrade Device #
-#---------------------------------------------------------#
-- set_fact: si='nxos.7.0.3.I7.4.bin'
-
-- name: Upgrade N9k Device to Greensboro Release Image
- include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
diff --git a/test/integration/targets/nxos_install_os/tests/common/upgrade_n9k_greensboro_force.yaml b/test/integration/targets/nxos_install_os/tests/common/upgrade_n9k_greensboro_force.yaml
deleted file mode 100644
index 9f6a148145..0000000000
--- a/test/integration/targets/nxos_install_os/tests/common/upgrade_n9k_greensboro_force.yaml
+++ /dev/null
@@ -1,39 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
- when: connection is defined
-
-# Set directory pointer to software images
-- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/greensboro/REL_7_0_3_I7_4/'
-
-- set_fact: checkmode='no'
-- set_fact: issu='desired'
-- set_fact: copy_images=True
-
-# Set boot pointers and reload
-- set_fact: force=True
-
-- set_fact: delete_files=True
-- set_fact:
- delete_image_list:
- - nxos*.bin
-
-#---------------------------------------------------------#
-# Remove incompatible features #
-#---------------------------------------------------------#
-- name: Unconfigure features that will conflict with upgrade
- nxos_config:
- lines:
- - terminal dont-ask
- - no feature nv overlay
- - no nxapi ssl protocols
- - no nxapi ssl ciphers weak
- match: none
- ignore_errors: yes
-
-#---------------------------------------------------------#
-# Upgrade Device #
-#---------------------------------------------------------#
-- set_fact: si='nxos.7.0.3.I7.4.bin'
-
-- name: Upgrade N9k Device to Greensboro Release Image
- include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
diff --git a/test/integration/targets/nxos_install_os/tests/common/upgrade_n9k_hamilton.yaml b/test/integration/targets/nxos_install_os/tests/common/upgrade_n9k_hamilton.yaml
deleted file mode 100644
index b52e2044b5..0000000000
--- a/test/integration/targets/nxos_install_os/tests/common/upgrade_n9k_hamilton.yaml
+++ /dev/null
@@ -1,37 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_os_install upgrade"
- when: connection is defined
-
-# Set directory pointer to software images
-- set_fact: image_dir='/auto/fe_ssr/agents-ci/agents_images/release_images/hamilton/REL_9_2_1/'
-
-- set_fact: checkmode='no'
-- set_fact: issu='desired'
-- set_fact: copy_images=True
-
-# Set boot pointers and reload
-- set_fact: force=False
-
-- set_fact: delete_files=True
-- set_fact:
- delete_image_list:
- - nxos*.bin
-
-#---------------------------------------------------------#
-# Remove incompatible features #
-#---------------------------------------------------------#
-- name: Unconfigure features that will conflict with upgrade
- nxos_config:
- lines:
- - terminal dont-ask
- - no feature ngmvpn
- match: none
- ignore_errors: yes
-
-#---------------------------------------------------------#
-# Upgrade Device #
-#---------------------------------------------------------#
-- set_fact: si='nxos.9.2.1.bin'
-
-- name: Upgrade N9k Device to Hamilton Release Image
- include: targets/nxos_install_os/tasks/upgrade/main_os_install.yaml
diff --git a/test/integration/targets/nxos_interface/defaults/main.yaml b/test/integration/targets/nxos_interface/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_interface/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_interface/meta/main.yml b/test/integration/targets/nxos_interface/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_interface/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_interface/tasks/cli.yaml b/test/integration/targets/nxos_interface/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_interface/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_interface/tasks/main.yaml b/test/integration/targets/nxos_interface/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_interface/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_interface/tasks/nxapi.yaml b/test/integration/targets/nxos_interface/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_interface/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_interface/tests/common/intent.yaml b/test/integration/targets/nxos_interface/tests/common/intent.yaml
deleted file mode 100644
index b3c0f42fb3..0000000000
--- a/test/integration/targets/nxos_interface/tests/common/intent.yaml
+++ /dev/null
@@ -1,63 +0,0 @@
-- debug: msg="START connection={{ ansible_connection }} nxos_interface intent test"
-
-- set_fact: testint1="{{ nxos_int1 }}"
-- set_fact: testint2="{{ nxos_int2 }}"
-
-- name: "Setup: Put interfaces into a default state"
- nxos_config:
- lines:
- - "default interface {{ testint1 }}"
- - "default interface {{ testint2 }}"
- ignore_errors: yes
-
-- name: Check intent arguments
- nxos_interface:
- name: "{{ testint2 }}"
- admin_state: up
- tx_rate: ge(0)
- rx_rate: ge(0)
- register: result
-
-- assert:
- that:
- - "result.failed == false"
-
-- name: "Clear interface {{ testint2 }} counters before next task"
- nxos_command:
- commands: "clear counters interface {{ testint2 }}"
- ignore_errors: yes
-
-- name: Check intent arguments (failed condition)
- nxos_interface:
- name: "{{ testint2 }}"
- admin_state: down
- tx_rate: gt(10000)
- rx_rate: lt(0)
- ignore_errors: yes
- register: result
-
-- assert:
- that:
- - "result.failed == true"
- - "'tx_rate gt(10000)' in result.failed_conditions"
- - "'rx_rate lt(0)' in result.failed_conditions"
-
-- name: aggregate definition of interface
- nxos_interface:
- aggregate:
- - { name: "{{ testint1 }}", description: "Test aggregation on first interface" }
- - { name: "{{ testint2 }}", mode: layer3 }
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: "TearDown: Put interfaces into a default state"
- nxos_config:
- lines:
- - "default interface {{ testint1 }}"
- - "default interface {{ testint2 }}"
- ignore_errors: yes
-
-- debug: msg="END connection={{ ansible_connection }} nxos_interface intent test"
diff --git a/test/integration/targets/nxos_interface/tests/common/sanity.yaml b/test/integration/targets/nxos_interface/tests/common/sanity.yaml
deleted file mode 100644
index 3151152eb0..0000000000
--- a/test/integration/targets/nxos_interface/tests/common/sanity.yaml
+++ /dev/null
@@ -1,117 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_interface sanity test"
-
-- set_fact: testint="{{ nxos_int1 }}"
-
-- name: "Setup: Enable feature interface-vlan"
- nxos_feature:
- feature: interface-vlan
- state: enabled
- ignore_errors: yes
-
-- name: "Setup: Put interface {{ testint }} into a default state"
- nxos_config: &intcleanup
- lines:
- - "default interface {{ testint }}"
- ignore_errors: yes
-
-- name: "Setup: Remove possibly existing vlan interfaces"
- nxos_config: &vlanintcleanup
- lines:
- - "no interface vlan 2"
- - "no interface vlan 710"
- - "no interface vlan 711"
- - "no interface vlan 712"
- ignore_errors: yes
-
-- block:
- - name: "Configure layer3 params"
- nxos_interface: &l3config
- interface: "{{ testint }}"
- mode: layer3
- description: 'Configured by Ansible - Layer3'
- admin_state: up
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Check Idempotence"
- nxos_interface: *l3config
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: "Configure layer2 params"
- nxos_interface: &l2config
- interface: "{{ testint }}"
- mode: layer2
- description: 'Configured by Ansible - Layer2'
- admin_state: down
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_interface: *l2config
- register: result
-
- - assert: *false
-
- - name: Create VLAN Interfaces
- nxos_interface: &createvlans
- interface: "{{ item.os_svi_int }}"
- description: "{{ item.os_svi_desc }}"
- with_items: &vlanitems
- - {os_svi_int: vlan2, os_svi_desc: SVI_VLAN2}
- - {os_svi_int: vlan710, os_svi_desc: SVI_VLAN710}
- - {os_svi_int: vlan711, os_svi_desc: SVI_VLAN711}
- - {os_svi_int: vlan712, os_svi_desc: SVI_VLAN712}
- register: result
-
- - assert: *true
-
- - name: Configure Required SVI
- nxos_l3_interface: &addips
- aggregate:
- - {name: vlan2, ipv4: 192.168.2.1/24}
- - {name: vlan710, ipv4: 192.168.3.1/24}
- - {name: vlan711, ipv4: 192.168.4.1/24}
- - {name: vlan712, ipv4: 192.168.5.1/24}
- register: result
-
- - assert: *true
-
- - name: Create VLAN Interfaces Idempotence Check
- nxos_interface: *createvlans
- with_items: *vlanitems
- register: result
-
- - assert: *false
-
- - name: Configure Required SVI Idempotence Check
- nxos_l3_interface: *addips
- register: result
-
- - assert: *false
-
- always:
- - name: "Set interface back to default"
- nxos_config: *intcleanup
- ignore_errors: yes
-
- - name: "Remove vlan interfaces"
- nxos_config: *vlanintcleanup
-
- - name: "Setup: Disable feature interface-vlan"
- nxos_feature:
- feature: interface-vlan
- state: disabled
- ignore_errors: yes
-
- - debug: msg="END connection={{ ansible_connection }} nxos_interface sanity test"
diff --git a/test/integration/targets/nxos_interface/tests/common/set_state_absent.yaml b/test/integration/targets/nxos_interface/tests/common/set_state_absent.yaml
deleted file mode 100644
index 06b06671ea..0000000000
--- a/test/integration/targets/nxos_interface/tests/common/set_state_absent.yaml
+++ /dev/null
@@ -1,29 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }}/set_state_absent.yaml"
-
-- name: setup
- nxos_config:
- lines:
- - interface Loopback1
-
-- name: set state=absent
- nxos_interface:
- interface: Loopback1
- state: absent
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: verify state=absent
- nxos_interface:
- interface: Loopback1
- state: absent
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- debug: msg="END connection={{ ansible_connection }}/set_state_absent.yaml"
diff --git a/test/integration/targets/nxos_interface/tests/common/set_state_present.yaml b/test/integration/targets/nxos_interface/tests/common/set_state_present.yaml
deleted file mode 100644
index ff2bf8c232..0000000000
--- a/test/integration/targets/nxos_interface/tests/common/set_state_present.yaml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }}/set_state_present.yaml"
-
-- name: setup
- nxos_config:
- lines:
- - no interface Loopback1
- ignore_errors: yes # Fails if the interface is already absent
-
-- name: set state=present
- nxos_interface:
- interface: Loopback1
- state: present
- description: 'Configured by Ansible - Layer3'
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: verify state=present
- nxos_interface:
- interface: Loopback1
- state: present
- description: 'Configured by Ansible - Layer3'
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- debug: msg="END connection={{ ansible_connection }}/set_state_present.yaml"
diff --git a/test/integration/targets/nxos_interface/tests/common/sub_int.yaml b/test/integration/targets/nxos_interface/tests/common/sub_int.yaml
deleted file mode 100644
index 16d7fa6028..0000000000
--- a/test/integration/targets/nxos_interface/tests/common/sub_int.yaml
+++ /dev/null
@@ -1,73 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_interface sub-interface test"
-
-- set_fact: testint="{{ nxos_int1 }}"
-
-- name: Setup - delete sub-interface
- nxos_interface: &rm
- name: "{{ testint }}.20"
- state: absent
- ignore_errors: yes
-
-- name: Setup - Ensure the interface is layer3
- nxos_interface:
- name: "{{ testint }}"
- mode: layer3
-
-- name: Create sub-interface
- nxos_interface: &sub_int
- name: "{{ testint }}.20"
- description: "sub-interface Configured by Ansible"
- admin_state: up
- mtu: 800
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: Create sub-interface (Idempotence)
- nxos_interface: *sub_int
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Make admin_state down
- nxos_interface: &state_down
- name: "{{ testint }}.20"
- description: "sub-interface Configured by Ansible"
- admin_state: down
- mtu: 800
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: Create sub-interface (Idempotence)
- nxos_interface: *state_down
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Remove sub-interface
- nxos_interface: *rm
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: Remove sub-interface (Idempotence)
- nxos_interface: *rm
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- debug: msg="END connection={{ ansible_connection }} nxos_interface sub-interface test"
diff --git a/test/integration/targets/nxos_interface_ospf/defaults/main.yaml b/test/integration/targets/nxos_interface_ospf/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_interface_ospf/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_interface_ospf/meta/main.yml b/test/integration/targets/nxos_interface_ospf/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_interface_ospf/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_interface_ospf/tasks/cli.yaml b/test/integration/targets/nxos_interface_ospf/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_interface_ospf/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_interface_ospf/tasks/main.yaml b/test/integration/targets/nxos_interface_ospf/tasks/main.yaml
deleted file mode 100644
index fea9337c14..0000000000
--- a/test/integration/targets/nxos_interface_ospf/tasks/main.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-# Use block to ensure that both cli and nxapi tests
-# will run even if there are failures or errors.
-- block:
- - { include: cli.yaml, tags: ['cli'] }
- always:
- - { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_interface_ospf/tasks/nxapi.yaml b/test/integration/targets/nxos_interface_ospf/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_interface_ospf/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_interface_ospf/tests/common/sanity.yaml b/test/integration/targets/nxos_interface_ospf/tests/common/sanity.yaml
deleted file mode 100644
index de9f7209f9..0000000000
--- a/test/integration/targets/nxos_interface_ospf/tests/common/sanity.yaml
+++ /dev/null
@@ -1,286 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_interface_ospf sanity test"
-
-- set_fact: testint="{{ nxos_int1 }}"
-
-- name: Setup - Disable features
- nxos_feature:
- feature: "{{ item }}"
- state: disabled
- loop: ['ospf', 'bfd']
- ignore_errors: yes
-
-- name: Setup - Enable features
- nxos_feature:
- feature: "{{ item }}"
- state: enabled
- loop: ['ospf', 'bfd']
-
-- name: "Put interface into default state"
- nxos_config: &intdefault
- lines:
- - "default interface {{ testint }}"
- ignore_errors: yes
-
-- name: "Remove switchport config"
- nxos_config: &removeswitchport
- commands:
- - no switchport
- parents:
- - "interface {{ testint }}"
- ignore_errors: yes
-
-- name: "Remove possibly existing port-channel and loopback ints"
- nxos_config: &removepcandlb
- commands:
- - no interface port-channel10
- - no interface port-channel11
- - no interface loopback55
- - no interface loopback77
- ignore_errors: yes
-
-- block:
- - name: configure ospf interface
- nxos_interface_ospf: &configure
- interface: "{{ nxos_int1|upper }}"
- ospf: 1
- area: 12345678
- bfd: enable
- cost: 55
- passive_interface: true
- hello_interval: 15
- dead_interval: 75
- network: point-to-point
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Check Idempotence"
- nxos_interface_ospf: *configure
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: Modify properties
- nxos_interface_ospf: &modify
- interface: "{{ testint }}"
- ospf: 1
- area: 12345678
- cost: 66
- passive_interface: false
- hello_interval: 17
- dead_interval: 70
- network: broadcast
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_interface_ospf: *modify
- register: result
-
- - assert: *false
-
- - name: default properties
- nxos_interface_ospf: &def
- interface: "{{ testint }}"
- ospf: 1
- area: 12345678
- bfd: default
- cost: default
- hello_interval: 10
- dead_interval: default
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_interface_ospf: *def
- register: result
-
- - assert: *false
-
- - name: Message_digest properties
- nxos_interface_ospf: &md
- interface: "{{ testint }}"
- ospf: 1
- area: 12345678
- message_digest: True
- message_digest_key_id: 10
- message_digest_algorithm_type: md5
- message_digest_encryption_type: 3des
- message_digest_password: b69f7bc54725b1bfd1ea93afa7b09400
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_interface_ospf: *md
- register: result
-
- - assert: *false
-
- - name: Message_digest defaults
- nxos_interface_ospf: &mdd
- interface: "{{ testint }}"
- ospf: 1
- area: 12345678
- message_digest: False
- message_digest_key_id: default
- message_digest_algorithm_type: default
- message_digest_encryption_type: default
- message_digest_password: default
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_interface_ospf: *mdd
- register: result
-
- - assert: *false
-
- - name: create port-channel and loopback interfaces
- nxos_config:
- commands:
- - interface port-channel10
- - interface port-channel11
- - interface loopback55
- - interface loopback77
- match: none
-
- - name: "Ensure port-channels are layer3"
- nxos_config:
- commands:
- - no switchport
- parents:
- - "interface {{ item }}"
- with_items:
- - port-channel10
- - port-channel11
-
- - name: configure ospf interface port-channel10
- nxos_interface_ospf: &configurepc
- interface: Port-channel10
- ospf: 1
- area: 429496729
- cost: 55
- passive_interface: true
- hello_interval: 15
- dead_interval: 75
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence for port-channel10"
- nxos_interface_ospf: *configurepc
- register: result
-
- - assert: *false
-
- - name: configure ospf interface port-channel11 using lower case name
- nxos_interface_ospf: &configurepclower
- interface: port-channel11
- ospf: 1
- area: 42949672
- cost: 55
- passive_interface: true
- hello_interval: 15
- dead_interval: 75
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence for port-channel11"
- nxos_interface_ospf: *configurepclower
- register: result
-
- - assert: *false
-
- - name: configure ospf interface loopback55
- nxos_interface_ospf: &configurelb
- interface: LOOPBACK55
- ospf: 1
- area: 192.0.2.4
- cost: 55
- hello_interval: 15
- dead_interval: 75
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence for loopback55"
- nxos_interface_ospf: *configurelb
- register: result
-
- - assert: *false
-
- - name: configure ospf interface loopback77 using lower case name
- nxos_interface_ospf: &configurelblower
- interface: loopback77
- ospf: 1
- area: 429496
- cost: 77
- hello_interval: 45
- dead_interval: 75
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence for loopback77"
- nxos_interface_ospf: *configurelblower
- register: result
-
- - assert: *false
-
- - name: remove ospf interface config
- nxos_interface_ospf: &removeconfig
- interface: "{{ testint }}"
- ospf: 1
- area: 12345678
- bfd: disable
- cost: 55
- passive_interface: true
- hello_interval: 15
- dead_interval: 75
- state: absent
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_interface_ospf: *removeconfig
- register: result
-
- - assert: *false
-
- always:
- - name: Disable features
- nxos_feature:
- feature: "{{ item }}"
- state: disabled
- loop: ['ospf', 'bfd']
- ignore_errors: yes
-
- - name: "Interface cleanup"
- nxos_config: *intdefault
- ignore_errors: yes
-
- - name: "Remove port-channel and loopback ints"
- nxos_config: *removepcandlb
- ignore_errors: yes
-
- - debug: msg="END connection={{ ansible_connection }} nxos_interface_ospf sanity test"
diff --git a/test/integration/targets/nxos_interfaces/defaults/main.yaml b/test/integration/targets/nxos_interfaces/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_interfaces/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_interfaces/meta/main.yml b/test/integration/targets/nxos_interfaces/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_interfaces/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_interfaces/tasks/cli.yaml b/test/integration/targets/nxos_interfaces/tasks/cli.yaml
deleted file mode 100644
index 6c7ea4a7f9..0000000000
--- a/test/integration/targets/nxos_interfaces/tasks/cli.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_interfaces/tasks/main.yaml b/test/integration/targets/nxos_interfaces/tasks/main.yaml
deleted file mode 100644
index afdb973e96..0000000000
--- a/test/integration/targets/nxos_interfaces/tasks/main.yaml
+++ /dev/null
@@ -1,9 +0,0 @@
----
-
-- name: Set system defaults for switchports
- nxos_config:
- lines: |
- no system default switchport
- system default switchport shutdown
-
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/nxos_interfaces/tasks/nxapi.yaml b/test/integration/targets/nxos_interfaces/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_interfaces/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_interfaces/tests/cli/deleted.yaml b/test/integration/targets/nxos_interfaces/tests/cli/deleted.yaml
deleted file mode 100644
index 5c3067d292..0000000000
--- a/test/integration/targets/nxos_interfaces/tests/cli/deleted.yaml
+++ /dev/null
@@ -1,64 +0,0 @@
----
-- debug:
- msg: "Start nxos_interfaces deleted integration tests connection={{ ansible_connection }}"
-
-- set_fact: test_int1="{{ nxos_int1 }}"
-- set_fact: test_int2="{{ nxos_int2 }}"
-- set_fact: test_shutdown
- when: platform is not search('N3[5KL]|N[56]K|titanium')
-
-- name: "setup0: clean up (interfaces) attributes on all interfaces"
- nxos_interfaces:
- state: deleted
-
-- name: setup1
- cli_config: &cleanup
- config: |
- default interface {{ test_int1 }}
-
-- block:
- - name: setup2
- cli_config:
- config: |
- interface {{ test_int1 }}
- description Test-interface1
- no shutdown
-
- - name: Gather interfaces facts
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: interfaces
-
- - name: deleted
- nxos_interfaces: &deleted
- state: deleted
- register: result
-
- - assert:
- that:
- - "ansible_facts.network_resources.interfaces|symmetric_difference(result.before)|length == 0"
- - "result.changed == true"
- - "'interface {{ test_int1 }}' in result.commands"
- - "'no description' in result.commands"
-
- - assert:
- that:
- - "result.after|length == 0"
- - "'shutdown' in result.commands"
- when: test_shutdown is defined
-
- - name: Idempotence - deleted
- nxos_interfaces: *deleted
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
- when: test_shutdown is defined
-
- always:
- - name: teardown
- cli_config: *cleanup
diff --git a/test/integration/targets/nxos_interfaces/tests/cli/merged.yaml b/test/integration/targets/nxos_interfaces/tests/cli/merged.yaml
deleted file mode 100644
index 3ed2d74978..0000000000
--- a/test/integration/targets/nxos_interfaces/tests/cli/merged.yaml
+++ /dev/null
@@ -1,57 +0,0 @@
----
-- debug:
- msg: "Start nxos_interfaces merged integration tests connection={{ ansible_connection }}"
-
-- set_fact: test_int1="{{ nxos_int1 }}"
-- set_fact: enabled=true
- when: platform is not search('N3[5KL]|N[56]K|titanium')
-
-- name: setup
- cli_config: &cleanup
- config: |
- default interface {{ test_int1 }}
-
-- block:
- - name: Merged
- nxos_interfaces: &merged
- config:
- - name: "{{ test_int1 }}"
- description: Configured by Ansible
- enabled: "{{ enabled|default(omit)}}"
- state: merged
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'interface {{ test_int1 }}' in result.commands"
- - "'description Configured by Ansible' in result.commands"
-
- - assert:
- that:
- - "'no shutdown' in result.commands"
- when: enabled is defined
-
- - name: Gather interfaces facts
- nxos_facts:
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: interfaces
-
- - assert:
- that:
- - "ansible_facts.network_resources.interfaces|symmetric_difference(result.after)|length == 0"
-
- - name: Idempotence - Merged
- nxos_interfaces: *merged
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config: *cleanup
diff --git a/test/integration/targets/nxos_interfaces/tests/cli/overridden.yaml b/test/integration/targets/nxos_interfaces/tests/cli/overridden.yaml
deleted file mode 100644
index 25c037487c..0000000000
--- a/test/integration/targets/nxos_interfaces/tests/cli/overridden.yaml
+++ /dev/null
@@ -1,67 +0,0 @@
----
-- debug:
- msg: "Start nxos_interfaces overridden integration tests connection={{ ansible_connection }}"
-
-- block:
- - set_fact: test_int1="{{ nxos_int1 }}"
- - set_fact: test_int2="{{ nxos_int2 }}"
-
- - name: setup1
- cli_config: &cleanup
- config: |
- default interface {{ test_int1 }}
- default interface {{ test_int2 }}
-
- - block:
- - name: setup2
- cli_config:
- config: |
- interface {{ test_int1 }}
- description Ansible setup
- no shutdown
-
- - name: Gather interfaces facts
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: interfaces
-
- - name: Overridden
- nxos_interfaces: &overridden
- config:
- - name: "{{ test_int2 }}"
- description: Configured by Ansible
- state: overridden
- register: result
-
- - assert:
- that:
- # int1 becomes default state, int2 becomes non-default
- - "ansible_facts.network_resources.interfaces|symmetric_difference(result.before)|length == 0"
- - "result.changed == true"
- - "'interface {{ test_int1 }}' in result.commands"
- - "'shutdown' in result.commands"
- - "'interface {{ test_int2 }}' in result.commands"
- - "'description Configured by Ansible' in result.commands"
-
- - name: Gather interfaces post facts
- nxos_facts: *facts
-
- - assert:
- that:
- - "ansible_facts.network_resources.interfaces|symmetric_difference(result.after)|length == 0"
-
- - name: Idempotence - Overridden
- nxos_interfaces: *overridden
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config: *cleanup
- when: platform is not search('N3[5KL]|N[56]K|titanium')
diff --git a/test/integration/targets/nxos_interfaces/tests/cli/replaced.yaml b/test/integration/targets/nxos_interfaces/tests/cli/replaced.yaml
deleted file mode 100644
index 96233bfaf8..0000000000
--- a/test/integration/targets/nxos_interfaces/tests/cli/replaced.yaml
+++ /dev/null
@@ -1,63 +0,0 @@
----
-- debug:
- msg: "Start nxos_interfaces replaced integration tests connection={{ ansible_connection }}"
-
-- block:
- - set_fact: test_int1="{{ nxos_int1 }}"
- - name: setup1
- cli_config: &cleanup
- config: |
- default interface {{ test_int1 }}
-
- - block:
- - name: setup2
- cli_config:
- config: |
- interface {{ test_int1 }}
- description Ansible setup
-
- - name: Gather interfaces facts
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: interfaces
-
- - name: Replaced
- nxos_interfaces: &replaced
- config:
- - name: "{{ test_int1 }}"
- description: 'Configured by Ansible'
- enabled: True
- state: replaced
- register: result
-
- - assert:
- that:
- - "ansible_facts.network_resources.interfaces|symmetric_difference(result.before)|length == 0"
- - "result.changed == true"
- - "'interface {{ test_int1 }}' in result.commands"
- - "'description Configured by Ansible' in result.commands"
- - "'no shutdown' in result.commands"
-
- - name: Gather interfaces post facts
- nxos_facts: *facts
-
- - assert:
- that:
- - "ansible_facts.network_resources.interfaces|symmetric_difference(result.after)|length == 0"
-
- - name: Idempotence - Replaced
- nxos_interfaces: *replaced
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config: *cleanup
-
- when: platform is not search('N3[5KL]|N[56]K|titanium')
diff --git a/test/integration/targets/nxos_l2_interface/defaults/main.yaml b/test/integration/targets/nxos_l2_interface/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_l2_interface/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_l2_interface/meta/main.yml b/test/integration/targets/nxos_l2_interface/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_l2_interface/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_l2_interface/tasks/cli.yaml b/test/integration/targets/nxos_l2_interface/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_l2_interface/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_l2_interface/tasks/main.yaml b/test/integration/targets/nxos_l2_interface/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_l2_interface/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_l2_interface/tasks/nxapi.yaml b/test/integration/targets/nxos_l2_interface/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_l2_interface/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_l2_interface/tests/common/agg.yaml b/test/integration/targets/nxos_l2_interface/tests/common/agg.yaml
deleted file mode 100644
index 25b4183daa..0000000000
--- a/test/integration/targets/nxos_l2_interface/tests/common/agg.yaml
+++ /dev/null
@@ -1,93 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_l2_interface aggregate test"
-
-# Select interface for test
-- set_fact: intname1="{{ nxos_int1 }}"
-- set_fact: intname2="{{ nxos_int2 }}"
-
-- name: "Setup vlans"
- nxos_vlan:
- vlan_range: "6,15"
-
-- name: Setup - Ensure interfaces are layer2
- nxos_interface:
- aggregate:
- - { name: "{{ intname1 }}" }
- - { name: "{{ intname2 }}" }
- mode: layer2
-
-- name: Setup - Remove interface aggregate before testing
- nxos_l2_interface:
- aggregate:
- - { name: "{{ intname1 }}", mode: access, access_vlan: 6 }
- - { name: "{{ intname2 }}", mode: access, access_vlan: 15 }
- state: absent
-
-- name: Sleep for 2 seconds on Fretta Platform
- wait_for: timeout=2
- when: platform is match("N9K-F")
-
-- block:
- - name: Configure interface for access_vlan aggregate
- nxos_l2_interface: &conf_agg
- aggregate:
- - { name: "{{ intname1 }}", mode: access, access_vlan: 6 }
- - { name: "{{ intname2 }}", mode: access, access_vlan: 15 }
- register: result
-
- - assert:
- that:
- - "result.changed == true"
-
- - name: Sleep for 2 seconds on Fretta Platform
- wait_for: timeout=2
- when: platform is match("N9K-F")
-
- - name: Configure interface for access_vlan aggregate(Idempotence)
- nxos_l2_interface: *conf_agg
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- - name: Remove interface aggregate
- nxos_l2_interface: &rm_agg
- aggregate:
- - { name: "{{ intname1 }}", mode: access, access_vlan: 6 }
- - { name: "{{ intname2 }}", mode: access, access_vlan: 15 }
- state: absent
- register: result
-
- - assert:
- that:
- - "result.changed == true"
-
- - name: Sleep for 2 seconds on Fretta Platform
- wait_for: timeout=2
- when: platform is match("N9K-F")
-
- - name: Remove interface aggregate(Idempotence)
- nxos_l2_interface: *rm_agg
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- always:
- - name: "remove vlans"
- nxos_vlan:
- vlan_range: "6,15"
- state: absent
- ignore_errors: yes
-
- - name: "Remove interface aggregate after testing"
- nxos_l2_interface:
- aggregate:
- - { name: "{{ intname1 }}", mode: access, access_vlan: 6 }
- - { name: "{{ intname2 }}", mode: access, access_vlan: 15 }
- state: absent
- ignore_errors: yes
-
-- debug: msg="END connection={{ ansible_connection }} nxos_l2_interface aggregate test"
diff --git a/test/integration/targets/nxos_l2_interface/tests/common/sanity.yaml b/test/integration/targets/nxos_l2_interface/tests/common/sanity.yaml
deleted file mode 100644
index e21bf2d46a..0000000000
--- a/test/integration/targets/nxos_l2_interface/tests/common/sanity.yaml
+++ /dev/null
@@ -1,153 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_l2_interface sanity test"
-
-# Select interface for test
-- set_fact: intname="{{ nxos_int1 }}"
-
-- name: "Interface selected for this test"
- debug: msg="{{ intname }}"
-
-- name: "Setup interface"
- nxos_config: &default
- lines:
- - "default interface {{ intname }}"
- ignore_errors: yes
-
-- name: Setup - Ensure interface is layer2
- nxos_interface:
- interface: "{{ intname }}"
- mode: layer2
-
-- name: "Setup vlans"
- nxos_vlan:
- vlan_range: "5-10,20"
-
-- block:
- - name: Ensure interface is in its default switchport state
- nxos_l2_interface: &def_swi
- name: "{{ intname }}"
- state: unconfigured
-
- - name: Ensure interface is configured for access vlan 20
- nxos_l2_interface: &acc_vl
- name: "{{ intname }}"
- mode: access
- access_vlan: 20
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: Sleep for 2 seconds on Fretta Platform
- wait_for: timeout=2
- when: platform is match("N9K-F")
-
- - name: "access vlan Idempotence"
- nxos_l2_interface: *acc_vl
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: Ensure interface only has vlans 5-10 as trunk vlans
- nxos_l2_interface: &tr_vl
- name: "{{ intname }}"
- mode: trunk
- native_vlan: 10
- trunk_allowed_vlans: 5-10
- register: result
-
- - assert: *true
-
- - name: "trunk vlan Idempotence"
- nxos_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)
- nxos_l2_interface: &tag
- name: "{{ intname }}"
- mode: trunk
- native_vlan: 10
- trunk_vlans: 2-50
- register: result
-
- - assert: *true
-
- - name: "tag vlan Idempotence"
- nxos_l2_interface: *tag
- register: result
-
- - assert: *false
-
- - name: Remove full trunk vlan range 2-50
- nxos_l2_interface: &no_tag
- name: "{{ intname }}"
- mode: trunk
- trunk_vlans: 2-50
- state: absent
- register: result
-
- - assert: *true
-
- - name: Check Idempotence Remove full trunk vlan range 2-50
- nxos_l2_interface: *no_tag
- register: result
-
- - assert: *false
-
- - name: Reconfigure interface trunk port and ensure 2-50 are being tagged
- nxos_l2_interface: *tag
- register: result
-
- - assert: *true
-
- - name: Check Idempotence Reconfigure interface trunk port and ensure 2-50 are being tagged
- nxos_l2_interface: *tag
- register: result
-
- - assert: *false
-
- - name: Remove partial trunk vlan range 30-4094 are removed
- nxos_l2_interface: &partial
- name: "{{ intname }}"
- mode: trunk
- trunk_vlans: 30-4094
- state: absent
- register: result
-
- - assert: *true
-
- - name: Check Idempotence Remove partial trunk vlan range 30-4094 are removed
- nxos_l2_interface: *partial
- register: result
-
- - assert: *false
-
- - name: put interface default state
- nxos_l2_interface: *def_swi
- register: result
-
- - assert: *true
-
- - name: "default state idempotence"
- nxos_l2_interface: *def_swi
- register: result
-
- - assert: *false
-
- always:
- - name: "remove vlans"
- nxos_vlan:
- vlan_range: "5-10,20"
- state: absent
- ignore_errors: yes
-
- - name: "default interface"
- nxos_config: *default
- ignore_errors: yes
-
-- debug: msg="END connection={{ ansible_connection }} nxos_l2_interface sanity test"
diff --git a/test/integration/targets/nxos_l2_interfaces/defaults/main.yaml b/test/integration/targets/nxos_l2_interfaces/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_l2_interfaces/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_l2_interfaces/meta/main.yml b/test/integration/targets/nxos_l2_interfaces/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_l2_interfaces/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_l2_interfaces/tasks/cli.yaml b/test/integration/targets/nxos_l2_interfaces/tasks/cli.yaml
deleted file mode 100644
index 6c7ea4a7f9..0000000000
--- a/test/integration/targets/nxos_l2_interfaces/tasks/cli.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_l2_interfaces/tasks/main.yaml b/test/integration/targets/nxos_l2_interfaces/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/nxos_l2_interfaces/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/nxos_l2_interfaces/tasks/nxapi.yaml b/test/integration/targets/nxos_l2_interfaces/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_l2_interfaces/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_l2_interfaces/tests/cli/deleted.yaml b/test/integration/targets/nxos_l2_interfaces/tests/cli/deleted.yaml
deleted file mode 100644
index 4d04aae861..0000000000
--- a/test/integration/targets/nxos_l2_interfaces/tests/cli/deleted.yaml
+++ /dev/null
@@ -1,63 +0,0 @@
----
-- debug:
- msg: "Start nxos_l2_interfaces deleted integration tests connection={{ ansible_connection }}"
-
-- set_fact: test_int1="{{ nxos_int1 }}"
-- set_fact: test_int2="{{ nxos_int2 }}"
-
-- name: setup1
- cli_config: &cleanup
- config: |
- default interface {{ test_int1 }}
- default interface {{ test_int2 }}
- ignore_errors: yes
-
-- block:
- - name: setup2
- cli_config:
- config: |
- interface {{ test_int1 }}
- switchport
- switchport trunk native vlan 10
- interface {{ test_int2 }}
- switchport
- switchport mode trunk
- switchport trunk allowed vlan 20
-
- - name: Gather l2_interfaces facts
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: l2_interfaces
-
- - name: deleted
- nxos_l2_interfaces: &deleted
- state: deleted
- register: result
-
- - assert:
- that:
- - "ansible_facts.network_resources.l2_interfaces|symmetric_difference(result.before)|length == 0"
- - "result.after|length == 0"
- - "result.changed == true"
- - "'interface {{ test_int1 }}' in result.commands"
- - "'no switchport trunk native vlan' in result.commands"
- - "'interface {{ test_int2 }}' in result.commands"
- - "'no switchport mode' in result.commands"
- - "'no switchport trunk allowed vlan' in result.commands"
- - "result.commands|length == 5"
-
- - name: Idempotence - deleted
- nxos_l2_interfaces: *deleted
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config: *cleanup
- ignore_errors: yes
diff --git a/test/integration/targets/nxos_l2_interfaces/tests/cli/merged.yaml b/test/integration/targets/nxos_l2_interfaces/tests/cli/merged.yaml
deleted file mode 100644
index f72f5b5039..0000000000
--- a/test/integration/targets/nxos_l2_interfaces/tests/cli/merged.yaml
+++ /dev/null
@@ -1,102 +0,0 @@
----
-- debug:
- msg: "Start nxos_l2_interfaces merged integration tests connection={{ ansible_connection }}"
-
-- set_fact: test_int1="{{ nxos_int1 }}"
-
-- name: setup
- cli_config: &cleanup
- config: |
- default interface {{ test_int1 }}
- ignore_errors: yes
-
-- block:
- - name: setup2
- cli_config:
- config: |
- interface {{ test_int1 }}
- switchport
-
- - name: Merged
- nxos_l2_interfaces: &merged
- config:
- - name: "{{ test_int1 }}"
- access:
- vlan: 6
- trunk:
- allowed_vlans: 200
- state: merged
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "result.before|length == 0"
- - "'interface {{ test_int1 }}' in result.commands"
- - "'switchport access vlan 6' in result.commands"
- - "'switchport trunk allowed vlan 200' in result.commands"
- - "result.commands|length == 3"
-
- - name: Gather l2_interfaces facts
- nxos_facts:
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: l2_interfaces
-
- - assert:
- that:
- - "ansible_facts.network_resources.l2_interfaces|symmetric_difference(result.after)|length == 0"
-
- - name: Idempotence - Merged
- nxos_l2_interfaces: *merged
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- - name: Merge with existing vlans
- nxos_l2_interfaces: &vlanadd
- config:
- - name: "{{ test_int1 }}"
- mode: trunk
- trunk:
- allowed_vlans: "10-12"
- state: merged
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'interface {{ test_int1 }}' in result.commands"
- - "'switchport mode trunk' in result.commands"
- - "'switchport trunk allowed vlan add 10,11,12' in result.commands"
- - "result.commands|length == 3"
-
- - name: Gather l2_interfaces facts
- nxos_facts:
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: l2_interfaces
-
- - assert:
- that:
- - "ansible_facts.network_resources.l2_interfaces|symmetric_difference(result.after)|length == 0"
-
- - name: Idempotence - with newly added vlans
- nxos_l2_interfaces: *vlanadd
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
-
- always:
- - name: teardown
- cli_config: *cleanup
- ignore_errors: yes
diff --git a/test/integration/targets/nxos_l2_interfaces/tests/cli/overridden.yaml b/test/integration/targets/nxos_l2_interfaces/tests/cli/overridden.yaml
deleted file mode 100644
index af8a18ec45..0000000000
--- a/test/integration/targets/nxos_l2_interfaces/tests/cli/overridden.yaml
+++ /dev/null
@@ -1,72 +0,0 @@
----
-- debug:
- msg: "Start nxos_l2_interfaces overridden integration tests connection={{ ansible_connection }}"
-
-- set_fact: test_int1="{{ nxos_int1 }}"
-- set_fact: test_int2="{{ nxos_int2 }}"
-
-- name: setup1
- cli_config: &cleanup
- config: |
- default interface {{ test_int1 }}
- default interface {{ test_int2 }}
- ignore_errors: yes
-
-- block:
- - name: setup2
- cli_config:
- config: |
- interface {{ test_int1 }}
- switchport
- switchport trunk allowed vlan 11
- interface {{ test_int2 }}
- switchport
-
- - name: Gather l2_interfaces facts
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: l2_interfaces
-
- - name: Overridden
- nxos_l2_interfaces: &overridden
- config:
- - name: "{{ test_int2 }}"
- access:
- vlan: 6
- trunk:
- allowed_vlans: "10-12"
- state: overridden
- register: result
-
- - assert:
- that:
- - "ansible_facts.network_resources.l2_interfaces|symmetric_difference(result.before)|length == 0"
- - "result.changed == true"
- - "'interface {{ test_int1 }}' in result.commands"
- - "'no switchport trunk allowed vlan' in result.commands"
- - "'interface {{ test_int2 }}' in result.commands"
- - "'switchport access vlan 6' in result.commands"
- - "'switchport trunk allowed vlan 10,11,12' in result.commands"
-
- - name: Gather l2_interfaces post facts
- nxos_facts: *facts
-
- - assert:
- that:
- - "ansible_facts.network_resources.l2_interfaces|symmetric_difference(result.after)|length == 0"
-
- - name: Idempotence - Overridden
- nxos_l2_interfaces: *overridden
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config: *cleanup
- ignore_errors: yes
diff --git a/test/integration/targets/nxos_l2_interfaces/tests/cli/replaced.yaml b/test/integration/targets/nxos_l2_interfaces/tests/cli/replaced.yaml
deleted file mode 100644
index 275ce8b6e7..0000000000
--- a/test/integration/targets/nxos_l2_interfaces/tests/cli/replaced.yaml
+++ /dev/null
@@ -1,72 +0,0 @@
----
-- debug:
- msg: "Start nxos_l2_interfaces replaced integration tests connection={{ ansible_connection }}"
-
-- set_fact: test_int1="{{ nxos_int1 }}"
-- set_fact: test_int2="{{ nxos_int2 }}"
-
-- name: setup1
- cli_config: &cleanup
- config: |
- default interface {{ test_int1 }}
- default interface {{ test_int2 }}
- ignore_errors: yes
-
-- block:
- - name: setup2
- cli_config:
- config: |
- interface {{ test_int1 }}
- switchport
- switchport access vlan 5
- interface {{ test_int2 }}
- switchport
- switchport trunk native vlan 15
- switchport trunk allowed vlan 25-27
-
- - name: Gather l2_interfaces facts
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: l2_interfaces
-
- - name: Replaced
- nxos_l2_interfaces: &replaced
- config:
- - name: "{{ test_int1 }}"
- access:
- vlan: 8
- trunk:
- allowed_vlans: "10-12"
- state: replaced
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'interface {{ test_int1 }}' in result.commands"
- - "'switchport access vlan 8' in result.commands"
- - "'switchport trunk allowed vlan 10,11,12' in result.commands"
- - "result.commands|length == 3"
-
- - name: Gather l2_interfaces post facts
- nxos_facts: *facts
-
- - assert:
- that:
- - "ansible_facts.network_resources.l2_interfaces|symmetric_difference(result.after)|length == 0"
-
- - name: Idempotence - Replaced
- nxos_l2_interfaces: *replaced
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config: *cleanup
- ignore_errors: yes
diff --git a/test/integration/targets/nxos_l3_interface/defaults/main.yaml b/test/integration/targets/nxos_l3_interface/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_l3_interface/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_l3_interface/meta/main.yml b/test/integration/targets/nxos_l3_interface/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_l3_interface/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_l3_interface/tasks/cli.yaml b/test/integration/targets/nxos_l3_interface/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_l3_interface/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_l3_interface/tasks/main.yaml b/test/integration/targets/nxos_l3_interface/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_l3_interface/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_l3_interface/tasks/nxapi.yaml b/test/integration/targets/nxos_l3_interface/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_l3_interface/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_l3_interface/tests/cli/sanity.yaml b/test/integration/targets/nxos_l3_interface/tests/cli/sanity.yaml
deleted file mode 100644
index 6a0e48e124..0000000000
--- a/test/integration/targets/nxos_l3_interface/tests/cli/sanity.yaml
+++ /dev/null
@@ -1,112 +0,0 @@
----
-- debug: msg="START TRANSPORT:CLI nxos_l3_interface sanity test"
-
-# Select interface for test
-- set_fact: testint2="{{ nxos_int2 }}"
-- set_fact: testint3="{{ nxos_int3 }}"
-
-- set_fact: ipv6_address=""
-- set_fact: ipv6_address="33:db::2/8"
- when: ipv6_supported
-
-- name: Setup - remove address from interface prior to testing(Part1)
- nxos_config:
- lines:
- - no ip address 192.168.22.1/24
- parents: no switchport
- before: "interface {{ testint2 }}"
- ignore_errors: yes
-
-- name: Setup - remove address from interface prior to testing(Part2)
- nxos_config:
- lines:
- - no ip address 192.168.20.1/24
- - no ipv6 address 33:db::2/8
- parents: no switchport
- before: "interface {{ testint3 }}"
- ignore_errors: yes
-
-- name: Setup - Ensure interfaces are layer3
- nxos_interface:
- aggregate:
- - name: "{{ testint2 }}"
- - name: "{{ testint3 }}"
- mode: layer3
-
-- name: Configure ipv4 address to interface
- nxos_l3_interface: &conf
- name: "{{ testint2 }}"
- ipv4: 192.168.22.1/24
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: Configure ipv4 address to interface(Idempotence)
- nxos_l3_interface: *conf
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Remove ipv4 address from interface
- nxos_l3_interface: &rm
- name: "{{ testint2 }}"
- ipv4: 192.168.22.1/24
- state: absent
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: Remove ipv4 address from interface(Idempotence)
- nxos_l3_interface: *rm
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Configure address to interfaces aggregate
- nxos_l3_interface: &conf_agg
- aggregate:
- - { name: "{{ testint2 }}", ipv4: 192.168.22.1/24 }
- - { name: "{{ testint3 }}", ipv4: 192.168.20.1/24, ipv6: "{{ ipv6_address }}" }
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: Configure address to interfaces aggregate(Idempotence)
- nxos_l3_interface: *conf_agg
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Remove address from interfaces aggregate
- nxos_l3_interface: &rm_agg
- aggregate:
- - { name: "{{ testint2 }}", ipv4: 192.168.22.1/24 }
- - { name: "{{ testint3 }}", ipv4: 192.168.20.1/24, ipv6: "{{ ipv6_address }}" }
- state: absent
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: Remove address from interfaces aggregate(Idempotence)
- nxos_l3_interface: *rm_agg
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- debug: msg="END TRANSPORT:CLI nxos_l3_interface sanity test"
diff --git a/test/integration/targets/nxos_l3_interface/tests/nxapi/sanity.yaml b/test/integration/targets/nxos_l3_interface/tests/nxapi/sanity.yaml
deleted file mode 100644
index 054a356c4b..0000000000
--- a/test/integration/targets/nxos_l3_interface/tests/nxapi/sanity.yaml
+++ /dev/null
@@ -1,103 +0,0 @@
----
-- debug: msg="START TRANSPORT:NXAPI nxos_l3_interface sanity test"
-
-# Select interface for test
-- set_fact: testint2="{{ nxos_int2 }}"
-- set_fact: testint3="{{ nxos_int3 }}"
-
-- set_fact: ipv6_address=""
-- set_fact: ipv6_address="33:db::2/8"
- when: ipv6_supported
-
-- name: Setup - Remove address from interfaces aggregate
- nxos_l3_interface:
- aggregate:
- - { name: "{{ testint2 }}", ipv4: 192.168.22.1/24 }
- - { name: "{{ testint3 }}", ipv4: 192.168.20.1/24, ipv6: "{{ ipv6_address }}" }
- state: absent
- ignore_errors: yes
-
-- name: Setup - Ensure interfaces are layer3
- nxos_interface:
- aggregate:
- - name: "{{ testint2 }}"
- - name: "{{ testint3 }}"
- mode: layer3
-
-- name: Configure ipv4 address to interface
- nxos_l3_interface: &conf
- name: "{{ testint2 }}"
- ipv4: 192.168.22.1/24
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: Configure ipv4 address to interface(Idempotence)
- nxos_l3_interface: *conf
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Remove ipv4 address from interface
- nxos_l3_interface: &rm
- name: "{{ testint2 }}"
- ipv4: 192.168.22.1/24
- state: absent
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: Remove ipv4 address from interface(Idempotence)
- nxos_l3_interface: *rm
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Configure address to interfaces aggregate
- nxos_l3_interface: &conf_agg
- aggregate:
- - { name: "{{ testint2 }}", ipv4: 192.168.22.1/24 }
- - { name: "{{ testint3 }}", ipv4: 192.168.20.1/24, ipv6: "{{ ipv6_address }}" }
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: Configure address to interfaces aggregate(Idempotence)
- nxos_l3_interface: *conf_agg
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Remove address from interfaces aggregate
- nxos_l3_interface: &rm_agg
- aggregate:
- - { name: "{{ testint2 }}", ipv4: 192.168.22.1/24 }
- - { name: "{{ testint3 }}", ipv4: 192.168.20.1/24, ipv6: "{{ ipv6_address }}" }
- state: absent
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: Remove address from interfaces aggregate(Idempotence)
- nxos_l3_interface: *rm_agg
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- debug: msg="END TRANSPORT:NXAPI nxos_l3_interface sanity test"
diff --git a/test/integration/targets/nxos_l3_interfaces/defaults/main.yaml b/test/integration/targets/nxos_l3_interfaces/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_l3_interfaces/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_l3_interfaces/meta/main.yml b/test/integration/targets/nxos_l3_interfaces/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_l3_interfaces/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_l3_interfaces/tasks/cli.yaml b/test/integration/targets/nxos_l3_interfaces/tasks/cli.yaml
deleted file mode 100644
index 6c7ea4a7f9..0000000000
--- a/test/integration/targets/nxos_l3_interfaces/tasks/cli.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_l3_interfaces/tasks/main.yaml b/test/integration/targets/nxos_l3_interfaces/tasks/main.yaml
deleted file mode 100644
index 44edf82581..0000000000
--- a/test/integration/targets/nxos_l3_interfaces/tasks/main.yaml
+++ /dev/null
@@ -1,18 +0,0 @@
----
-# The interface-count asserts need to also account for mgmt0 which is a reserved
-# interface; i.e. it will be included in L3 facts when it has non-default values
-# but excluded from result.before/after because it's not allowed to be managed.
-- set_fact:
- # Zuul CI skips prepare_nxos but will have dhcp configured on mgmt0
- rsvd_intf_len: 1
-
-- block:
- - set_fact:
- mgmt:
- "{{ intdataraw|selectattr('interface', 'equalto', 'mgmt0')|list}}"
- - set_fact:
- rsvd_intf_len:
- "{{ 1 if (mgmt and 'ip_addr' in mgmt[0]) else 0}}"
- when: prepare_nxos_tests_task | default(True) | bool
-
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/nxos_l3_interfaces/tasks/nxapi.yaml b/test/integration/targets/nxos_l3_interfaces/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_l3_interfaces/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_l3_interfaces/tests/cli/deleted.yaml b/test/integration/targets/nxos_l3_interfaces/tests/cli/deleted.yaml
deleted file mode 100644
index 51bf75350b..0000000000
--- a/test/integration/targets/nxos_l3_interfaces/tests/cli/deleted.yaml
+++ /dev/null
@@ -1,70 +0,0 @@
----
-- debug:
- msg: "Start nxos_l3_interfaces deleted integration tests connection={{ ansible_connection }}"
-
-- set_fact:
- test_int3: "{{ nxos_int3 }}"
- subint3: "{{ nxos_int3 }}.42"
-
-- name: setup1
- cli_config: &cleanup
- config: |
- no system default switchport
- default interface {{ test_int3 }}
- interface {{ test_int3 }}
- no switchport
- ignore_errors: yes
-
-- name: setup2 cleanup all L3 interfaces on device
- nxos_l3_interfaces:
- state: deleted
-
-- block:
- - name: setup3
- cli_config:
- config: |
- interface {{ subint3 }}
- encapsulation dot1q 42
- ip address 192.168.10.2/24
- no ip redirects
- ip unreachables
-
- - name: Gather l3_interfaces facts
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: l3_interfaces
-
- - name: deleted
- nxos_l3_interfaces: &deleted
- state: deleted
- register: result
-
- - assert:
- that:
- - "result.before|length == (ansible_facts.network_resources.l3_interfaces|length|int - rsvd_intf_len|int)"
- - "result.after|length == 0"
- - "result.changed == true"
- - "'interface {{ subint3 }}' in result.commands"
- - "'no encapsulation dot1q' in result.commands"
- - "'ip redirects' in result.commands"
- - "'no ip unreachables' in result.commands"
- - "'no ip address' in result.commands"
- - "result.commands|length == 5"
-
- - name: Idempotence - deleted
- nxos_l3_interfaces: *deleted
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config:
- config: |
- no interface {{ subint3 }}
- ignore_errors: yes
diff --git a/test/integration/targets/nxos_l3_interfaces/tests/cli/merged.yaml b/test/integration/targets/nxos_l3_interfaces/tests/cli/merged.yaml
deleted file mode 100644
index 80404ef18e..0000000000
--- a/test/integration/targets/nxos_l3_interfaces/tests/cli/merged.yaml
+++ /dev/null
@@ -1,71 +0,0 @@
----
-- debug:
- msg: "Start nxos_l3_interfaces merged integration tests connection={{ ansible_connection }}"
-
-- set_fact:
- test_int3: "{{ nxos_int3 }}"
- subint3: "{{ nxos_int3 }}.42"
-
-- name: setup1
- cli_config: &cleanup
- config: |
- no system default switchport
- default interface {{ test_int3 }}
- interface {{ test_int3 }}
- no switchport
- ignore_errors: yes
-
-- name: setup2 cleanup all L3 states on all interfaces
- nxos_l3_interfaces:
- state: deleted
-
-- block:
- - name: Merged
- nxos_l3_interfaces: &merged
- config:
- - name: "{{ subint3 }}"
- dot1q: 42
- redirects: false
- unreachables: true
- ipv4:
- - address: 192.168.10.2/24
- state: merged
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "result.before|length == 0"
- - "'interface {{ subint3 }}' in result.commands"
- - "'encapsulation dot1q 42' in result.commands"
- - "'no ip redirects' in result.commands"
- - "'ip unreachables' in result.commands"
- - "'ip address 192.168.10.2/24' in result.commands"
- - "result.commands|length == 5"
-
- - name: Gather l3_interfaces facts
- nxos_facts:
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: l3_interfaces
-
- - assert:
- that:
- - "result.after|length == (ansible_facts.network_resources.l3_interfaces|length|int - rsvd_intf_len|int)"
-
- - name: Idempotence - Merged
- nxos_l3_interfaces: *merged
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config:
- config: |
- no interface {{ subint3 }}
- ignore_errors: yes
diff --git a/test/integration/targets/nxos_l3_interfaces/tests/cli/overridden.yaml b/test/integration/targets/nxos_l3_interfaces/tests/cli/overridden.yaml
deleted file mode 100644
index f3d6e5cf21..0000000000
--- a/test/integration/targets/nxos_l3_interfaces/tests/cli/overridden.yaml
+++ /dev/null
@@ -1,84 +0,0 @@
----
-- debug:
- msg: "Start nxos_l3_interfaces overridden integration tests connection={{ ansible_connection }}"
-
-- set_fact: test_int1="{{ nxos_int1 }}"
-- set_fact: test_int2="{{ nxos_int2 }}"
-- set_fact: test_int3="{{ nxos_int3 }}"
-
-- name: setup1
- cli_config: &cleanup
- config: |
- no system default switchport
- default interface {{ test_int1 }}
- default interface {{ test_int2 }}
- default interface {{ test_int3 }}
- interface {{ test_int1 }}
- no switchport
- interface {{ test_int2 }}
- no switchport
- interface {{ test_int3 }}
- no switchport
- ignore_errors: yes
-
-- name: setup2 cleanup all L3 states on all interfaces
- nxos_l3_interfaces:
- state: deleted
-
-- block:
- - name: setup3
- cli_config:
- config: |
- interface {{ test_int1 }}
- ip address 192.168.10.2/24 tag 5
- interface {{ test_int2 }}
- ip address 10.1.1.1/24
-
- - name: Gather l3_interfaces facts
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: l3_interfaces
-
- - name: Overridden
- nxos_l3_interfaces: &overridden
- config:
- - name: "{{ test_int3 }}"
- ipv4:
- - address: 10.1.1.3/24
- state: overridden
- register: result
-
- - assert:
- that:
- - "result.before|length == (ansible_facts.network_resources.l3_interfaces|length|int - rsvd_intf_len|int)"
- - "result.changed == true"
- - "'interface {{ test_int1 }}' in result.commands"
- - "'no ip address' in result.commands"
- - "'interface {{ test_int2 }}' in result.commands"
- - "'no ip address' in result.commands"
- - "'interface {{ test_int3 }}' in result.commands"
- - "'ip address 10.1.1.3/24' in result.commands"
- - "result.commands|length == 6"
-
- - name: Gather l3_interfaces post facts
- nxos_facts: *facts
-
- - assert:
- that:
- - "result.after|length == (ansible_facts.network_resources.l3_interfaces|length|int - rsvd_intf_len|int)"
-
- - name: Idempotence - Overridden
- nxos_l3_interfaces: *overridden
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config: *cleanup
- ignore_errors: yes
diff --git a/test/integration/targets/nxos_l3_interfaces/tests/cli/replaced.yaml b/test/integration/targets/nxos_l3_interfaces/tests/cli/replaced.yaml
deleted file mode 100644
index 2841a7e35e..0000000000
--- a/test/integration/targets/nxos_l3_interfaces/tests/cli/replaced.yaml
+++ /dev/null
@@ -1,117 +0,0 @@
----
-- debug:
- msg: "Start nxos_l3_interfaces replaced integration tests connection={{ ansible_connection }}"
-
-- set_fact:
- test_int3: "{{ nxos_int3 }}"
- subint3: "{{ nxos_int3 }}.42"
-
-- name: setup1
- cli_config: &cleanup
- config: |
- no system default switchport
- default interface {{ test_int3 }}
- interface {{ test_int3 }}
- no switchport
- ignore_errors: yes
-
-- name: setup2 cleanup all L3 states on all interfaces
- nxos_l3_interfaces:
- state: deleted
-
-- block:
- - name: setup3
- cli_config:
- config: |
- interface {{ subint3 }}
- encapsulation dot1q 42
- ip address 192.168.10.2/24
- no ip redirects
- ip unreachables
-
- - name: Gather l3_interfaces facts
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: l3_interfaces
-
- - name: Replaced
- nxos_l3_interfaces: &replaced
- config:
- - name: "{{ subint3 }}"
- dot1q: 442
- # Note: device auto-disables redirects when secondaries are present
- redirects: false
- unreachables: false
- ipv4:
- - address: 192.168.20.2/24
- tag: 5
- - address: 192.168.200.2/24
- secondary: True
- state: replaced
- register: result
-
- - assert:
- that:
- - "result.before|length == (ansible_facts.network_resources.l3_interfaces|length|int - rsvd_intf_len|int)"
- - "result.changed == true"
- - "'interface {{ subint3 }}' in result.commands"
- - "'encapsulation dot1q 442' in result.commands"
- - "'no ip unreachables' in result.commands"
- - "'ip address 192.168.20.2/24 tag 5' in result.commands"
- - "'ip address 192.168.200.2/24 secondary' in result.commands"
- - "result.commands|length == 5"
-
- - name: Gather l3_interfaces post facts
- nxos_facts: *facts
-
- - assert:
- that:
- - "result.after|length == (ansible_facts.network_resources.l3_interfaces|length|int - rsvd_intf_len|int)"
-
- - name: Idempotence - Replaced
- nxos_l3_interfaces: *replaced
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- - name: Replaced with no optional attrs specified
- nxos_l3_interfaces: &replaced_no_attrs
- config:
- - name: "{{ subint3 }}"
- state: replaced
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'interface {{ subint3 }}' in result.commands"
- - "'no encapsulation dot1q' in result.commands"
- - "'no ip address' in result.commands"
-
- - assert:
- that:
- # 'ip redirects' normally auto-enables due to rmv'ing the secondaries;
- # this behavior is unreliable on legacy platforms thus command is explicit.
- - "'ip redirects' in result.commands"
- when: platform is match('N[3567]')
-
- - name: Idempotence - Replaced with no attrs specified
- nxos_l3_interfaces: *replaced_no_attrs
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config:
- config: |
- no interface {{ subint3 }}
- ignore_errors: yes
diff --git a/test/integration/targets/nxos_lacp/defaults/main.yaml b/test/integration/targets/nxos_lacp/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_lacp/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_lacp/meta/main.yml b/test/integration/targets/nxos_lacp/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_lacp/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_lacp/tasks/cli.yaml b/test/integration/targets/nxos_lacp/tasks/cli.yaml
deleted file mode 100644
index 76743023ce..0000000000
--- a/test/integration/targets/nxos_lacp/tasks/cli.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_lacp/tasks/main.yaml b/test/integration/targets/nxos_lacp/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/nxos_lacp/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/nxos_lacp/tests/cli/deleted.yaml b/test/integration/targets/nxos_lacp/tests/cli/deleted.yaml
deleted file mode 100644
index a9e158e69d..0000000000
--- a/test/integration/targets/nxos_lacp/tests/cli/deleted.yaml
+++ /dev/null
@@ -1,71 +0,0 @@
----
-- debug:
- msg: "Start nxos_lacp deleted integration tests connection={{ ansible_connection }}"
-
-- name: Enable lacp feature
- nxos_feature:
- feature: lacp
-
-- set_fact:
- mac: "lacp system-mac 00c1.4c00.bd15 role primary"
- when: platform is search('N9K') and imagetag is not search('I[2-6]')
-
-- block:
- - name: Setup
- cli_config:
- config: lacp system-priority 11
-
- - name: Setup
- cli_config:
- config: "{{ mac|default(omit) }}"
-
- - name: Gather lacp facts
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: lacp
-
- - name: deleted
- nxos_lacp: &deleted
- state: deleted
- register: result
-
- - assert:
- that:
- - "ansible_facts.network_resources.lacp == result.before"
- - "'no lacp system-priority' in result.commands"
- - "result.changed == true"
- - "result.commands|length == 1"
- when: platform is not search('N9K')
-
- - assert:
- that:
- - "ansible_facts.network_resources.lacp == result.before"
- - "'no lacp system-priority' in result.commands"
- - "'no lacp system-mac' in result.commands"
- - "result.changed == true"
- - "result.commands|length == 2"
- when: platform is search('N9K') and imagetag is not search('I[2-6]')
-
- - name: Gather lacp post facts
- nxos_facts: *facts
-
- - assert:
- that:
- - "result.after|length == 0"
-
- - name: Idempotence - deleted
- nxos_lacp: *deleted
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- nxos_feature:
- feature: lacp
- state: disabled
diff --git a/test/integration/targets/nxos_lacp/tests/cli/merged.yaml b/test/integration/targets/nxos_lacp/tests/cli/merged.yaml
deleted file mode 100644
index 45a5bed1db..0000000000
--- a/test/integration/targets/nxos_lacp/tests/cli/merged.yaml
+++ /dev/null
@@ -1,66 +0,0 @@
----
-- debug:
- msg: "Start nxos_lacp merged integration tests connection={{ ansible_connection }}"
-
-- name: Enable lacp
- nxos_feature:
- feature: lacp
-
-- set_fact:
- mac:
- address: 00c1.4c00.bd15
- role: primary
- when: platform is search('N9K') and imagetag is not search('I[2-6]')
-
-- block:
- - name: Merged
- nxos_lacp: &merged
- config:
- system:
- priority: 11
- mac: "{{ mac|default(omit) }}"
- state: merged
- register: result
-
- - assert:
- that:
- - "result.before|length == 0"
- - "result.changed == true"
- - "'lacp system-priority 11' in result.commands"
- - "'lacp system-mac 00c1.4c00.bd15 role primary' in result.commands"
- - "result.commands|length == 2"
- when: platform is search('N9K') and imagetag is not search('I[2-6]')
-
- - assert:
- that:
- - "result.before|length == 0"
- - "result.changed == true"
- - "'lacp system-priority 11' in result.commands"
- - "result.commands|length == 1"
- when: platform is not search('N9K')
-
- - name: Gather lacp facts
- nxos_facts:
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: lacp
-
- - assert:
- that:
- - "ansible_facts.network_resources.lacp == result.after"
-
- - name: Idempotence - Merged
- nxos_lacp: *merged
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- nxos_feature:
- feature: lacp
- state: disabled
diff --git a/test/integration/targets/nxos_lacp/tests/cli/replaced.yaml b/test/integration/targets/nxos_lacp/tests/cli/replaced.yaml
deleted file mode 100644
index 7b367a7958..0000000000
--- a/test/integration/targets/nxos_lacp/tests/cli/replaced.yaml
+++ /dev/null
@@ -1,104 +0,0 @@
----
-
-- debug:
- msg: "Start nxos_lacp replaced integration tests connection={{ ansible_connection }}"
-
-- name: Enable lacp feature
- nxos_feature:
- feature: lacp
-
-- set_fact:
- mac1: "lacp system-mac 00c1.4c00.bd20 role primary"
- when: platform is search('N9K') and imagetag is not search('I[2-6]')
-
-- set_fact:
- mac2:
- address: 00c1.4c00.bd15
- role: secondary
- when: platform is search('N9K') and imagetag is not search('I[2-6]')
-
-- block:
- - name: Setup1
- cli_config:
- config: lacp system-priority 11
-
- - name: Setup2
- cli_config:
- config: "{{ mac1|default(omit) }}"
-
- - name: Gather lacp facts
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: lacp
-
- - name: Replaced
- nxos_lacp: &replaced
- config:
- system:
- priority: 12
- mac: "{{ mac2|default(omit) }}"
- state: replaced
- register: result
-
- - assert:
- that:
- - "ansible_facts.network_resources.lacp == result.before"
- - "result.changed == true"
- - "result.commands|length == 2"
- - "'no lacp system-priority' in result.commands"
- - "'lacp system-priority 12' in result.commands"
- when: platform is not search('N9K')
-
- - assert:
- that:
- - "ansible_facts.network_resources.lacp == result.before"
- - "result.changed == true"
- - "'no lacp system-priority' in result.commands"
- - "'no lacp system-mac' in result.commands"
- - "'lacp system-priority 12' in result.commands"
- - "'lacp system-mac 00c1.4c00.bd15 role secondary' in result.commands"
- - "result.commands|length == 4"
- when: platform is search('N9K') and imagetag is not search('I[2-6]')
-
- - name: Gather lacp interfaces post facts
- nxos_facts: *facts
-
- - assert:
- that:
- - "ansible_facts.network_resources.lacp == result.after"
- when: platform is search('N9K') and imagetag is not search('I[2-6]')
-
- - name: Idempotence - Replaced
- nxos_lacp: *replaced
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- - name: Setup3
- cli_config:
- config: "{{ mac1|default(omit) }}"
-
- - name: Replaced
- nxos_lacp:
- state: replaced
- register: result
- when: platform is search('N9K') and imagetag is not search('I[2-6]')
-
- - assert:
- that:
- - "result.changed == true"
- - "result.commands|length == 2"
- - "'no lacp system-mac' in result.commands"
- - "'no lacp system-priority' in result.commands"
- when: platform is search('N9K') and imagetag is not search('I[2-6]')
-
- always:
- - name: teardown
- nxos_feature:
- feature: lacp
- state: disabled
diff --git a/test/integration/targets/nxos_lacp_interfaces/defaults/main.yaml b/test/integration/targets/nxos_lacp_interfaces/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_lacp_interfaces/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_lacp_interfaces/meta/main.yml b/test/integration/targets/nxos_lacp_interfaces/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_lacp_interfaces/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_lacp_interfaces/tasks/cli.yaml b/test/integration/targets/nxos_lacp_interfaces/tasks/cli.yaml
deleted file mode 100644
index 6c7ea4a7f9..0000000000
--- a/test/integration/targets/nxos_lacp_interfaces/tasks/cli.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_lacp_interfaces/tasks/main.yaml b/test/integration/targets/nxos_lacp_interfaces/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/nxos_lacp_interfaces/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/nxos_lacp_interfaces/tasks/nxapi.yaml b/test/integration/targets/nxos_lacp_interfaces/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_lacp_interfaces/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_lacp_interfaces/tests/cli/deleted.yaml b/test/integration/targets/nxos_lacp_interfaces/tests/cli/deleted.yaml
deleted file mode 100644
index 51cc33a31e..0000000000
--- a/test/integration/targets/nxos_lacp_interfaces/tests/cli/deleted.yaml
+++ /dev/null
@@ -1,79 +0,0 @@
----
-- debug:
- msg: "Start nxos_lacp_interfaces deleted integration tests connection={{ ansible_connection }}"
-
-#
-# "lacp mode delay" is not supported on Nexus 9500 series switches.
-# Three models of Nexus 9500 switches have chassis types C9504, C9508 and C9516.
-#
-
-- set_fact:
- mode: delay
- when: platform is not search('N3K|N5K|N6K|N7K') and imagetag is not search('A8|I2') and
- image_version is not search ('9.2') and chassis_type is not search('C95')
-
-- name: setup1
- cli_config: &cleanup
- config: |
- no interface port-channel5
- no interface port-channel10
- no feature lacp
-
-- block:
- - name: setup2
- cli_config:
- config: |
- feature lacp
- interface port-channel5
- lacp min-links 5
- interface port-channel10
- lacp max-bundle 10
-
- - name: setup3 - L2 for mode command
- cli_config:
- config: |
- interface port-channel10
- switchport
- lacp mode delay
- when: mode is defined
-
- - name: Gather lacp_interfaces facts
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: lacp_interfaces
-
- - name: deleted
- nxos_lacp_interfaces: &deleted
- state: deleted
- register: result
-
- - assert:
- that:
- - "ansible_facts.network_resources.lacp_interfaces|symmetric_difference(result.before)|length == 0"
- - "result.after|length == 0"
- - "result.changed == true"
- - "'interface port-channel5' in result.commands"
- - "'no lacp min-links' in result.commands"
- - "'interface port-channel10' in result.commands"
- - "'no lacp max-bundle' in result.commands"
-
- - assert:
- that:
- - "'no lacp mode delay' in result.commands"
- - "result.commands|length == 5"
- when: mode is defined
-
- - name: Idempotence - deleted
- nxos_lacp_interfaces: *deleted
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config: *cleanup
diff --git a/test/integration/targets/nxos_lacp_interfaces/tests/cli/merged.yaml b/test/integration/targets/nxos_lacp_interfaces/tests/cli/merged.yaml
deleted file mode 100644
index 0d3562fd02..0000000000
--- a/test/integration/targets/nxos_lacp_interfaces/tests/cli/merged.yaml
+++ /dev/null
@@ -1,85 +0,0 @@
----
-- debug:
- msg: "Start nxos_lacp_interfaces merged integration tests connection={{ ansible_connection }}"
-
-#
-# "lacp mode delay" is not supported on Nexus 9500 series switches.
-# Three models of Nexus 9500 switches have chassis types C9504, C9508 and C9516.
-#
-
-- set_fact:
- mode: delay
- when: platform is not search('N3K|N5K|N6K|N7K') and imagetag is not search('A8|I2') and
- image_version is not search ('9.2') and chassis_type is not search('C95')
-
-- name: setup1
- cli_config: &cleanup
- config: |
- no interface port-channel5
- no interface port-channel10
- no feature lacp
-
-- block:
- - name: setup2
- cli_config:
- config: |
- feature lacp
-
- - name: setup3 - L2 for mode command
- cli_config:
- config: |
- interface port-channel5
- switchport
- when: mode is defined
-
- - name: Merged
- nxos_lacp_interfaces: &merged
- config:
- - name: port-channel10
- links:
- min: 5
- - name: port-channel5
- mode: "{{ mode | default(omit) }}"
- links:
- max: 10
- state: merged
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "result.before|length == 0"
- - "'interface port-channel10' in result.commands"
- - "'lacp min-links 5' in result.commands"
- - "'interface port-channel5' in result.commands"
- - "'lacp max-bundle 10' in result.commands"
-
- - assert:
- that:
- - "'lacp mode delay' in result.commands"
- - "result.commands|length == 5"
- when: mode is defined
-
- - name: Gather lacp_interfaces facts
- nxos_facts:
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: lacp_interfaces
-
- - assert:
- that:
- - "ansible_facts.network_resources.lacp_interfaces|symmetric_difference(result.after)|length == 0"
-
- - name: Idempotence - Merged
- nxos_lacp_interfaces: *merged
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config: *cleanup
diff --git a/test/integration/targets/nxos_lacp_interfaces/tests/cli/overridden.yaml b/test/integration/targets/nxos_lacp_interfaces/tests/cli/overridden.yaml
deleted file mode 100644
index 27bdbaa175..0000000000
--- a/test/integration/targets/nxos_lacp_interfaces/tests/cli/overridden.yaml
+++ /dev/null
@@ -1,91 +0,0 @@
----
-- debug:
- msg: "Start nxos_lacp_interfaces overridden integration tests connection={{ ansible_connection }}"
-
-#
-# "lacp mode delay" is not supported on Nexus 9500 series switches.
-# Three models of Nexus 9500 switches have chassis types C9504, C9508 and C9516.
-#
-
-- set_fact:
- mode: delay
- when: platform is not search('N3K|N5K|N6K|N7K') and imagetag is not search('A8|I2') and
- image_version is not search ('9.2') and chassis_type is not search('C95')
-
-- name: setup1
- cli_config: &cleanup
- config: |
- no interface port-channel5
- no interface port-channel10
- no interface port-channel11
- no feature lacp
-
-- block:
- - name: setup2
- cli_config:
- config: |
- feature lacp
- interface port-channel10
- lacp min-links 5
- interface port-channel5
- lacp max-bundle 10
-
- - name: setup3 - L2 for mode command
- cli_config:
- config: |
- interface port-channel11
- switchport
- when: mode is defined
-
- - name: Gather lacp_interfaces facts
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: lacp_interfaces
-
- - name: Overridden
- nxos_lacp_interfaces: &overridden
- config:
- - name: port-channel11
- links:
- min: 4
- mode: "{{ mode | default(omit) }}"
- state: overridden
- register: result
-
- - assert:
- that:
- - "ansible_facts.network_resources.lacp_interfaces|symmetric_difference(result.before)|length == 0"
- - "result.changed == true"
- - "'interface port-channel10' in result.commands"
- - "'no lacp min-links' in result.commands"
- - "'interface port-channel5' in result.commands"
- - "'no lacp max-bundle' in result.commands"
- - "'interface port-channel11' in result.commands"
-
- - assert:
- that:
- - "'lacp mode delay' in result.commands"
- - "result.commands|length == 7"
- when: mode is defined
-
- - name: Gather lacp_interfaces post facts
- nxos_facts: *facts
-
- - assert:
- that:
- - "ansible_facts.network_resources.lacp_interfaces|symmetric_difference(result.after)|length == 0"
-
- - name: Idempotence - Overridden
- nxos_lacp_interfaces: *overridden
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config: *cleanup
diff --git a/test/integration/targets/nxos_lacp_interfaces/tests/cli/replaced.yaml b/test/integration/targets/nxos_lacp_interfaces/tests/cli/replaced.yaml
deleted file mode 100644
index ca15ef7c4a..0000000000
--- a/test/integration/targets/nxos_lacp_interfaces/tests/cli/replaced.yaml
+++ /dev/null
@@ -1,79 +0,0 @@
----
-- debug:
- msg: "Start nxos_lacp_interfaces replaced integration tests connection={{ ansible_connection }}"
-
-#
-# "lacp mode delay" is not supported on Nexus 9500 series switches.
-# Three models of Nexus 9500 switches have chassis types C9504, C9508 and C9516.
-#
-
-- set_fact:
- mode: delay
- when: platform is not search('N3K|N5K|N6K|N7K') and imagetag is not search('A8|I2') and
- image_version is not search ('9.2') and chassis_type is not search('C95')
-
-- name: setup1
- cli_config: &cleanup
- config: |
- no interface port-channel10
- no feature lacp
-
-- block:
- - name: setup2
- cli_config:
- config: |
- feature lacp
- interface port-channel10
- switchport
- lacp min-links 5
-
- - name: Gather lacp_interfaces facts
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: lacp_interfaces
-
- - name: Replaced
- nxos_lacp_interfaces: &replaced
- config:
- - name: port-channel10
- links:
- max: 10
- mode: "{{ mode | default(omit) }}"
- state: replaced
- register: result
-
- - assert:
- that:
- - "ansible_facts.network_resources.lacp_interfaces|symmetric_difference(result.before)|length == 0"
- - "result.changed == true"
- - "'interface port-channel10' in result.commands"
- - "'no lacp min-links' in result.commands"
- - "'lacp max-bundle 10' in result.commands"
-
- - assert:
- that:
- - "'lacp mode delay' in result.commands"
- - "result.commands|length == 4"
- when: mode is defined
-
- - name: Gather lacp_interfaces post facts
- nxos_facts: *facts
-
- - assert:
- that:
- - "ansible_facts.network_resources.lacp_interfaces|symmetric_difference(result.after)|length == 0"
-
- - name: Idempotence - Replaced
- nxos_lacp_interfaces: *replaced
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config: *cleanup
diff --git a/test/integration/targets/nxos_lag_interfaces/defaults/main.yaml b/test/integration/targets/nxos_lag_interfaces/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_lag_interfaces/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_lag_interfaces/meta/main.yml b/test/integration/targets/nxos_lag_interfaces/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_lag_interfaces/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_lag_interfaces/tasks/cli.yaml b/test/integration/targets/nxos_lag_interfaces/tasks/cli.yaml
deleted file mode 100644
index 76743023ce..0000000000
--- a/test/integration/targets/nxos_lag_interfaces/tasks/cli.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_lag_interfaces/tasks/main.yaml b/test/integration/targets/nxos_lag_interfaces/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/nxos_lag_interfaces/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/nxos_lag_interfaces/tests/cli/deleted.yaml b/test/integration/targets/nxos_lag_interfaces/tests/cli/deleted.yaml
deleted file mode 100644
index 265e5184bf..0000000000
--- a/test/integration/targets/nxos_lag_interfaces/tests/cli/deleted.yaml
+++ /dev/null
@@ -1,66 +0,0 @@
----
-- debug:
- msg: "Start nxos_lag_interfaces deleted integration tests connection={{ ansible_connection }}"
-
-- set_fact: test_int1="{{ nxos_int1 }}"
-- set_fact: test_int2="{{ nxos_int2 }}"
-
-- name: enable feature lacp
- nxos_feature:
- feature: lacp
-
-- name: Setup1
- nxos_lag_interfaces: &remove_lags
- state: deleted
-
-- block:
- - name: Setup2
- nxos_config:
- lines:
- - "channel-group 10"
- parents: "{{ item }}"
- loop:
- - "interface {{ test_int1 }}"
- - "interface {{ test_int2 }}"
-
- - name: Gather LAG interfaces facts
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: lag_interfaces
-
- - name: deleted
- nxos_lag_interfaces: &deleted
- state: deleted
- register: result
-
- - assert:
- that:
- - "ansible_facts.network_resources.lag_interfaces|symmetric_difference(result.before)|length == 0"
-
- - name: Gather LAG interfaces post facts
- nxos_facts: *facts
-
- - assert:
- that:
- - "result.after|length == 0"
- - "result.changed == true"
-
- - name: Idempotence - deleted
- nxos_lag_interfaces: *deleted
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- always:
- - name: Teardown
- nxos_lag_interfaces: *remove_lags
- ignore_errors: yes
-
- - name: disable feature lacp
- nxos_feature:
- feature: lacp
- state: disabled
diff --git a/test/integration/targets/nxos_lag_interfaces/tests/cli/merged.yaml b/test/integration/targets/nxos_lag_interfaces/tests/cli/merged.yaml
deleted file mode 100644
index 49af104674..0000000000
--- a/test/integration/targets/nxos_lag_interfaces/tests/cli/merged.yaml
+++ /dev/null
@@ -1,66 +0,0 @@
----
-- debug:
- msg: "Start nxos_lag_interfaces merged integration tests connection={{ ansible_connection }}"
-
-- set_fact: test_int1="{{ nxos_int1 }}"
-- set_fact: test_int2="{{ nxos_int2 }}"
-
-- name: Enable feature lacp
- nxos_feature:
- feature: lacp
-
-- name: Setup
- nxos_config:
- lines:
- - no interface port-channel 10
- ignore_errors: yes
-
-- name: setup2
- nxos_lag_interfaces: &remove_lags
- state: deleted
-
-- block:
- - name: Merged
- nxos_lag_interfaces: &merged
- config:
- - name: port-channel10
- members:
- - member: "{{ test_int1 }}"
- - member: "{{ test_int2 }}"
- mode: yes
- state: merged
- register: result
-
- - assert:
- that:
- - "result.before|length == 0"
- - "result.changed == true"
-
- - name: Gather LAG interfaces facts
- nxos_facts:
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: lag_interfaces
-
- - assert:
- that:
- - "ansible_facts.network_resources.lag_interfaces|symmetric_difference(result.after)|length == 0"
-
- - name: Idempotence - Merged
- nxos_lag_interfaces: *merged
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- always:
- - name: Teardown
- nxos_lag_interfaces: *remove_lags
- ignore_errors: yes
-
- - name: Disable feature lacp
- nxos_feature:
- feature: lacp
- state: disabled
diff --git a/test/integration/targets/nxos_lag_interfaces/tests/cli/overridden.yaml b/test/integration/targets/nxos_lag_interfaces/tests/cli/overridden.yaml
deleted file mode 100644
index f8aa1ca8c4..0000000000
--- a/test/integration/targets/nxos_lag_interfaces/tests/cli/overridden.yaml
+++ /dev/null
@@ -1,78 +0,0 @@
----
-- debug:
- msg: "Start nxos_lag_interfaces overridden integration tests connection={{ ansible_connection }}"
-
-- set_fact: test_int1="{{ nxos_int1 }}"
-- set_fact: test_int2="{{ nxos_int2 }}"
-- set_fact: test_int3="{{ nxos_int3 }}"
-
-- name: enable feature lacp
- nxos_feature:
- feature: lacp
-
-- name: setup1
- nxos_config:
- lines:
- - no interface port-channel 10
- - no interface port-channel 19
- ignore_errors: yes
-
-- name: setup2
- nxos_lag_interfaces: &remove_lags
- state: deleted
-
-- block:
- - name: setup3
- nxos_config:
- lines:
- - "channel-group 10"
- parents: "{{ item }}"
- ignore_errors: yes
- loop:
- - "interface {{ test_int1 }}"
- - "interface {{ test_int2 }}"
-
- - name: Gather LAG interfaces facts
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: lag_interfaces
-
- - name: Overridden
- nxos_lag_interfaces: &overridden
- config:
- - name: port-channel19
- members:
- - member: "{{ test_int3 }}"
- state: overridden
- register: result
-
- - assert:
- that:
- - "ansible_facts.network_resources.lag_interfaces|symmetric_difference(result.before)|length == 0"
- - "result.changed == true"
-
- - name: Gather LAG interfaces post facts
- nxos_facts: *facts
-
- - assert:
- that:
- - "ansible_facts.network_resources.lag_interfaces|symmetric_difference(result.after)|length == 0"
-
- - name: Idempotence - Overridden
- nxos_lag_interfaces: *overridden
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- always:
- - name: Teardown
- nxos_lag_interfaces: *remove_lags
- ignore_errors: yes
-
- - name: disable feature lacp
- nxos_feature:
- feature: lacp
- state: disabled
diff --git a/test/integration/targets/nxos_lag_interfaces/tests/cli/replaced.yaml b/test/integration/targets/nxos_lag_interfaces/tests/cli/replaced.yaml
deleted file mode 100644
index 51032d9fb9..0000000000
--- a/test/integration/targets/nxos_lag_interfaces/tests/cli/replaced.yaml
+++ /dev/null
@@ -1,78 +0,0 @@
----
-- debug:
- msg: "Start nxos_lag_interfaces replaced integration tests connection={{ ansible_connection }}"
-
-- set_fact: test_int1="{{ nxos_int1 }}"
-- set_fact: test_int2="{{ nxos_int2 }}"
-
-- name: enable feature lacp
- nxos_feature:
- feature: lacp
-
-- name: setup1
- nxos_config:
- lines:
- - no interface port-channel 10
- - no interface port-channel 11
- ignore_errors: yes
-
-- name: setup2
- nxos_lag_interfaces: &remove_lags
- state: deleted
-
-- block:
- - name: setup3
- nxos_config:
- lines:
- - "channel-group 10"
- parents: "{{ item }}"
- ignore_errors: yes
- loop:
- - "interface {{ test_int1 }}"
- - "interface {{ test_int2 }}"
-
- - name: Gather LAG interfaces facts
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: lag_interfaces
-
- - name: Replaced
- nxos_lag_interfaces: &replaced
- config:
- - name: port-channel11
- members:
- - member: "{{ test_int2 }}"
- mode: active
- state: replaced
- register: result
-
- - assert:
- that:
- - "ansible_facts.network_resources.lag_interfaces|symmetric_difference(result.before)|length == 0"
-
- - name: Gather LAG interfaces post facts
- nxos_facts: *facts
-
- - assert:
- that:
- - "ansible_facts.network_resources.lag_interfaces|symmetric_difference(result.after)|length == 0"
-
- - name: Idempotence - Replaced
- nxos_lag_interfaces: *replaced
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- always:
- - name: teardown1
- nxos_lag_interfaces: *remove_lags
- ignore_errors: yes
-
- - name: disable feature lacp
- nxos_feature:
- feature: lacp
- state: disabled
diff --git a/test/integration/targets/nxos_linkagg/defaults/main.yaml b/test/integration/targets/nxos_linkagg/defaults/main.yaml
deleted file mode 100644
index 9ef5ba5165..0000000000
--- a/test/integration/targets/nxos_linkagg/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "*"
-test_items: []
diff --git a/test/integration/targets/nxos_linkagg/meta/main.yml b/test/integration/targets/nxos_linkagg/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_linkagg/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_linkagg/tasks/cli.yaml b/test/integration/targets/nxos_linkagg/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_linkagg/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_linkagg/tasks/main.yaml b/test/integration/targets/nxos_linkagg/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_linkagg/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_linkagg/tasks/nxapi.yaml b/test/integration/targets/nxos_linkagg/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_linkagg/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_linkagg/tests/common/sanity.yaml b/test/integration/targets/nxos_linkagg/tests/common/sanity.yaml
deleted file mode 100644
index a25c705719..0000000000
--- a/test/integration/targets/nxos_linkagg/tests/common/sanity.yaml
+++ /dev/null
@@ -1,190 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_linkagg sanity test"
-
-- set_fact: testint1="{{ nxos_int1 }}"
-- set_fact: testint2="{{ nxos_int2 }}"
-
-- name: "Enable feature LACP"
- nxos_feature:
- feature: lacp
- state: enabled
- ignore_errors: yes
-
-- name: setup - remove config used in test(part1)
- nxos_config:
- lines:
- - no interface port-channel 20
- - no interface port-channel 100
-
-- name: setup - remove config used in test(part2)
- nxos_config:
- lines:
- - no channel-group 20
- parents: "{{ item }}"
- ignore_errors: yes
- loop:
- - "interface {{ testint1 }}"
- - "interface {{ testint2 }}"
-
-- name: Put interface in L2 mode
- nxos_interface:
- aggregate:
- - { name: "{{testint1}}" }
- - { name: "{{testint2}}" }
- mode: layer2
- when: platform is match("N35")
-
-- name: create linkagg
- nxos_linkagg: &create
- group: 20
- state: present
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface port-channel 20" in result.commands'
-
-- name: create linkagg(Idempotence)
- nxos_linkagg: *create
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- name: set link aggregation group to members declaratively
- nxos_linkagg: &configure_member
- group: 20
- mode: active
- force: True
- members:
- - "{{ testint1 }}"
- - "{{ testint2 }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface {{ testint1 }}" in result.commands'
- - '"channel-group 20 force mode active" in result.commands'
- - '"interface {{ testint2 }}" in result.commands'
- - '"channel-group 20 force mode active" in result.commands'
-
-- name: set link aggregation group to members(Idempotence)
- nxos_linkagg: *configure_member
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- name: remove link aggregation group from member declaratively
- nxos_linkagg: &remove_member
- group: 20
- mode: active
- force: True
- members:
- - "{{ testint2 }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface {{ testint1 }}" in result.commands'
- - '"no channel-group 20" in result.commands'
-
-- name: remove link aggregation group from member(Idempotence)
- nxos_linkagg: *remove_member
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- name: remove linkagg
- nxos_linkagg: &remove
- group: 20
- state: absent
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"no interface port-channel 20" in result.commands'
-
-- name: remove linkagg(Idempotence)
- nxos_linkagg: *remove
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- name: create aggregate of linkagg definitions
- nxos_linkagg: &create_agg
- aggregate:
- - { group: 20, min_links: 3 }
- - { group: 100, min_links: 4 }
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface port-channel 20" in result.commands'
- - '"lacp min-links 3" in result.commands'
- - '"interface port-channel 100" in result.commands'
- - '"lacp min-links 4" in result.commands'
-
-- name: create aggregate of linkagg definitions(Idempotence)
- nxos_linkagg: *create_agg
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- name: remove aggregate of linkagg definitions
- nxos_linkagg: &remove_agg
- aggregate:
- - { group: 20, min_links: 3 }
- - { group: 100, min_links: 4 }
- state: absent
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"no interface port-channel 20" in result.commands'
- - '"no interface port-channel 100" in result.commands'
-
-- name: remove aggregate of linkagg definitions(Idempotence)
- nxos_linkagg: *remove_agg
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- name: teardown - remove config used in test(part1)
- nxos_config:
- lines:
- - no interface port-channel 20
- - no interface port-channel 100
-
-- name: teardown - remove config used in test(part2)
- nxos_config:
- lines:
- - no channel-group 20
- parents: "{{ item }}"
- ignore_errors: yes
- loop:
- - "interface {{ testint1 }}"
- - "interface {{ testint2 }}"
-
-- name: "Disable feature LACP"
- nxos_feature:
- feature: lacp
- state: disabled
-
-- debug: msg="END connection={{ ansible_connection }} nxos_linkagg sanity test"
diff --git a/test/integration/targets/nxos_lldp/defaults/main.yaml b/test/integration/targets/nxos_lldp/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_lldp/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_lldp/meta/main.yml b/test/integration/targets/nxos_lldp/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_lldp/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_lldp/tasks/cli.yaml b/test/integration/targets/nxos_lldp/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_lldp/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_lldp/tasks/main.yaml b/test/integration/targets/nxos_lldp/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_lldp/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_lldp/tasks/nxapi.yaml b/test/integration/targets/nxos_lldp/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_lldp/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_lldp/tests/cli/sanity.yaml b/test/integration/targets/nxos_lldp/tests/cli/sanity.yaml
deleted file mode 100644
index 5871928c52..0000000000
--- a/test/integration/targets/nxos_lldp/tests/cli/sanity.yaml
+++ /dev/null
@@ -1,47 +0,0 @@
----
-- debug: msg="START TRANSPORT:CLI nxos_lldp sanity test"
-
-- name: Make sure LLDP is not running before tests
- nxos_feature:
- feature: lldp
- state: disabled
-
-- name: Enable LLDP service
- nxos_lldp:
- state: present
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"feature lldp" in result.commands'
-
-- name: Enable LLDP service again (idempotent)
- nxos_lldp:
- state: present
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- name: Disable LLDP service
- nxos_lldp:
- state: absent
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"no feature lldp" in result.commands'
-
-- name: Disable LLDP service (idempotent)
- nxos_lldp:
- state: absent
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- debug: msg="END TRANSPORT:CLI nxos_lldp sanity test"
diff --git a/test/integration/targets/nxos_lldp/tests/nxapi/sanity.yaml b/test/integration/targets/nxos_lldp/tests/nxapi/sanity.yaml
deleted file mode 100644
index d8abc1caa8..0000000000
--- a/test/integration/targets/nxos_lldp/tests/nxapi/sanity.yaml
+++ /dev/null
@@ -1,47 +0,0 @@
----
-- debug: msg="START TRANSPORT:NXAPI nxos_lldp sanity test"
-
-- name: Make sure LLDP is not running before tests
- nxos_feature:
- feature: lldp
- state: disabled
-
-- name: Enable LLDP service
- nxos_lldp:
- state: present
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"feature lldp" in result.commands'
-
-- name: Enable LLDP service again (idempotent)
- nxos_lldp:
- state: present
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- name: Disable LLDP service
- nxos_lldp:
- state: absent
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"no feature lldp" in result.commands'
-
-- name: Disable LLDP service (idempotent)
- nxos_lldp:
- state: absent
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- debug: msg="END TRANSPORT:NXAPI nxos_lldp sanity test"
diff --git a/test/integration/targets/nxos_lldp_global/defaults/main.yaml b/test/integration/targets/nxos_lldp_global/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_lldp_global/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_lldp_global/meta/main.yml b/test/integration/targets/nxos_lldp_global/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_lldp_global/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_lldp_global/tasks/cli.yaml b/test/integration/targets/nxos_lldp_global/tasks/cli.yaml
deleted file mode 100644
index f1c20c1b78..0000000000
--- a/test/integration/targets/nxos_lldp_global/tasks/cli.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yml"
- connection: local
- register: test_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_lldp_global/tasks/main.yaml b/test/integration/targets/nxos_lldp_global/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/nxos_lldp_global/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/nxos_lldp_global/tests/cli/deleted.yml b/test/integration/targets/nxos_lldp_global/tests/cli/deleted.yml
deleted file mode 100644
index 76be479a47..0000000000
--- a/test/integration/targets/nxos_lldp_global/tests/cli/deleted.yml
+++ /dev/null
@@ -1,83 +0,0 @@
----
- - debug:
- msg: "Start nxos_lldp_global deleted integration tests connection = {{ ansible_connection }}"
-
- # N35 skips all tests, image issues.
- - block:
- - set_fact: cfg_port_id=True
- when: platform is not search('N[567]K') and imagetag is not search("I[2345]")
-
- - name: feature off to cleanup lldp
- nxos_feature: &feature_off
- feature: lldp
- state: disabled
-
- - name: Enable LLDP feature
- nxos_feature:
- feature: lldp
- state: enabled
-
- - name: Setup
- cli_config:
- config: |
- lldp holdtime 125
- lldp timer 32
- no lldp tlv-select dcbxp
- lldp tlv-select system-name
- no lldp tlv-select system-description
-
- - name: Setup2
- cli_config:
- config: |
- lldp portid-subtype 1
- no lldp tlv-select power-management
- when: cfg_port_id is defined
-
- - name: Gather lldp_global facts
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: lldp_global
-
- - name: Deleted
- nxos_lldp_global: &deleted
- state: deleted
- register: result
-
- - assert:
- that:
- - "ansible_facts.network_resources.lldp_global == result.before"
- - "'no lldp holdtime 125' in result.commands"
- - "'no lldp timer 32' in result.commands"
- - "'lldp tlv-select dcbxp' in result.commands"
- - "'lldp tlv-select system-description' in result.commands"
- - "result.changed == true "
- - "result.after | length == 0"
-
- - assert:
- that:
- - "'no lldp portid-subtype 1' in result.commands"
- - "'lldp tlv-select power-management' in result.commands"
- when: cfg_port_id is defined
-
- - name: Gather lldp_global post facts
- nxos_facts: *facts
-
- - assert:
- that:
- - "ansible_facts.network_resources == {} "
-
- - name: Idempotence - deleted
- nxos_lldp_global: *deleted
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
- always:
- - name: teardown
- nxos_feature: *feature_off
-
- when: platform is not search('N35')
diff --git a/test/integration/targets/nxos_lldp_global/tests/cli/merged.yml b/test/integration/targets/nxos_lldp_global/tests/cli/merged.yml
deleted file mode 100644
index fce877e4b1..0000000000
--- a/test/integration/targets/nxos_lldp_global/tests/cli/merged.yml
+++ /dev/null
@@ -1,72 +0,0 @@
----
- - debug:
- msg: "Start nxos_lldp_global merged integration tests connection={{ansible_connection}}"
-
- # N35 skips all tests, image issues.
- - block:
- - set_fact:
- port_id: 1
- tlv_power_mgmt:
- power_management: false
- when: platform is not search('N5K|N6K|N7K') and imagetag is not search("I[2345]")
-
- - name: feature off to cleanup lldp
- nxos_feature: &feature_off
- feature: lldp
- state: disabled
-
- - name: Enable lldp
- nxos_feature:
- feature: lldp
-
- - name: Merged
- nxos_lldp_global: &merged
- config:
- reinit: 5
- timer: 40
- port_id: "{{port_id|default(omit)}}"
- tlv_select: "{{tlv_power_mgmt|default(omit)}}"
- state: merged
- register: result
-
- - assert:
- that:
- - "result.before|length == 0"
- - "result.changed == true"
- - "'lldp reinit 5' in result.commands"
- - "'lldp timer 40' in result.commands"
-
- - assert:
- that:
- - "'lldp portid-subtype 1' in result.commands"
- when: port_id is defined
-
- - assert:
- that:
- - "'no lldp tlv-select power-management' in result.commands"
- when: tlv_power_mgmt is defined
-
- - name: Gather lldp_global facts
- nxos_facts:
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: lldp_global
-
- - assert:
- that:
- - "ansible_facts.network_resources.lldp_global == result.after"
-
- - name: Idempotence - Merged
- nxos_lldp_global: *merged
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands | length == 0"
- always:
- - name: teardown
- nxos_feature: *feature_off
-
- when: platform is not search('N35')
diff --git a/test/integration/targets/nxos_lldp_global/tests/cli/replaced.yml b/test/integration/targets/nxos_lldp_global/tests/cli/replaced.yml
deleted file mode 100644
index 56cf9f6693..0000000000
--- a/test/integration/targets/nxos_lldp_global/tests/cli/replaced.yml
+++ /dev/null
@@ -1,93 +0,0 @@
----
- - debug:
- msg: "Start nxos_lldp_global replaced integration tests connection = {{ansible_connection}}"
-
- # N35 skips all tests, image issues.
- - block:
- - set_fact:
- port_id: 1
- tlv_power_mgmt:
- power_management: false
- when: platform is not search('N[567]K') and imagetag is not search("I[2345]")
-
- - name: feature off to cleanup lldp
- nxos_feature: &feature_off
- feature: lldp
- state: disabled
-
- - name: Enable lldp feature
- nxos_feature:
- feature: lldp
- state: enabled
-
- - name: Setup
- cli_config:
- config: |
- lldp holdtime 125
- lldp tlv-select system-name
- no lldp tlv-select port-vlan
-
- - name: Setup2
- cli_config:
- config: |
- lldp portid-subtype 1
- no lldp tlv-select power-management
- when: port_id is defined
-
- - name: Replaced
- nxos_lldp_global: &replaced
- config:
- holdtime: 125
- timer: 35
- tlv_select:
- system:
- name: false
- description: false
- port:
- vlan: false
- dcbxp: false
- state: replaced
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'lldp timer 35' in result.commands"
- - "'no lldp tlv-select system-name' in result.commands"
- - "'no lldp tlv-select system-description' in result.commands"
- - "'no lldp tlv-select dcbxp' in result.commands"
-
- - assert:
- that:
- - "'no lldp portid-subtype 1' in result.commands"
- when: port_id is defined
-
- - assert:
- that:
- - "'lldp tlv-select power-management' in result.commands"
- when: tlv_power_mgmt is defined
-
- - name: Gather lldp_global post facts
- nxos_facts:
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: lldp_global
-
- - assert:
- that:
- - "ansible_facts.network_resources.lldp_global == result.after"
-
- - name: Idempotence - Replaced
- nxos_lldp_global: *replaced
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
- always:
- - name: teardown
- nxos_feature: *feature_off
-
- when: platform is not search('N35')
diff --git a/test/integration/targets/nxos_lldp_interfaces/defaults/main.yaml b/test/integration/targets/nxos_lldp_interfaces/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_lldp_interfaces/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_lldp_interfaces/meta/main.yml b/test/integration/targets/nxos_lldp_interfaces/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_lldp_interfaces/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_lldp_interfaces/tasks/cli.yaml b/test/integration/targets/nxos_lldp_interfaces/tasks/cli.yaml
deleted file mode 100644
index b1d3f35f7b..0000000000
--- a/test/integration/targets/nxos_lldp_interfaces/tasks/cli.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yml"
- connection: local
- register: test_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_lldp_interfaces/tasks/main.yaml b/test/integration/targets/nxos_lldp_interfaces/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/nxos_lldp_interfaces/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/nxos_lldp_interfaces/tasks/nxapi.yaml b/test/integration/targets/nxos_lldp_interfaces/tasks/nxapi.yaml
deleted file mode 100644
index 04c99602e6..0000000000
--- a/test/integration/targets/nxos_lldp_interfaces/tasks/nxapi.yaml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
-
-- name: run test cases (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_lldp_interfaces/tests/cli/deleted.yml b/test/integration/targets/nxos_lldp_interfaces/tests/cli/deleted.yml
deleted file mode 100644
index 4fb88558bd..0000000000
--- a/test/integration/targets/nxos_lldp_interfaces/tests/cli/deleted.yml
+++ /dev/null
@@ -1,73 +0,0 @@
----
-- debug:
- msg: "Start nxos_lldp_interfaces deleted integration tests connection = {{ ansible_connection }}"
-
-- name: Enable LLDP feature
- nxos_feature:
- feature: lldp
- state: enabled
-
-- block:
- - name: Setup
- cli_config:
- config: |
- interface Ethernet1/1
- lldp receive
- no lldp transmit
- interface Ethernet1/2
- no lldp receive
- lldp tlv-set vlan 12
- interface Ethernet1/3
- lldp tlv-set management-address 192.0.2.12
-
- - name: Delete on single interface
- nxos_lldp_interfaces:
- config:
- - name: Ethernet1/2
- state: deleted
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'interface Ethernet1/2' in result.commands"
- - "'lldp receive' in result.commands"
- - "'no lldp tlv-set vlan 12' in result.commands"
- - "result.commands | length == 3"
-
- - name: Gather lldp_interfaces facts
- nxos_facts: &facts
- gather_subset:
- - "!all"
- - "!min"
- gather_network_resources: lldp_interfaces
-
- - name: Deleted
- nxos_lldp_interfaces: &deleted
- state: deleted
- register: result
-
- - assert:
- that:
- - "ansible_facts.network_resources.lldp_interfaces == result.before"
- - "'interface Ethernet1/1' in result.commands"
- - "'lldp transmit' in result.commands"
- - "'interface Ethernet1/3' in result.commands"
- - "'no lldp tlv-set management-address 192.0.2.12' in result.commands"
- - "result.changed == true "
- - "result.commands | length == 4"
-
- - name: Idempotence - deleted
- nxos_lldp_interfaces: *deleted
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- nxos_feature:
- feature: lldp
- state: disabled
diff --git a/test/integration/targets/nxos_lldp_interfaces/tests/cli/gathered.yml b/test/integration/targets/nxos_lldp_interfaces/tests/cli/gathered.yml
deleted file mode 100644
index 032084ead5..0000000000
--- a/test/integration/targets/nxos_lldp_interfaces/tests/cli/gathered.yml
+++ /dev/null
@@ -1,52 +0,0 @@
----
-- debug:
- msg: Start nxos_lldp_interfaces gathered integration tests connection={{ansible_connection}}"
-
-- name: Enable LLDP feature
- nxos_feature:
- feature: lldp
- state: enabled
-
-- block:
- - name: Setup
- cli_config:
- config: |
- interface Ethernet1/1
- lldp receive
- no lldp transmit
- interface Ethernet1/2
- no lldp receive
- lldp tlv-set vlan 12
- interface Ethernet1/3
- lldp tlv-set management-address 192.0.2.12
-
- - name: Gather lldp interfaces facts
- nxos_facts: &facts
- gather_subset:
- - "!all"
- - "!min"
- gather_network_resources: lldp_interfaces
-
- - name: Gathered
- nxos_lldp_interfaces: &gathered
- state: gathered
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "ansible_facts.network_resources.lldp_interfaces == result.gathered"
-
- - name: Idempotence - Gathered
- nxos_lldp_interfaces: *gathered
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- always:
- - name: teardown
- nxos_feature:
- feature: lldp
- state: disabled
diff --git a/test/integration/targets/nxos_lldp_interfaces/tests/cli/merged.yml b/test/integration/targets/nxos_lldp_interfaces/tests/cli/merged.yml
deleted file mode 100644
index 38bf374ee5..0000000000
--- a/test/integration/targets/nxos_lldp_interfaces/tests/cli/merged.yml
+++ /dev/null
@@ -1,60 +0,0 @@
----
- - debug:
- msg: "Start nxos_lldp_interfaces merged integration tests connection={{ansible_connection}}"
-
- - name: Enable lldp
- nxos_feature:
- feature: lldp
-
- - block:
- - name: Merged
- nxos_lldp_interfaces: &merged
- config:
- - name: Ethernet 1/1
- receive: false
- tlv_set:
- vlan: 123
-
- - name: Ethernet1/2
- transmit: false
- tlv_set:
- management_address: 10.0.0.1
- state: merged
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'interface Ethernet1/1' in result.commands"
- - "'no lldp receive' in result.commands"
- - "'lldp tlv-set vlan 123' in result.commands"
- - "'interface Ethernet1/2' in result.commands"
- - "'no lldp transmit' in result.commands"
- - "'lldp tlv-set management-address 10.0.0.1' in result.commands"
- - "result.commands | length == 6"
-
- - name: Gather lldp_interfaces facts
- nxos_facts:
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: lldp_interfaces
-
- - assert:
- that:
- - "ansible_facts.network_resources.lldp_interfaces == result.after"
-
- - name: Idempotence - Merged
- nxos_lldp_interfaces: *merged
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands | length == 0"
-
- always:
- - name: teardown
- nxos_feature:
- feature: lldp
- state: disabled \ No newline at end of file
diff --git a/test/integration/targets/nxos_lldp_interfaces/tests/cli/overridden.yml b/test/integration/targets/nxos_lldp_interfaces/tests/cli/overridden.yml
deleted file mode 100644
index f3b231ccb3..0000000000
--- a/test/integration/targets/nxos_lldp_interfaces/tests/cli/overridden.yml
+++ /dev/null
@@ -1,66 +0,0 @@
----
- - debug:
- msg: "Start nxos_lldp_interfaces overridden tests connection={{ ansible_connection }}"
-
- - name: Enable LLDP feature
- nxos_feature:
- feature: lldp
- state: enabled
-
- - block:
- - name: Setup
- cli_config:
- config: |
- interface Ethernet1/1
- no lldp receive
- lldp tlv-set management-address 12.12.12.12
-
- - name: Gather lldp_interfaces facts
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: lldp_interfaces
-
- - name: Overridden
- nxos_lldp_interfaces: &overridden
- config:
- - name: Ethernet1/2
- receive: no
- tlv_set:
- vlan: 12
- state: overridden
- register: result
-
- - assert:
- that:
- - "ansible_facts.network_resources.lldp_interfaces == result.before"
- - "'interface Ethernet1/1' in result.commands"
- - "'lldp receive' in result.commands"
- - "'no lldp tlv-set management-address 12.12.12.12' in result.commands"
- - "'interface Ethernet1/2' in result.commands"
- - "'no lldp receive' in result.commands"
- - "'lldp tlv-set vlan 12' in result.commands"
- - "result.commands | length == 6"
-
- - name: Gather lldp_interfaces post facts
- nxos_facts: *facts
-
- - assert:
- that:
- - "ansible_facts.network_resources.lldp_interfaces == result.after"
-
- - name: Idempotence - overridden
- nxos_lldp_interfaces: *overridden
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- nxos_feature:
- feature: lldp
- state: disabled
diff --git a/test/integration/targets/nxos_lldp_interfaces/tests/cli/parsed.yml b/test/integration/targets/nxos_lldp_interfaces/tests/cli/parsed.yml
deleted file mode 100644
index bbb9609291..0000000000
--- a/test/integration/targets/nxos_lldp_interfaces/tests/cli/parsed.yml
+++ /dev/null
@@ -1,47 +0,0 @@
----
-- debug:
- msg: Start nxos_lldp_interfaces parsed integration tests connection={{ansible_connection}}"
-
-- name: Enable lldp
- nxos_feature:
- feature: lldp
-
-- block:
- - name: Gather lldp interfaces facts
- nxos_facts: &facts
- gather_subset:
- - "!all"
- - "!min"
- gather_network_resources: lldp_interfaces
-
- - name: Parsed
- nxos_lldp_interfaces: &parsed
- running_config: |
- interface Ethernet1/1
- lldp receive
- no lldp transmit
- interface Ethernet1/2
- no lldp receive
- lldp tlv-set vlan 12
- interface Ethernet1/3
- lldp tlv-set management-address 192.0.2.12
- state: parsed
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.parsed == parsed"
-
- - name: Idempotence - Parsed
- nxos_lldp_interfaces: *parsed
- register: result
-
- - assert:
- that: "result.changed == false"
-
- always:
- - name: teardown
- nxos_feature:
- feature: lldp
- state: disabled
diff --git a/test/integration/targets/nxos_lldp_interfaces/tests/cli/remove_config.yaml b/test/integration/targets/nxos_lldp_interfaces/tests/cli/remove_config.yaml
deleted file mode 100644
index 955325eac2..0000000000
--- a/test/integration/targets/nxos_lldp_interfaces/tests/cli/remove_config.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-- cli_config:
- config: |
- no interface port-channel1
- no interface port-channel2
- no interface port-channel12
- ignore_errors: yes
-#this is just for RTT to remove spill overs from other modules and pass in ZUUL
diff --git a/test/integration/targets/nxos_lldp_interfaces/tests/cli/rendered.yml b/test/integration/targets/nxos_lldp_interfaces/tests/cli/rendered.yml
deleted file mode 100644
index 2105b07383..0000000000
--- a/test/integration/targets/nxos_lldp_interfaces/tests/cli/rendered.yml
+++ /dev/null
@@ -1,42 +0,0 @@
----
-- debug:
- msg: "Start nxos_lldp_interfaces rendered tests connection={{ ansible_connection }}"
-
-- name: Rendered
- nxos_lldp_interfaces: &rendered
- config:
- - name: Ethernet1/1
- receive: true
- transmit: false
-
- - name: Ethernet1/2
- receive: false
- tlv_set:
- vlan: 12
-
- - name: Ethernet1/3
- tlv_set:
- management_address: 192.0.2.12
- state: rendered
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "'interface Ethernet1/1' in result.rendered"
- - "'lldp receive' in result.rendered"
- - "'no lldp transmit' in result.rendered"
- - "'interface Ethernet1/2' in result.rendered"
- - "'no lldp receive' in result.rendered"
- - "'lldp tlv-set vlan 12' in result.rendered"
- - "'interface Ethernet1/3' in result.rendered"
- - "'lldp tlv-set management-address 192.0.2.12' in result.rendered"
- - "result.rendered | length == 8"
-
-- name: Idempotence - Rendered
- nxos_lldp_interfaces: *rendered
- register: result
-
-- assert:
- that:
- - "result.changed == false"
diff --git a/test/integration/targets/nxos_lldp_interfaces/tests/cli/replaced.yml b/test/integration/targets/nxos_lldp_interfaces/tests/cli/replaced.yml
deleted file mode 100644
index f3866bf19a..0000000000
--- a/test/integration/targets/nxos_lldp_interfaces/tests/cli/replaced.yml
+++ /dev/null
@@ -1,62 +0,0 @@
----
- - debug:
- msg: "Start nxos_lldp_interfaces replaced integration tests connection = {{ansible_connection}}"
-
- - name: Enable lldp feature
- nxos_feature:
- feature: lldp
- state: enabled
-
- - block:
- - name: Setup
- cli_config:
- config: |
- interface Ethernet1/2
- no lldp receive
- lldp tlv-set management-address 192.168.122.64
-
- - name: Replaced
- nxos_lldp_interfaces: &replaced
- config:
- - name: Ethernet1/2
- transmit: false
- tlv_set:
- vlan: 2
- state: replaced
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "'interface Ethernet1/2' in result.commands"
- - "'lldp receive' in result.commands"
- - "'no lldp tlv-set management-address 192.168.122.64' in result.commands"
- - "'no lldp transmit' in result.commands"
- - "'lldp tlv-set vlan 2' in result.commands"
- - "result.commands|length == 5"
-
- - name: Gather lldp_interfaces post facts
- nxos_facts:
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: lldp_interfaces
-
- - assert:
- that:
- - "ansible_facts.network_resources.lldp_interfaces == result.after"
-
- - name: Idempotence - Replaced
- nxos_lldp_interfaces: *replaced
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- nxos_feature:
- feature: lldp
- state: disabled
diff --git a/test/integration/targets/nxos_lldp_interfaces/tests/cli/rtt.yml b/test/integration/targets/nxos_lldp_interfaces/tests/cli/rtt.yml
deleted file mode 100644
index ed8e976587..0000000000
--- a/test/integration/targets/nxos_lldp_interfaces/tests/cli/rtt.yml
+++ /dev/null
@@ -1,70 +0,0 @@
----
-- debug:
- msg: "Start nxos_lldp_interfaces round trip integration tests on connection={{ ansible_connection }}"
-
-- name: Enable lldp
- nxos_feature:
- feature: lldp
-
-- include_tasks: remove_config.yaml
-
-- block:
- - name: RTT - Apply the provided configuration (base config)
- nxos_lldp_interfaces:
- config:
- - name: Ethernet1/1
- transmit: false
- tlv_set:
- vlan: 5
- state: merged
- register: base_config
-
- - name: Gather interfaces facts
- nxos_facts:
- gather_subset:
- - "!all"
- - "!min"
- gather_network_resources:
- - lldp_interfaces
-
- - name: Apply provided configuration (this will be reverted)
- nxos_lldp_interfaces:
- config:
- - name: Ethernet1/1
- transmit: false
-
- - name: Ethernet1/2
- transmit: true
- tlv_set:
- vlan: 12
- management_address: 10.1.1.2
- state: overridden
- register: result
-
- - name: Assert that changes were applied
- assert:
- that:
- - "result.changed == true"
- - "'interface Ethernet1/1' in result.commands"
- - "'no lldp tlv-set vlan 5' in result.commands"
- - "'interface Ethernet1/2' in result.commands"
- - "'lldp transmit' in result.commands"
- - "'lldp tlv-set vlan 12' in result.commands"
- - "'lldp tlv-set management-address 10.1.1.2' in result.commands"
- - "result.commands | length == 6"
-
- - name: Revert back to base configuration
- nxos_lldp_interfaces:
- config: "{{ ansible_facts['network_resources']['lldp_interfaces'] }}"
- state: overridden
- register: revert
-
- - name: Assert that config was reverted
- assert:
- that: "{{ base_config['after'] | symmetric_difference(revert['after']) |length == 0 }}"
-
- always:
- - name: teardown
- nxos_feature:
- feature: lldp
- state: disabled
diff --git a/test/integration/targets/nxos_lldp_interfaces/vars/main.yml b/test/integration/targets/nxos_lldp_interfaces/vars/main.yml
deleted file mode 100644
index 123ef31cf2..0000000000
--- a/test/integration/targets/nxos_lldp_interfaces/vars/main.yml
+++ /dev/null
@@ -1,14 +0,0 @@
----
-parsed:
- - name: Ethernet1/1
- receive: true
- transmit: false
-
- - name: Ethernet1/2
- receive: false
- tlv_set:
- vlan: 12
-
- - name: Ethernet1/3
- tlv_set:
- management_address: 192.0.2.12
diff --git a/test/integration/targets/nxos_logging/defaults/main.yaml b/test/integration/targets/nxos_logging/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_logging/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_logging/meta/main.yaml b/test/integration/targets/nxos_logging/meta/main.yaml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_logging/meta/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_logging/tasks/cli.yaml b/test/integration/targets/nxos_logging/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_logging/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_logging/tasks/main.yaml b/test/integration/targets/nxos_logging/tasks/main.yaml
deleted file mode 100644
index f6c7fec17e..0000000000
--- a/test/integration/targets/nxos_logging/tasks/main.yaml
+++ /dev/null
@@ -1,13 +0,0 @@
----
-# Use block to ensure that the baude rate gets set
-# back to 9600 even if there are failures or errors.
-- block:
- - { include: cli.yaml, tags: ['cli'] }
- - { include: nxapi.yaml, tags: ['nxapi'] }
- always:
- - name: Set Baud Rate Back to 9600 so our tests don't break
- nxos_config:
- lines:
- - speed 9600
- parents: line console
- connection: network_cli
diff --git a/test/integration/targets/nxos_logging/tasks/nxapi.yaml b/test/integration/targets/nxos_logging/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_logging/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_logging/tests/common/basic.yaml b/test/integration/targets/nxos_logging/tests/common/basic.yaml
deleted file mode 100644
index 4dd11efac7..0000000000
--- a/test/integration/targets/nxos_logging/tests/common/basic.yaml
+++ /dev/null
@@ -1,505 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_logging basic test"
-
-# This task is needed to clear out any previous logfile
-# size settings.
-- name: Workaround to clear logging logfile size
- nxos_config:
- lines:
- - logging logfile test 1 size 4194304
- ignore_errors: yes
-
-- name: Purge logging configuration first
- nxos_logging:
- purge: true
-
-- name: Set up console logging
- nxos_logging: &clog
- dest: console
- dest_level: 0
- state: present
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"logging console 0" in result.commands'
-
-- name: Set up console logging again (idempotent)
- nxos_logging: *clog
- register: result
-
-- assert: &false
- that:
- - 'result.changed == false'
-
-- name: Set up console logging with level 2 (edge case)
- nxos_logging: &clog2
- dest: console
- dest_level: 2
- state: present
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"logging console 2" in result.commands'
-
-- name: Set up console logging with level 2 (edge case) (idempotent)
- nxos_logging: *clog2
- register: result
-
-- assert: *false
-
-- name: Set Baud Rate to less than 38400
- nxos_config:
- lines:
- - speed 19200
- parents: line console
-
-- name: Enable console logging with level 3 (will fail)
- nxos_logging: &con3
- dest: console
- dest_level: 3
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - 'result.failed == true'
-
-- name: Set Baud Rate to 38400
- nxos_config:
- lines:
- - speed 38400
- parents: line console
-
-- name: Enable console logging with level 3 (will pass)
- nxos_logging: *con3
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"logging console 3" in result.commands'
-
-- block:
- - name: Logfile logging with level
- nxos_logging: &llog
- dest: logfile
- name: test
- dest_level: 1
- state: present
- register: result
-
- - assert:
- that:
- - 'result.changed == true'
- - '"logging logfile test 1" in result.commands'
-
-
- - name: Logfile logging with level (idempotent)
- nxos_logging: *llog
- register: result
-
- - assert: *false
-
- when: platform is not search('N5K|N7K') and imagetag is not search("A8")
-
-- name: Configure module with level
- nxos_logging: &molog
- dest: module
- dest_level: 2
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"logging module 2" in result.commands'
-
-- name: Configure module with level (idempotent)
- nxos_logging: *molog
- register: result
-
-- assert: *false
-
-- name: Configure monitor with level
- nxos_logging: &mlog
- dest: monitor
- dest_level: 3
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"logging monitor 3" in result.commands'
-
-- name: Configure monitor with level (idempotent)
- nxos_logging: *mlog
- register: result
-
-- assert: *false
-
-- name: Configure monitor with level 5 (edge case)
- nxos_logging: &mlog5
- dest: monitor
- dest_level: 5
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"logging monitor 5" in result.commands'
-
-- name: Configure monitor with level 5 (edge case) (idempotent)
- nxos_logging: *mlog5
- register: result
-
-- assert: *false
-
-- name: Configure facility with level
- nxos_logging: &flog
- facility: daemon
- facility_level: 4
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"logging level daemon 4" in result.commands'
-
-- name: Configure facility with level (idempotent)
- nxos_logging: *flog
- register: result
-
-- assert: *false
-
-- name: Configure Remote Logging
- nxos_logging: &rlog
- dest: server
- remote_server: test-syslogserver.com
- facility: auth
- facility_level: 1
- use_vrf: management
- state: present
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"logging server test-syslogserver.com 1 facility auth use-vrf management" in result.commands'
-
-- name: Configure Remote Logging (idempotent)
- nxos_logging: *rlog
- register: result
-
-- assert: *false
-
-- name: Configure Source Interface for Logging
- nxos_logging: &srcint
- interface: mgmt0
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"logging source-interface mgmt 0" in result.commands'
-
-- name: Configure Source Interface for Logging (idempotent)
- nxos_logging: *srcint
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- name: remove logging as collection tearDown
- nxos_logging: &agg
- aggregate:
- - { dest: console, dest_level: 3 }
- - { dest: module, dest_level: 2 }
- - { dest: monitor, dest_level: 5 }
- - { dest: logfile, dest_level: 1, name: test }
- - { facility: daemon, facility_level: 4 }
- - { dest: server, remote_server: test-syslogserver.com, facility: auth, facility_level: 1, use_vrf: management }
- - { interface: mgmt0 }
- state: absent
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"no logging logfile" in result.commands'
- - '"no logging level daemon 4" in result.commands'
- - '"no logging monitor" in result.commands'
- - '"no logging module" in result.commands'
- - '"no logging server test-syslogserver.com" in result.commands'
- - '"no logging source-interface" in result.commands'
- when: platform is not search('N5K|N7K') and imagetag is not search("A8")
-
-- assert:
- that:
- - 'result.changed == true'
- - '"no logging level daemon 4" in result.commands'
- - '"no logging monitor" in result.commands'
- - '"no logging module" in result.commands'
- - '"no logging server test-syslogserver.com" in result.commands'
- - '"no logging source-interface" in result.commands'
- when: platform is search('N5K|N7K') or imagetag is search("A8")
-
-- name: remove aggregate logging (idempotent)
- nxos_logging: *agg
- register: result
-
-- assert: *false
-
-- block:
- - name: Configure Logging message
- nxos_logging: &logm
- interface_message: add-interface-description
- state: present
- register: result
-
- - assert: &true
- that:
- - 'result.changed == true'
-
- - name: Configure Logging message (idempotent)
- nxos_logging: *logm
- register: result
-
- - assert: *false
-
- - name: Remove Logging message
- nxos_logging:
- interface_message: add-interface-description
- state: absent
- register: result
-
- - assert: *true
- when: platform is not search('N5K') and imagetag is not search("A8")
-
-
-- name: Logfile logging with level and size
- nxos_logging: &llogs
- dest: logfile
- name: test
- dest_level: 1
- file_size: 16384
- state: present
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"logging logfile test 1 size 16384" in result.commands'
-
-- name: Logfile logging with level and size (idempotent)
- nxos_logging: *llogs
- register: result
-
-- assert: *false
-
-- name: Remove logfile logging with level and size
- nxos_logging:
- dest: logfile
- name: test
- dest_level: 1
- file_size: 16384
- state: absent
- register: result
-
-- assert: *true
-
-- name: Set up logging event link enable
- nxos_logging: &logle
- event: link-enable
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"logging event link-status enable" in result.commands'
-
-- name: Set up logging event link enable again (idempotent)
- nxos_logging: *logle
- register: result
-
-- assert: *false
-
-- name: Remove logging event link enable
- nxos_logging: &rlogle
- event: link-enable
- state: absent
- register: result
-
-- assert: *true
-
-- name: Remove logging event link enable again (idempotent)
- nxos_logging: *rlogle
- register: result
-
-- assert: *false
-
-- name: Set up logging event link default
- nxos_logging: &logld
- event: link-default
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"logging event link-status default" in result.commands'
-
-- name: Set up logging event link default again (idempotent)
- nxos_logging: *logld
- register: result
-
-- assert: *false
-
-- name: Remove logging event link default
- nxos_logging: &rlogld
- event: link-default
- state: absent
- register: result
-
-- assert: *true
-
-- name: Remove logging event link default again (idempotent)
- nxos_logging: *rlogld
- register: result
-
-- assert: *false
-
-- name: Set up logging event trunk enable
- nxos_logging: &logte
- event: trunk-enable
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"logging event trunk-status enable" in result.commands'
-
-- name: Set up logging event trunk enable again (idempotent)
- nxos_logging: *logte
- register: result
-
-- assert: *false
-
-- name: Remove logging event trunk enable
- nxos_logging: &rlogte
- event: trunk-enable
- state: absent
- register: result
-
-- assert: *true
-
-- name: Remove logging event trunk enable again (idempotent)
- nxos_logging: *rlogte
- register: result
-
-- assert: *false
-- name: Set up logging event trunk default
- nxos_logging: &logtd
- event: trunk-default
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"logging event trunk-status default" in result.commands'
-
-- name: Set up logging event trunk default again (idempotent)
- nxos_logging: *logtd
- register: result
-
-- assert: *false
-
-- name: Remove logging event trunk default
- nxos_logging: &rlogtd
- event: trunk-default
- state: absent
- register: result
-
-- assert: *true
-
-- name: Remove logging event trunk default again (idempotent)
- nxos_logging: *rlogtd
- register: result
-
-- assert: *false
-
-- name: Set up Logging Timestamp
- nxos_logging: &ltms
- timestamp: microseconds
- state: present
- register: result
-
-- assert: *true
-
-- name: Set up Logging Timestamp (idempotent)
- nxos_logging: *ltms
- register: result
-
-- assert: *false
-
-- name: Remove Logging Timestamp
- nxos_logging:
- timestamp: microseconds
- state: absent
- register: result
-
-- assert: *true
-
-- name: Set up Facility ethpm Link UP Error
-
- nxos_logging: &felue
- facility: ethpm
- facility_link_status: link-up-error
- state: present
- register: result
-
-- assert: *true
-
-- name: Set up Facility ethpm Link UP Error (idempotent)
- nxos_logging: *felue
- register: result
-
-- assert: *false
-
-- name: Remove Facility ethpm Link UP Error
- nxos_logging:
- facility: ethpm
- facility_link_status: link-up-error
- state: absent
- register: result
-
-- assert: *true
-
-- name: Set up Facility ethpm Link DOWN Error
-
- nxos_logging: &felde
- facility: ethpm
- facility_link_status: link-down-error
- state: present
- register: result
-
-- assert: *true
-
-- name: Set up Facility ethpm Link DOWN Error (idempotent)
- nxos_logging: *felde
- register: result
-
-- assert: *false
-
-- name: Remove Facility ethpm Link DOWN Error
- nxos_logging:
- facility: ethpm
- facility_link_status: link-down-error
- state: absent
- register: result
-
-- assert: *true
-
-- debug: msg="END connection={{ ansible_connection }} nxos_logging basic test"
diff --git a/test/integration/targets/nxos_logging/tests/common/net_logging.yaml b/test/integration/targets/nxos_logging/tests/common/net_logging.yaml
deleted file mode 100644
index f19eb9e7d1..0000000000
--- a/test/integration/targets/nxos_logging/tests/common/net_logging.yaml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos common/net_logging.yaml"
-
-# Add minimal testcase to check args are passed correctly to
-# implementation module and module run is successful.
-
-- name: Delete/disable console logging - setup
- net_logging:
- dest: console
- dest_level: 0
- state: absent
- register: result
-
-- name: Set up console logging using platform agnostic module
- net_logging:
- dest: console
- dest_level: 0
- state: present
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"logging console 0" in result.commands'
-
-- name: Delete/disable console logging - teardown
- net_logging:
- dest: console
- dest_level: 0
- state: absent
- register: result
-
-
-- debug: msg="END connection={{ ansible_connection }} nxos common/net_logging.yaml"
diff --git a/test/integration/targets/nxos_logging/tests/common/purge.yaml b/test/integration/targets/nxos_logging/tests/common/purge.yaml
deleted file mode 100644
index 61a99050ce..0000000000
--- a/test/integration/targets/nxos_logging/tests/common/purge.yaml
+++ /dev/null
@@ -1,105 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_logging purge test"
-
-- name: Purge logging configuration first
- nxos_logging:
- purge: true
-
-- block:
-
- - name: Set up console logging
- nxos_logging: &clog
- dest: console
- dest_level: 0
- state: present
- register: result
-
- - assert:
- that:
- - 'result.changed == true'
- - '"logging console 0" in result.commands'
-
- - name: Set up Logging Timestamp
- nxos_logging: &ltms
- timestamp: microseconds
- state: present
- register: result
-
- - assert:
- that:
- - 'result.changed == true'
- - '"logging timestamp microseconds" in result.commands'
-
- - name: Configure monitor with level
- nxos_logging: &mlog
- dest: monitor
- dest_level: 3
- register: result
-
- - assert:
- that:
- - 'result.changed == true'
- - '"logging monitor 3" in result.commands'
-
- - name: Configure facility with level
- nxos_logging: &flog
- facility: daemon
- facility_level: 4
- register: result
-
- - assert:
- that:
- - 'result.changed == true'
- - '"logging level daemon 4" in result.commands'
-
- - name: Configure logging level virtual-service 7 using nxos_config
- nxos_config:
- lines: logging level virtual-service 7
- register: result
-
- - assert:
- that:
- - "result.changed == true"
-
- - name: Purge the outliers
- nxos_logging:
- purge: yes
- register: result
-
- - assert:
- that:
- - 'result.changed == true'
- - '"no logging level virtual-service 7" in result.commands'
-
- - block:
- - name: Purge the outliers (idempotent)
- nxos_logging:
- purge: yes
- register: result
-
- - assert:
- that:
- - 'result.changed == false'
- when: imagetag is not search("A8")
-
- - name: remove logging as collection tearDown
- nxos_logging: &agg
- aggregate:
- - { dest: console, dest_level: 0 }
- - { dest: monitor, dest_level: 3 }
- - { timestamp: microseconds }
- - { facility: daemon, facility_level: 4 }
- state: absent
- register: result
-
- - assert:
- that:
- - 'result.changed == true'
- - '"no logging console" in result.commands'
- - '"no logging timestamp microseconds" in result.commands'
- - '"no logging level daemon 4" in result.commands'
- - '"no logging monitor" in result.commands'
-
- when: ansible_connection != "local"
-
-- debug: msg="END connection={{ ansible_connection }} nxos_logging purge test"
diff --git a/test/integration/targets/nxos_netconf/defaults/main.yaml b/test/integration/targets/nxos_netconf/defaults/main.yaml
deleted file mode 100644
index 9ef5ba5165..0000000000
--- a/test/integration/targets/nxos_netconf/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "*"
-test_items: []
diff --git a/test/integration/targets/nxos_netconf/meta/main.yaml b/test/integration/targets/nxos_netconf/meta/main.yaml
deleted file mode 100644
index 6a8fed7644..0000000000
--- a/test/integration/targets/nxos_netconf/meta/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
-dependencies:
- # Not needed for this test
- # - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_netconf/tasks/main.yaml b/test/integration/targets/nxos_netconf/tasks/main.yaml
deleted file mode 100644
index 07e872c945..0000000000
--- a/test/integration/targets/nxos_netconf/tasks/main.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
----
-- name: Setup - Enable feature netconf
- nxos_feature:
- feature: netconf
- state: enabled
- vars: &ssh_credentials
- ansible_connection: network_cli
- ansible_ssh_port: 22
- register: result
- ignore_errors: yes
-
-- debug: msg='Netconf feature is not supported on this platform!'
- when: result.failed
-
-- name: Setup - Remove Vlan
- nxos_config:
- lines:
- - no vlan 42
- ignore_errors: yes
- when: not result.failed
-
-- block:
- - name: Run netconf tests
- include: netconf.yaml
- when: not result.failed
-
- always:
- - name: Disable feature netconf
- nxos_feature:
- feature: netconf
- state: disabled
- vars: *ssh_credentials
- when: not result.failed
-
- - name: Cleanup - Remove vlan
- nxos_config:
- lines:
- - no vlan 42
- vars: *ssh_credentials
- ignore_errors: yes
- when: not result.failed
diff --git a/test/integration/targets/nxos_netconf/tasks/netconf.yaml b/test/integration/targets/nxos_netconf/tasks/netconf.yaml
deleted file mode 100644
index d8d042114f..0000000000
--- a/test/integration/targets/nxos_netconf/tasks/netconf.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/netconf"
- 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 case (connection=netconf)
- include: "{{ test_case_to_run }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_netconf/tests/fixtures/config.yaml b/test/integration/targets/nxos_netconf/tests/fixtures/config.yaml
deleted file mode 100644
index de3c340263..0000000000
--- a/test/integration/targets/nxos_netconf/tests/fixtures/config.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
----
-vlan_config: |
- <config>
- <System xmlns="http://cisco.com/ns/yang/cisco-nx-os-device">
- <bd-items>
- <bd-items>
- <BD-list>
- <fabEncap>vlan-42</fabEncap>
- <name>vlan-42</name>
- </BD-list>
- </bd-items>
- </bd-items>
- </System>
- </config>
diff --git a/test/integration/targets/nxos_netconf/tests/netconf/basic.yaml b/test/integration/targets/nxos_netconf/tests/netconf/basic.yaml
deleted file mode 100644
index b9d79ab9af..0000000000
--- a/test/integration/targets/nxos_netconf/tests/netconf/basic.yaml
+++ /dev/null
@@ -1,44 +0,0 @@
----
-- debug: msg="START nxos_netconf cli/basic.yaml"
-
-- include_vars: "{{playbook_dir }}/targets/nxos_netconf/tests/fixtures/config.yaml"
-
-- debug: msg=" {{ playbook_dir }}"
-
-- block:
- - name: Configure vlan
- netconf_config: &config_vlan
- datastore: running
- commit: false
- get_filter: <System xmlns="http://cisco.com/ns/yang/cisco-nx-os-device"><bd-items><bd-items><BD-list></BD-list></bd-items></bd-items></System>
- content: "{{ vlan_config }}"
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: Configure vlan - idempotence check
- netconf_config: *config_vlan
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: Query Running Config
- netconf_get:
- source: running
- filter: <System xmlns="http://cisco.com/ns/yang/cisco-nx-os-device"><bd-items><bd-items><BD-list></BD-list></bd-items></bd-items></System>
- register: result
-
- - assert:
- that:
- - "'vlan-42' in result.stdout"
-
- vars:
- ansible_connection: netconf
- ansible_port: 830
-
- always:
- - debug: msg="END nxos_netconf cli/basic.yaml"
diff --git a/test/integration/targets/nxos_ntp/defaults/main.yaml b/test/integration/targets/nxos_ntp/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_ntp/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_ntp/meta/main.yml b/test/integration/targets/nxos_ntp/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_ntp/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_ntp/tasks/cli.yaml b/test/integration/targets/nxos_ntp/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_ntp/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_ntp/tasks/main.yaml b/test/integration/targets/nxos_ntp/tasks/main.yaml
deleted file mode 100644
index fea9337c14..0000000000
--- a/test/integration/targets/nxos_ntp/tasks/main.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-# Use block to ensure that both cli and nxapi tests
-# will run even if there are failures or errors.
-- block:
- - { include: cli.yaml, tags: ['cli'] }
- always:
- - { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_ntp/tasks/nxapi.yaml b/test/integration/targets/nxos_ntp/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_ntp/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_ntp/tests/common/sanity.yaml b/test/integration/targets/nxos_ntp/tests/common/sanity.yaml
deleted file mode 100644
index 54ee34411a..0000000000
--- a/test/integration/targets/nxos_ntp/tests/common/sanity.yaml
+++ /dev/null
@@ -1,114 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_ntp sanity test"
-
-- name: Setup - Remove ntp if configured
- nxos_ntp: &remove
- server: 1.2.3.4
- key_id: 32
- prefer: disabled
- vrf_name: management
- source_addr: 192.0.2.5
- state: absent
- ignore_errors: yes
-
-- block:
-
- - name: Configure ntp
- nxos_ntp: &config
- server: 1.2.3.4
- key_id: 32
- prefer: enabled
- vrf_name: management
- source_addr: 192.0.2.5
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: Idempotence Check
- nxos_ntp: *config
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: Configure ntp with some defaults
- nxos_ntp: &config1
- peer: 1.2.3.4
- key_id: default
- prefer: enabled
- vrf_name: default
- source_addr: default
- state: present
- register: result
-
- - assert: *true
-
- - name: Idempotence Check
- nxos_ntp: *config1
- register: result
-
- - assert: *false
-
- - name: Remove ntp config
- nxos_ntp: *remove
- register: result
-
- - assert: *true
-
- - name: Remove Idempotence Check
- nxos_ntp: *remove
- register: result
-
- - assert: *false
-
- - name: Configure ntp again
- nxos_ntp: &config2
- source_int: Ethernet1/3
- peer: 1.2.3.4
- prefer: enabled
- state: present
- register: result
-
- - assert: *true
-
- - name: Idempotence Check
- nxos_ntp: *config2
- register: result
-
- - assert: *false
-
- - name: Remove source interface
- nxos_ntp: &config3
- source_int: default
- state: present
- register: result
-
- - assert: *true
-
- - name: Idempotence Check
- nxos_ntp: *config3
- register: result
-
- - assert: *false
-
- - name: Remove ntp
- nxos_ntp: *remove
- register: result
-
- - assert: *true
-
- - name: Remove Idempotence Check
- nxos_ntp: *remove
- register: result
-
- - assert: *false
-
- always:
- - name: Remove ntp config
- nxos_ntp: *remove
-
- - debug: msg="END connection={{ ansible_connection }} nxos_ntp sanity test"
diff --git a/test/integration/targets/nxos_ntp_auth/defaults/main.yaml b/test/integration/targets/nxos_ntp_auth/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_ntp_auth/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_ntp_auth/meta/main.yml b/test/integration/targets/nxos_ntp_auth/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_ntp_auth/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_ntp_auth/tasks/cli.yaml b/test/integration/targets/nxos_ntp_auth/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_ntp_auth/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_ntp_auth/tasks/main.yaml b/test/integration/targets/nxos_ntp_auth/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_ntp_auth/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_ntp_auth/tasks/nxapi.yaml b/test/integration/targets/nxos_ntp_auth/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_ntp_auth/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_ntp_auth/tests/common/sanity.yaml b/test/integration/targets/nxos_ntp_auth/tests/common/sanity.yaml
deleted file mode 100644
index e4db5e979b..0000000000
--- a/test/integration/targets/nxos_ntp_auth/tests/common/sanity.yaml
+++ /dev/null
@@ -1,133 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_ntp_auth sanity test"
-
-- name: Configure text ntp authentication
- nxos_ntp_auth: &setup
- key_id: 32
- md5string: hello
- state: absent
- ignore_errors: yes
-
-- block:
-
- - name: Configure text ntp authentication
- nxos_ntp_auth: &configure_text
- key_id: 32
- md5string: hello
- authentication: off
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: Remove text ntp authentication
- nxos_ntp_auth: &remove_text
- key_id: 32
- md5string: hello
- authentication: off
- state: absent
- register: result
-
- - assert: *true
-
- - name: Configure encrypt ntp authentication
- nxos_ntp_auth: &configure_encrypt
- key_id: 32
- md5string: hello
- auth_type: encrypt
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence - Configure encrypt ntp authentication"
- nxos_ntp_auth: *configure_encrypt
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: Turn on authentication
- nxos_ntp_auth: &authon
- authentication: on
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence - Turn on authentication"
- nxos_ntp_auth: *authon
- register: result
-
- - assert: *false
-
- - name: Turn off authentication
- nxos_ntp_auth: &authoff
- authentication: off
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence - Turn off authentication"
- nxos_ntp_auth: *authoff
- register: result
-
- - assert: *false
-
- - name: Add trusted key
- nxos_ntp_auth: &tkey
- key_id: 32
- trusted_key: true
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence - Add trusted key"
- nxos_ntp_auth: *tkey
- register: result
-
- - assert: *false
-
- - name: Remove trusted key
- nxos_ntp_auth: &rtkey
- key_id: 32
- trusted_key: false
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence - Remove trusted key"
- nxos_ntp_auth: *rtkey
- register: result
-
- - assert: *false
-
- - name: Remove encrypt ntp authentication
- nxos_ntp_auth: &remove_encrypt
- key_id: 32
- md5string: hello
- auth_type: encrypt
- authentication: on
- state: absent
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence - Remove encrypt ntp authentication"
- nxos_ntp_auth: *remove_encrypt
- register: result
-
- - assert: *false
-
- always:
- - name: Cleanup ntp auth config
- nxos_ntp_auth: *setup
- ignore_errors: yes
-
- - debug: msg="END connection={{ ansible_connection }} nxos_ntp_auth sanity test"
diff --git a/test/integration/targets/nxos_ntp_options/defaults/main.yaml b/test/integration/targets/nxos_ntp_options/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_ntp_options/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_ntp_options/meta/main.yml b/test/integration/targets/nxos_ntp_options/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_ntp_options/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_ntp_options/tasks/cli.yaml b/test/integration/targets/nxos_ntp_options/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_ntp_options/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_ntp_options/tasks/main.yaml b/test/integration/targets/nxos_ntp_options/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_ntp_options/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_ntp_options/tasks/nxapi.yaml b/test/integration/targets/nxos_ntp_options/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_ntp_options/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_ntp_options/tests/common/sanity.yaml b/test/integration/targets/nxos_ntp_options/tests/common/sanity.yaml
deleted file mode 100644
index 721765463c..0000000000
--- a/test/integration/targets/nxos_ntp_options/tests/common/sanity.yaml
+++ /dev/null
@@ -1,99 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_ntp_options sanity test"
-
-- name: "Apply default ntp config"
- nxos_ntp_options: &default
- state: absent
- ignore_errors: yes
-
-- block:
-
- - name: Configure ntp with master and default stratum
- nxos_ntp_options: &configure_master_default_stratum
- master: true
- logging: true
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Check Idempotence - Configure ntp with master and default stratum"
- nxos_ntp_options: *configure_master_default_stratum
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: Configure ntp with master and non-default stratum
- nxos_ntp_options: &configure_master_non_default_stratum
- master: true
- stratum: 10
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence - Configure ntp with master and non-default stratum"
- nxos_ntp_options: *configure_master_non_default_stratum
- register: result
-
- - assert: *false
-
- - name: Configure ntp with master and no logging
- nxos_ntp_options: &configure_no_log
- master: true
- stratum: 10
- logging: false
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence - Configure ntp with master and no logging"
- nxos_ntp_options: *configure_no_log
- register: result
-
- - assert: *false
-
- - name: Configure ntp with logging and no master
- nxos_ntp_options: &configure_no_master
- master: false
- logging: true
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence - Configure ntp with logging and no master"
- nxos_ntp_options: *configure_no_master
- register: result
-
- - assert: *false
-
- - name: "Configure ntp with master and non-default stratum again"
- nxos_ntp_options: *configure_master_non_default_stratum
- register: result
-
- - assert: *true
-
- - name: Remove ntp options
- nxos_ntp_options: *default
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence - Remove"
- nxos_ntp_options: *default
- register: result
-
- - assert: *false
-
- always:
- - name: Cleanup ntp config
- nxos_ntp_options: *default
- register: result
-
- - debug: msg="END connection={{ ansible_connection }} nxos_ntp_options sanity test"
diff --git a/test/integration/targets/nxos_nxapi/defaults/main.yaml b/test/integration/targets/nxos_nxapi/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_nxapi/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_nxapi/meta/main.yml b/test/integration/targets/nxos_nxapi/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_nxapi/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_nxapi/tasks/cli.yaml b/test/integration/targets/nxos_nxapi/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_nxapi/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_nxapi/tasks/main.yaml b/test/integration/targets/nxos_nxapi/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_nxapi/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_nxapi/tasks/nxapi.yaml b/test/integration/targets/nxos_nxapi/tasks/nxapi.yaml
deleted file mode 100644
index 04c99602e6..0000000000
--- a/test/integration/targets/nxos_nxapi/tasks/nxapi.yaml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
-
-- name: run test cases (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_http.yaml b/test/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_http.yaml
deleted file mode 100644
index 0d13136aaa..0000000000
--- a/test/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_http.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
----
-- name: Assert HTTP configuration changes
- assert:
- that:
- - result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'].l_port
- - result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'].l_port|string is search("80")
- - result.stdout[0]['operation_status'].o_status == 'nxapi enabled'
- when: result.stdout[0].TABLE_listen_on_port is defined
-
-- name: Assert HTTP configuration changes 9.2 or greater
- assert:
- that:
- - result.stdout[0]['http_port']
- - result.stdout[0]['http_port']|string is search("80")
- - result.stdout[0]['nxapi_status'] == 'nxapi enabled'
- when: result.stdout[0].http_port is defined
diff --git a/test/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_https.yaml b/test/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_https.yaml
deleted file mode 100644
index 629698ac98..0000000000
--- a/test/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_https.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
----
-- name: Assert HTTPS configuration changes
- assert:
- that:
- - result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'].l_port
- - result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'].l_port|string is search("9443")
- - result.stdout[0]['operation_status'].o_status == 'nxapi enabled'
- when: result.stdout[0].TABLE_listen_on_port is defined
-
-- name: Assert HTTPS configuration changes 9.2 or greater
- assert:
- that:
- - result.stdout[0]['https_port']
- - result.stdout[0]['https_port']|string is search("9443")
- - result.stdout[0]['nxapi_status'] == 'nxapi enabled'
- when: result.stdout[0].https_port is defined
diff --git a/test/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_https_http.yaml b/test/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_https_http.yaml
deleted file mode 100644
index 89c30757d2..0000000000
--- a/test/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_https_http.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-- name: Assert HTTPS & HTTP configuration changes
- assert:
- that:
- - result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'][1].l_port
- - result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'][1].l_port|string is search("9443")
- - result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'][0].l_port
- - result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'][0].l_port|string is search("80")
- - result.stdout[0]['operation_status'].o_status == 'nxapi enabled'
- when: result.stdout[0].TABLE_listen_on_port is defined
-
-- name: Assert HTTPS & HTTP configuration changes 9.2 or greater
- assert:
- that:
- - result.stdout[0]['https_port']
- - result.stdout[0]['https_port']|string is search("9443")
- - result.stdout[0]['http_port']
- - result.stdout[0]['http_port']|string is search("80")
- - result.stdout[0]['nxapi_status'] == 'nxapi enabled'
- when: result.stdout[0].https_port is defined or result.stdout[0].http_port is defined
diff --git a/test/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_https_http_ports.yaml b/test/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_https_http_ports.yaml
deleted file mode 100644
index 6838d0d6fa..0000000000
--- a/test/integration/targets/nxos_nxapi/tasks/platform/default/assert_changes_https_http_ports.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-- name: Assert HTTPS & HTTP configuration changes
- assert:
- that:
- - result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'][1].l_port
- - result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'][1].l_port|string is search("500")
- - result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'][0].l_port
- - result.stdout[0]['TABLE_listen_on_port']['ROW_listen_on_port'][0].l_port|string is search("99")
- - result.stdout[0]['operation_status'].o_status == 'nxapi enabled'
- when: result.stdout[0].TABLE_listen_on_port is defined
-
-- name: Assert HTTPS & HTTP configuration changes 9.2 or greater
- assert:
- that:
- - result.stdout[0]['https_port']
- - result.stdout[0]['https_port']|string is search("500")
- - result.stdout[0]['http_port']
- - result.stdout[0]['http_port']|string is search("99")
- - result.stdout[0]['nxapi_status'] == 'nxapi enabled'
- when: result.stdout[0].https_port is defined or result.stdout[0].http_port is defined
diff --git a/test/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_http.yaml b/test/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_http.yaml
deleted file mode 100644
index 2f79127f1e..0000000000
--- a/test/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_http.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
----
-- name: Assert HTTP configuration changes
- assert:
- that:
- - result.stdout[0].https_port is not defined
- - result.stdout[0].http_port|string is search("80")
diff --git a/test/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_https.yaml b/test/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_https.yaml
deleted file mode 100644
index a934a1fa81..0000000000
--- a/test/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_https.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
----
-- name: Assert HTTPS configuration changes
- assert:
- that:
- - result.stdout[0].http_port is not defined
- - result.stdout[0].https_port|string is search("9443")
diff --git a/test/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_https_http.yaml b/test/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_https_http.yaml
deleted file mode 100644
index 4dded98cf2..0000000000
--- a/test/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_https_http.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-- name: Assert HTTPS && HTTP configuration changes
- assert:
- that:
- - result.stdout[0].https_port is defined
- - result.stdout[0].http_port is defined
- - result.stdout[0].https_port|string is search("9443")
- - result.stdout[0].http_port|string is search("80")
diff --git a/test/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_https_http_ports.yaml b/test/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_https_http_ports.yaml
deleted file mode 100644
index 09c69d677b..0000000000
--- a/test/integration/targets/nxos_nxapi/tasks/platform/n5k/assert_changes_https_http_ports.yaml
+++ /dev/null
@@ -1,8 +0,0 @@
----
-- name: Assert HTTPS && HTTP configuration changes
- assert:
- that:
- - result.stdout[0].https_port is defined
- - result.stdout[0].http_port is defined
- - result.stdout[0].https_port|string is search("500")
- - result.stdout[0].http_port|string is search("99")
diff --git a/test/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_http.yaml b/test/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_http.yaml
deleted file mode 100644
index fbfba2fd45..0000000000
--- a/test/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_http.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-- name: Assert HTTP configuration changes
- assert:
- that:
- - result.stdout[0].https_port is not defined
- - result.stdout[0].http_port|string is search("80")
- - result.stdout[0].sandbox_status == 'Enabled'
diff --git a/test/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_https.yaml b/test/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_https.yaml
deleted file mode 100644
index 83d954aac9..0000000000
--- a/test/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_https.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-- name: Assert HTTPS configuration changes
- assert:
- that:
- - result.stdout[0].http_port is not defined
- - result.stdout[0].https_port|string is search("9443")
- - result.stdout[0].sandbox_status == 'Enabled'
diff --git a/test/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_https_http.yaml b/test/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_https_http.yaml
deleted file mode 100644
index 1db6d488dd..0000000000
--- a/test/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_https_http.yaml
+++ /dev/null
@@ -1,9 +0,0 @@
----
-- name: Assert HTTPS & HTTP configuration changes
- assert:
- that:
- - result.stdout[0].https_port is defined
- - result.stdout[0].http_port is defined
- - result.stdout[0].https_port|string is search("9443")
- - result.stdout[0].http_port|string is search("80")
- - result.stdout[0].sandbox_status == 'Enabled'
diff --git a/test/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_https_http_ports.yaml b/test/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_https_http_ports.yaml
deleted file mode 100644
index 48611ef814..0000000000
--- a/test/integration/targets/nxos_nxapi/tasks/platform/n7k/assert_changes_https_http_ports.yaml
+++ /dev/null
@@ -1,9 +0,0 @@
----
-- name: Assert HTTPS & HTTP configuration changes
- assert:
- that:
- - result.stdout[0].https_port is defined
- - result.stdout[0].http_port is defined
- - result.stdout[0].https_port|string is search("500")
- - result.stdout[0].http_port|string is search("99")
- - result.stdout[0].sandbox_status == 'Enabled'
diff --git a/test/integration/targets/nxos_nxapi/tests/cli/configure.yaml b/test/integration/targets/nxos_nxapi/tests/cli/configure.yaml
deleted file mode 100644
index d5bac17d49..0000000000
--- a/test/integration/targets/nxos_nxapi/tests/cli/configure.yaml
+++ /dev/null
@@ -1,141 +0,0 @@
----
-- debug: msg="START cli/configure.yaml"
-
-- set_fact: nxapi_sandbox_option="yes"
- when: platform is search('N7K')
-
-- name: Setup - put NXAPI in stopped state
- nxos_nxapi:
- state: absent
-
-- block:
- - name: Configure NXAPI HTTPS
- nxos_nxapi: &configure_https
- enable_http: no
- enable_sandbox: "{{nxapi_sandbox_option|default(omit)}}"
- enable_https: yes
- https_port: 9443
- register: result
-
- - nxos_command:
- commands:
- - show nxapi | json
- register: result
-
- - include: tasks/platform/n7k/assert_changes_https.yaml
- when: platform is match('N7K')
-
- - include: tasks/platform/n5k/assert_changes_https.yaml
- when: platform is search('N5K|N6K')
-
- - include: tasks/platform/default/assert_changes_https.yaml
- when: platform is not search('N35|N5K|N6K|N7K')
-
- - name: Configure NXAPI HTTPS again
- nxos_nxapi: *configure_https
- register: result
-
- - name: Assert configuration is idempotent
- assert: &assert_false
- that:
- - result.changed == false
-
- - name: Configure NXAPI HTTPS & HTTP
- nxos_nxapi: &configure_https_http
- enable_http: yes
- enable_sandbox: "{{nxapi_sandbox_option|default(omit)}}"
- enable_https: yes
- https_port: 9443
- register: result
-
- - nxos_command:
- commands:
- - show nxapi | json
- register: result
-
- - include: tasks/platform/n7k/assert_changes_https_http.yaml
- when: platform is match('N7K')
-
- - include: tasks/platform/n5k/assert_changes_https_http.yaml
- when: platform is match('N5K')
-
- - include: tasks/platform/default/assert_changes_https_http.yaml
- when: platform is not search('N35|N5K|N6K|N7K')
-
- - name: Configure NXAPI HTTPS & HTTP again
- nxos_nxapi: *configure_https_http
- register: result
-
- - name: Assert configuration is idempotent
- assert: *assert_false
-
- - name: Configure different NXAPI HTTPS & HTTP ports
- nxos_nxapi: &configure_https_http_ports
- enable_http: yes
- enable_sandbox: "{{nxapi_sandbox_option|default(omit)}}"
- enable_https: yes
- http_port: 99
- https_port: 500
- register: result
-
- - nxos_command:
- commands:
- - show nxapi | json
- register: result
-
- - include: tasks/platform/n7k/assert_changes_https_http_ports.yaml
- when: platform is match('N7K')
-
- - include: tasks/platform/n5k/assert_changes_https_http_ports.yaml
- when: platform is match('N5K')
-
- - include: tasks/platform/default/assert_changes_https_http_ports.yaml
- when: platform is not search('N35|N5K|N6K|N7K')
-
- - name: Configure different NXAPI HTTPS & HTTP ports again
- nxos_nxapi: *configure_https_http_ports
- register: result
-
- - name: Assert configuration is idempotent
- assert: *assert_false
-
- - name: Configure NXAPI HTTP
- nxos_nxapi: &configure_http
- enable_http: yes
- enable_sandbox: "{{nxapi_sandbox_option|default(omit)}}"
- enable_https: no
- register: result
-
- - nxos_command:
- commands:
- - show nxapi | json
- register: result
-
- - include: tasks/platform/n7k/assert_changes_http.yaml
- when: platform is match('N7K')
-
- - include: tasks/platform/n5k/assert_changes_http.yaml
- when: platform is match('N5K')
-
- - include: tasks/platform/default/assert_changes_http.yaml
- when: platform is not search('N35|N5K|N6K|N7K')
-
- - name: Configure NXAPI HTTP again
- nxos_nxapi: *configure_http
- register: result
-
- - name: Assert configuration is idempotent
- assert: *assert_false
-
- always:
- - name: Cleanup - Disable NXAPI
- nxos_nxapi:
- state: absent
- register: result
-
- - name: Cleanup - Re-enable NXAPI
- nxos_nxapi:
- state: present
- register: result
-
- - debug: msg="END cli/configure.yaml"
diff --git a/test/integration/targets/nxos_nxapi/tests/cli/disable.yaml b/test/integration/targets/nxos_nxapi/tests/cli/disable.yaml
deleted file mode 100644
index 58ce878bed..0000000000
--- a/test/integration/targets/nxos_nxapi/tests/cli/disable.yaml
+++ /dev/null
@@ -1,31 +0,0 @@
----
-- debug: msg="START cli/disable.yaml"
-
-- name: Disable NXAPI
- nxos_nxapi:
- state: absent
- register: result
-
-- name: Check NXAPI state
- nxos_command:
- commands:
- - show feature | grep nxapi
- register: result
-
-- name: Assert NXAPI is disabled
- assert:
- that:
- result.stdout[0] is search('disabled')
-
-- name: Disable NXAPI again
- nxos_nxapi:
- state:
- absent
- register: result
-
-- name: Assert idempotence
- assert:
- that:
- result.changed == false
-
-- debug: msg="END cli/disable.yaml"
diff --git a/test/integration/targets/nxos_nxapi/tests/cli/enable.yaml b/test/integration/targets/nxos_nxapi/tests/cli/enable.yaml
deleted file mode 100644
index f15bfe9c3f..0000000000
--- a/test/integration/targets/nxos_nxapi/tests/cli/enable.yaml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-- debug: msg="START cli/enable.yaml"
-
-- name: Setup - put NXAPI in stopped state
- nxos_nxapi:
- state: absent
- register: result
-
-- name: Enable NXAPI
- nxos_nxapi:
- state: present
- register: result
-
-- name: Check NXAPI state
- nxos_command:
- commands:
- - show feature | grep nxapi
- register: result
-
-- name: Assert NXAPI is enabled
- assert:
- that: result.stdout[0] is search('enabled')
-
-- name: Enable NXAPI again
- nxos_nxapi:
- register: result
-
-- name: Assert idempotence
- assert:
- that:
- result.changed == false
-
-
-- debug: msg="END cli/enable.yaml"
diff --git a/test/integration/targets/nxos_nxapi/tests/cli/nxapi_ssl.yaml b/test/integration/targets/nxos_nxapi/tests/cli/nxapi_ssl.yaml
deleted file mode 100644
index eeace84f95..0000000000
--- a/test/integration/targets/nxos_nxapi/tests/cli/nxapi_ssl.yaml
+++ /dev/null
@@ -1,246 +0,0 @@
----
-- block:
- - debug: msg="START cli/nxapi_ssl.yaml"
-
- - name: Configure NXAPI HTTPs w/weak ciphers
- nxos_nxapi: &configure_https_weak_ciphers
- enable_https: yes
- enable_sandbox: "{{nxapi_sandbox_option|default(omit)}}"
- ssl_strong_ciphers: no
- register: result
-
- - nxos_command:
- commands:
- - show run all | inc nxapi | inc ciphers
- register: result
-
- - name: Assert weak ciphers configuration
- assert: &weak_ciphers
- that:
- - result.stdout_lines[0][0] == 'nxapi ssl ciphers weak'
-
- - name: Configure NXAPI HTTP w/weak ciphers again
- nxos_nxapi: *configure_https_weak_ciphers
- register: result
-
- - name: Assert configuration is idempotent
- assert: &assert_false
- that:
- - result.changed == false
-
- - name: Configure NXAPI HTTPs w/strong ciphers
- nxos_nxapi: &configure_https_strong_ciphers
- enable_https: yes
- enable_sandbox: "{{nxapi_sandbox_option|default(omit)}}"
- ssl_strong_ciphers: yes
- register: result
-
- - nxos_command:
- commands:
- - show run all | inc nxapi | inc ciphers
- register: result
-
- - name: Assert strong ciphers configuration
- assert: &strong_ciphers
- that:
- - result.stdout_lines[0][0] == 'no nxapi ssl ciphers weak'
-
- - name: Configure NXAPI HTTPs w/strong ciphers again
- nxos_nxapi: *configure_https_strong_ciphers
- register: result
-
- - name: Assert configuration is idempotent
- assert: *assert_false
-
- - name: Configure NXAPI HTTPs w/default TLSv1
- nxos_nxapi: &configure_https_default
- enable_https: yes
- enable_sandbox: "{{nxapi_sandbox_option|default(omit)}}"
- register: result
-
- - nxos_command:
- commands:
- - show run all | inc nxapi | inc protocols
- register: result
-
- - name: Assert NXAPI HTTPs w/default TLSv1 configuration
- assert: &default_configuration
- that:
- - result.stdout_lines[0][0] == 'nxapi ssl protocols TLSv1'
-
- - name: Configure NXAPI HTTPs w/default again
- nxos_nxapi: *configure_https_default
- register: result
-
- - name: Assert configuration is idempotent
- assert: *assert_false
-
- - name: Configure NXAPI HTTPs TLSv1.1 -default TLSv1
- nxos_nxapi: &configure_https_tlsv1_1
- enable_https: yes
- enable_sandbox: "{{nxapi_sandbox_option|default(omit)}}"
- tlsv1_1: yes
- tlsv1_0: no
- register: result
-
- - nxos_command:
- commands:
- - show run all | inc nxapi | inc protocols
- register: result
-
- - name: Assert NXAPI HTTPs w/TLSv1.1 configuration
- assert: &tlsv1_1_configuration
- that:
- - result.stdout_lines[0][0] == 'nxapi ssl protocols TLSv1.1'
-
- - name: Configure NXAPI HTTPs w/TLSv1.1 -default TLSv1 again
- nxos_nxapi: *configure_https_tlsv1_1
- register: result
-
- - name: Assert configuration is idempotent
- assert: *assert_false
-
- - name: Configure NXAPI HTTPs TLSv1.2 -default TLSv1
- nxos_nxapi: &configure_https_tlsv1_2
- enable_https: yes
- enable_sandbox: "{{nxapi_sandbox_option|default(omit)}}"
- tlsv1_2: yes
- tlsv1_0: no
- register: result
-
- - nxos_command:
- commands:
- - show run all | inc nxapi | inc protocols
- register: result
-
- - name: Assert NXAPI HTTPs w/TLSv1.2 configuration
- assert: &tlsv1_2_configuration
- that:
- - result.stdout_lines[0][0] == 'nxapi ssl protocols TLSv1.2'
-
- - name: Configure NXAPI HTTPs w/TLSv1.2 -default TLSv1 again
- nxos_nxapi: *configure_https_tlsv1_2
- register: result
-
- - name: Assert configuration is idempotent
- assert: *assert_false
-
- - name: Configure NXAPI HTTPs w/TLS1.2 +default TLSv1
- nxos_nxapi: &configure_https_tlsv1_2_default
- enable_https: yes
- enable_sandbox: "{{nxapi_sandbox_option|default(omit)}}"
- ssl_strong_ciphers: yes
- tlsv1_2: yes
- register: result
-
- - nxos_command:
- commands:
- - show run all | inc nxapi | inc protocols
- register: result
-
- - name: Assert NXAPI HTTPs w/TLS1.2 +default TLSv1 configuration
- assert: &tlsv1_2_default_configuration
- that:
- - result.stdout_lines[0][0] == 'nxapi ssl protocols TLSv1 TLSv1.2'
-
- - name: Configure NXAPI HTTPs w/TLS1.2 again
- nxos_nxapi: *configure_https_tlsv1_2_default
- register: result
-
- - name: Assert configuration is idempotent
- assert: *assert_false
-
- - name: Configure NXAPI HTTPs w/TLS1.2 TLS1.1 -default TLSv1
- nxos_nxapi: &configure_https_tlsv1_2_tlsv1_1
- enable_https: yes
- enable_sandbox: "{{nxapi_sandbox_option|default(omit)}}"
- ssl_strong_ciphers: yes
- tlsv1_0: no
- tlsv1_1: yes
- tlsv1_2: yes
- register: result
-
- - nxos_command:
- commands:
- - show run all | inc nxapi | inc protocols
- register: result
-
- - name: Assert NXAPI HTTPs w/TLS1.2 TLS1.2 -default TLSv1 configuration
- assert: &tlsv1_2_tlsv1_1_configuration
- that:
- - result.stdout_lines[0][0] == 'nxapi ssl protocols TLSv1.1 TLSv1.2'
-
- - name: Configure NXAPI HTTPs w/TLS1.2 TLS1.1 -default TLSv1 again
- nxos_nxapi: *configure_https_tlsv1_2_tlsv1_1
- register: result
-
- - name: Assert configuration is idempotent
- assert: *assert_false
-
- - name: Configure NXAPI HTTPs w/TLS1.2 TLS1.1 +default TLSv1
- nxos_nxapi: &configure_https_tlsv1_2_tlsv1_1_default
- enable_https: yes
- enable_sandbox: "{{nxapi_sandbox_option|default(omit)}}"
- ssl_strong_ciphers: yes
- tlsv1_1: yes
- tlsv1_2: yes
- register: result
-
- - nxos_command:
- commands:
- - show run all | inc nxapi | inc protocols
- register: result
-
- - name: Assert NXAPI HTTPs w/TLS1.2 TLS1.1 +default TLSv1 configuration
- assert: &tlsv1_2_tlsv1_1_default_configuration
- that:
- - result.stdout_lines[0][0] == 'nxapi ssl protocols TLSv1 TLSv1.1 TLSv1.2'
-
- - name: Configure NXAPI HTTPs w/TLS1.2 TLS1.1 +default TLSv1 again
- nxos_nxapi: *configure_https_tlsv1_2_tlsv1_1_default
- register: result
-
- - name: Assert configuration is idempotent
- assert: *assert_false
-
- - name: Configure NXAPI HTTPs with explicit TLS1.2 TLS1.1 TLSv1
- nxos_nxapi: &configure_https_tlsv1_2_tlsv1_1_tlsv1_0
- enable_https: yes
- enable_sandbox: "{{nxapi_sandbox_option|default(omit)}}"
- ssl_strong_ciphers: yes
- tlsv1_0: yes
- tlsv1_1: yes
- tlsv1_2: yes
- register: result
-
- - nxos_command:
- commands:
- - show run all | inc nxapi | inc protocols
- register: result
-
- - name: Assert NXAPI HTTPs w/TLS1.2 TLS1.2 TLSv1 configuration
- assert: &tlsv1_2_tlsv1_1_tlsv1_0_configuration
- that:
- - result.stdout_lines[0][0] == 'nxapi ssl protocols TLSv1 TLSv1.1 TLSv1.2'
-
- - name: Configure NXAPI HTTPs w/TLS1.2 TLS1.1 TLSv1 again
- nxos_nxapi: *configure_https_tlsv1_2_tlsv1_1_tlsv1_0
- register: result
-
- - name: Assert configuration is idempotent
- assert: *assert_false
-
- always:
- - name: Cleanup - Disable NXAPI
- nxos_nxapi:
- state: absent
- register: result
-
- - name: Cleanup - Re-enable NXAPI
- nxos_nxapi:
- state: present
- register: result
-
- - debug: msg="END cli/nxapi_ssl.yaml"
-
- when: (platform is match("N9K") or platform is match("N3K") or platform is match("N9K-F") or platform is match("N35") or platform is match("N3L")) and major_version is version('9.2', '>=')
diff --git a/test/integration/targets/nxos_nxapi/tests/nxapi/badtransport.yaml b/test/integration/targets/nxos_nxapi/tests/nxapi/badtransport.yaml
deleted file mode 100644
index ebd5bf462c..0000000000
--- a/test/integration/targets/nxos_nxapi/tests/nxapi/badtransport.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-- debug: msg="START nxapi/badtransport.yaml"
-
-- name: Sending transport other than cli should fail
- nxos_nxapi:
- enable_http: no
- enable_sandbox: no
- https_port: 9443
- provider: "{{ nxapi }}"
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - result.failed and result.msg is search('Transport')
-
-- debug: msg="END nxapi/badtransport.yaml"
diff --git a/test/integration/targets/nxos_nxapi_transports/defaults/main.yaml b/test/integration/targets/nxos_nxapi_transports/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_nxapi_transports/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_nxapi_transports/meta/main.yml b/test/integration/targets/nxos_nxapi_transports/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_nxapi_transports/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_nxapi_transports/tasks/main.yaml b/test/integration/targets/nxos_nxapi_transports/tasks/main.yaml
deleted file mode 100644
index 7b3640c35e..0000000000
--- a/test/integration/targets/nxos_nxapi_transports/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_nxapi_transports/tasks/nxapi.yaml b/test/integration/targets/nxos_nxapi_transports/tasks/nxapi.yaml
deleted file mode 100644
index 1d4dc15723..0000000000
--- a/test/integration/targets/nxos_nxapi_transports/tasks/nxapi.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-
-- block:
-
- - set_fact:
- tls:
- - [ yes, no, no ]
- - [ no, yes, no ]
- - [ no, no, yes ]
- - set_fact:
- ciphers:
- - yes
- - no
-
- - name: NXAPI various transport tests with different TLS and ciphers
- vars:
- tlsv1_2: "{{ item[0][0] }}"
- tlsv1_1: "{{ item[0][1] }}"
- tlsv1_0: "{{ item[0][2] }}"
- ssl_strong_ciphers: "{{ item[1] }}"
- include: targets/nxos_nxapi_transports/tests/nxapi/assert_test.yaml
- loop: "{{ tls | product(ciphers) | list }}"
-
- when: (platform is match("N9K") or platform is match("N3K") or platform is match("N9K-F") or platform is match("N35") or platform is match("N3L")) and major_version is version('9.2', '>=')
diff --git a/test/integration/targets/nxos_nxapi_transports/tests/nxapi/assert_test.yaml b/test/integration/targets/nxos_nxapi_transports/tests/nxapi/assert_test.yaml
deleted file mode 100644
index d1a09cb92d..0000000000
--- a/test/integration/targets/nxos_nxapi_transports/tests/nxapi/assert_test.yaml
+++ /dev/null
@@ -1,38 +0,0 @@
-- block:
-
- - debug: msg="START nxapi/setup_test.yaml"
-
- - name: "Configure NXAPI tlsv1_2={{ tlsv1_2 }}, tlsv1_1={{ tlsv1_1 }}, tlsv1_0={{ tlsv1_0 }}, ssl_strong_ciphers={{ ssl_strong_ciphers }}"
- nxos_nxapi:
- enable_http: no
- enable_https: yes
- https_port: 443
- tlsv1_2: "{{ tlsv1_2 }}"
- tlsv1_1: "{{ tlsv1_1 }}"
- tlsv1_0: "{{ tlsv1_0 }}"
- ssl_strong_ciphers: "{{ ssl_strong_ciphers }}"
- connection: network_cli
- register: result
-
- - name: Assert NXAPI setup test was successful
- assert: &assert_false
- that:
- - "result.failed == false"
-
- - name: Assert transports
- include: targets/nxos_nxapi_transports/tests/nxapi/assert_transports.yaml
-
- - debug: msg="END nxapi/setup_test.yaml"
-
- always:
- - name: Cleanup - Disable NXAPI
- nxos_nxapi:
- state: absent
- connection: network_cli
- register: result
-
- - name: Cleanup - Re-enable NXAPI
- nxos_nxapi:
- state: present
- connection: network_cli
- register: result
diff --git a/test/integration/targets/nxos_nxapi_transports/tests/nxapi/assert_transports.yaml b/test/integration/targets/nxos_nxapi_transports/tests/nxapi/assert_transports.yaml
deleted file mode 100644
index 35c7ed2af4..0000000000
--- a/test/integration/targets/nxos_nxapi_transports/tests/nxapi/assert_transports.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-
-- nxos_command:
- commands:
- - show hostname
- connection: httpapi
- vars:
- ansible_httpapi_use_ssl: yes
- ansible_httpapi_validate_certs: no
- ansible_httpapi_port: 443
- register: result
-
-- name: Assert command over connection httpapi was successful
- assert:
- that:
- - "result.failed == false"
-
-- nxos_command:
- commands:
- - show hostname
- provider: "{{ nxapi_ssl }}"
- register: result
-
-- name: Assert command over nxapi_ssl provider was successful
- assert:
- that:
- - "result.failed == false"
diff --git a/test/integration/targets/nxos_ospf/defaults/main.yaml b/test/integration/targets/nxos_ospf/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_ospf/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_ospf/meta/main.yml b/test/integration/targets/nxos_ospf/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_ospf/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_ospf/tasks/cli.yaml b/test/integration/targets/nxos_ospf/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_ospf/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_ospf/tasks/main.yaml b/test/integration/targets/nxos_ospf/tasks/main.yaml
deleted file mode 100644
index fea9337c14..0000000000
--- a/test/integration/targets/nxos_ospf/tasks/main.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-# Use block to ensure that both cli and nxapi tests
-# will run even if there are failures or errors.
-- block:
- - { include: cli.yaml, tags: ['cli'] }
- always:
- - { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_ospf/tasks/nxapi.yaml b/test/integration/targets/nxos_ospf/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_ospf/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_ospf/tests/common/sanity.yaml b/test/integration/targets/nxos_ospf/tests/common/sanity.yaml
deleted file mode 100644
index c6bcdfbc60..0000000000
--- a/test/integration/targets/nxos_ospf/tests/common/sanity.yaml
+++ /dev/null
@@ -1,51 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_ospf sanity test"
-
-- name: "Enable feature OSPF"
- nxos_feature:
- feature: ospf
- state: enabled
- ignore_errors: yes
-
-- block:
- - name: Configure ospf
- nxos_ospf: &config
- ospf: 1
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Check Idempotence"
- nxos_ospf: *config
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- rescue:
- - name: "Disable feature OSPF"
- nxos_feature:
- feature: ospf
- state: disabled
- ignore_errors: yes
-
- always:
- - name: Unconfigure ospf
- nxos_ospf: &unconfig
- ospf: 1
- state: absent
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_ospf: *unconfig
- register: result
-
- - assert: *false
-
- - debug: msg="END connection={{ ansible_connection }} nxos_ospf sanity test"
diff --git a/test/integration/targets/nxos_ospf_vrf/defaults/main.yaml b/test/integration/targets/nxos_ospf_vrf/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_ospf_vrf/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_ospf_vrf/meta/main.yml b/test/integration/targets/nxos_ospf_vrf/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_ospf_vrf/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_ospf_vrf/tasks/cli.yaml b/test/integration/targets/nxos_ospf_vrf/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_ospf_vrf/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_ospf_vrf/tasks/main.yaml b/test/integration/targets/nxos_ospf_vrf/tasks/main.yaml
deleted file mode 100644
index fea9337c14..0000000000
--- a/test/integration/targets/nxos_ospf_vrf/tasks/main.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-# Use block to ensure that both cli and nxapi tests
-# will run even if there are failures or errors.
-- block:
- - { include: cli.yaml, tags: ['cli'] }
- always:
- - { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_ospf_vrf/tasks/nxapi.yaml b/test/integration/targets/nxos_ospf_vrf/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_ospf_vrf/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_ospf_vrf/tests/common/sanity.yaml b/test/integration/targets/nxos_ospf_vrf/tests/common/sanity.yaml
deleted file mode 100644
index 00f8b7a02a..0000000000
--- a/test/integration/targets/nxos_ospf_vrf/tests/common/sanity.yaml
+++ /dev/null
@@ -1,133 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_ospf_vrf sanity test"
-
-- set_fact: def_met_default="default"
- # CSCvi74876 Cannot remove default-metric
- when: imagetag is not search("I7")
-
-- name: "Setup: disable features for initial cleanup"
- nxos_feature:
- feature: "{{ item }}"
- state: disabled
- loop: ['ospf', 'bfd']
- ignore_errors: yes
-
-- name: "Enable features"
- nxos_feature:
- feature: "{{ item }}"
- state: enabled
- loop: ['ospf', 'bfd']
-
-- block:
- - name: Configure ospf vrf
- nxos_ospf_vrf: &config
- ospf: 1
- router_id: 192.0.2.1
- timer_throttle_spf_start: 50
- timer_throttle_spf_hold: 1000
- timer_throttle_spf_max: 2000
- timer_throttle_lsa_start: 60
- timer_throttle_lsa_hold: 1100
- timer_throttle_lsa_max: 3000
- vrf: test
- bfd: enable
- passive_interface: true
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Check Idempotence"
- nxos_ospf_vrf: *config
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: Configure ospf vrf
- nxos_ospf_vrf: &config1
- ospf: 2
- auto_cost: 5000
- timer_throttle_spf_hold: 1100
- timer_throttle_lsa_hold: 2220
- timer_throttle_lsa_max: 2222
- default_metric: 1000
- log_adjacency: log
- vrf: default
- bfd: disable
- passive_interface: true
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_ospf_vrf: *config1
- register: result
-
- - assert: *false
-
- - name: Configure ospf vrf
- nxos_ospf_vrf: &config2
- ospf: 2
- auto_cost: default
- default_metric: "{{def_met_default|default(omit)}}"
- log_adjacency: default
- timer_throttle_spf_hold: default
- passive_interface: false
- vrf: default
- state: present
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_ospf_vrf: *config2
- register: result
-
- - assert: *false
-
- - name: Unconfigure ospf vrf
- nxos_ospf_vrf: &unconfig1
- ospf: 2
- vrf: default
- state: absent
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_ospf_vrf: *unconfig1
- register: result
-
- - assert: *false
- when: def_met_default is defined
-
- - name: Unconfigure ospf vrf
- nxos_ospf_vrf: &unconfig
- ospf: 1
- vrf: test
- state: absent
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_ospf_vrf: *unconfig
- register: result
-
- - assert: *false
- when: def_met_default is defined
-
- always:
- - name: "Disable features"
- nxos_feature:
- feature: "{{ item }}"
- state: disabled
- loop: ['ospf', 'bfd']
- ignore_errors: yes
-
-- debug: msg="END connection={{ ansible_connection }} nxos_ospf_vrf sanity test"
diff --git a/test/integration/targets/nxos_overlay_global/defaults/main.yaml b/test/integration/targets/nxos_overlay_global/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_overlay_global/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_overlay_global/meta/main.yml b/test/integration/targets/nxos_overlay_global/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_overlay_global/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_overlay_global/tasks/cli.yaml b/test/integration/targets/nxos_overlay_global/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_overlay_global/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_overlay_global/tasks/main.yaml b/test/integration/targets/nxos_overlay_global/tasks/main.yaml
deleted file mode 100644
index fea9337c14..0000000000
--- a/test/integration/targets/nxos_overlay_global/tasks/main.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-# Use block to ensure that both cli and nxapi tests
-# will run even if there are failures or errors.
-- block:
- - { include: cli.yaml, tags: ['cli'] }
- always:
- - { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_overlay_global/tasks/nxapi.yaml b/test/integration/targets/nxos_overlay_global/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_overlay_global/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_overlay_global/tasks/platform/n7k/cleanup.yaml b/test/integration/targets/nxos_overlay_global/tasks/platform/n7k/cleanup.yaml
deleted file mode 100644
index 5f0fe44949..0000000000
--- a/test/integration/targets/nxos_overlay_global/tasks/platform/n7k/cleanup.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-- name: "Unconfigure VDC setting limit-resource module-type f3"
- nxos_config:
- commands:
- - 'terminal dont-ask ; vdc {{ vdcid }} ; no limit-resource module-type f3'
- match: none
- ignore_errors: yes
-
-- name: Previous command is asynchronous and can take a while. Allow time for it to complete
- pause:
- seconds: 45
-
-- name: "Configure VDC setting allocate interface unallocated-interfaces"
- nxos_config: &allocate
- commands:
- - 'terminal dont-ask ; vdc {{ vdcid }} ; allocate interface unallocated-interfaces'
- match: none
- ignore_errors: yes
-
-- name: Previous command is asynchronous can take a while. Allow time for it to complete
- pause:
- seconds: 45
diff --git a/test/integration/targets/nxos_overlay_global/tasks/platform/n7k/setup.yaml b/test/integration/targets/nxos_overlay_global/tasks/platform/n7k/setup.yaml
deleted file mode 100644
index 886ab7b396..0000000000
--- a/test/integration/targets/nxos_overlay_global/tasks/platform/n7k/setup.yaml
+++ /dev/null
@@ -1,36 +0,0 @@
----
-- name: "Get default vdc id"
- nxos_command:
- commands: ['show vdc current-vdc | json']
- register: vdcout
-
-- set_fact: vdcid="{{ vdcout.stdout_lines[0].name }}"
-
-- name: "Configure VDC setting limit-resource module-type f3"
- nxos_config:
- commands:
- - "terminal dont-ask ; vdc {{ vdcid }} ; limit-resource module-type f3"
- match: none
- ignore_errors: yes
-
-- name: Previous command is asynchronous and can take a while. Allow time for it to complete
- pause:
- seconds: 45
-
-- name: "Configure VDC setting allocate interface unallocated-interfaces"
- nxos_config: &allocate
- commands:
- - "terminal dont-ask ; vdc {{ vdcid }} ; allocate interface unallocated-interfaces"
- match: none
- ignore_errors: yes
-
-- name: Previous command is asynchronous and can take a while. Allow time for it to complete
- pause:
- seconds: 45
-
-- name: "Configure Additional N7K requiste features"
- nxos_config:
- commands:
- - feature-set fabric
- - feature fabric forwarding
- match: none
diff --git a/test/integration/targets/nxos_overlay_global/tests/common/sanity.yaml b/test/integration/targets/nxos_overlay_global/tests/common/sanity.yaml
deleted file mode 100644
index fe41bde90e..0000000000
--- a/test/integration/targets/nxos_overlay_global/tests/common/sanity.yaml
+++ /dev/null
@@ -1,97 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_overlay_global sanity test"
-
-- set_fact: overlay_global_supported="false"
-- set_fact: overlay_global_supported="true"
- when: platform is search("N35NG|N7K|^N9K$") or
- ( platform is match("N9k-F") and imagetag is version('F3', 'ne'))
-
-- debug: msg="Platform {{ platform }} running Image version {{ image_version }} supports nxos_overlay_global"
- when: overlay_global_supported
-
-# Setup Block
-- block:
- - name: "Enable nv overlay evpn"
- nxos_evpn_global: &enable_evpn
- nv_overlay_evpn: true
-
- - name: "Apply N7K specific setup config"
- include: tasks/platform/n7k/setup.yaml
- when: platform is match('N7K')
-
- - name: "Configure Additional N7K requiste features"
- nxos_config:
- commands:
- - feature-set fabric
- - feature fabric forwarding
- match: none
- when: platform is match('N7K')
-
- - name: "Remove possibly existing mac"
- nxos_overlay_global:
- anycast_gateway_mac: "default"
- ignore_errors: yes
-
- when: overlay_global_supported
-
-# Test execution block
-- block:
-
- - name: Configure overlay global
- nxos_overlay_global: &configure
- anycast_gateway_mac: "b.b.b"
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Check Idempotence"
- nxos_overlay_global: *configure
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: Update anycast gateway mac
- nxos_overlay_global: &update
- anycast_gateway_mac: "a.a.a"
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_overlay_global: *update
- register: result
-
- - assert: *false
-
-
- - name: Remove anycast gateway mac
- nxos_overlay_global: &remove
- anycast_gateway_mac: "default"
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_overlay_global: *remove
- register: result
-
- - assert: *false
-
- when: overlay_global_supported
-
- always:
- - name: "Apply N7K specific cleanup config"
- include: tasks/platform/n7k/cleanup.yaml
- when: platform is match('N7K')
-
- - name: "Disable nv overlay evpn"
- nxos_evpn_global: &disable_evpn
- nv_overlay_evpn: false
- ignore_errors: yes
- when: overlay_global_supported
-
- - debug: msg="END connection={{ ansible_connection }} nxos_overlay_global sanity test"
diff --git a/test/integration/targets/nxos_pim/defaults/main.yaml b/test/integration/targets/nxos_pim/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_pim/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_pim/meta/main.yml b/test/integration/targets/nxos_pim/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_pim/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_pim/tasks/cli.yaml b/test/integration/targets/nxos_pim/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_pim/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_pim/tasks/main.yaml b/test/integration/targets/nxos_pim/tasks/main.yaml
deleted file mode 100644
index fea9337c14..0000000000
--- a/test/integration/targets/nxos_pim/tasks/main.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-# Use block to ensure that both cli and nxapi tests
-# will run even if there are failures or errors.
-- block:
- - { include: cli.yaml, tags: ['cli'] }
- always:
- - { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_pim/tasks/nxapi.yaml b/test/integration/targets/nxos_pim/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_pim/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_pim/tests/common/sanity.yaml b/test/integration/targets/nxos_pim/tests/common/sanity.yaml
deleted file mode 100644
index 7cf12b5eca..0000000000
--- a/test/integration/targets/nxos_pim/tests/common/sanity.yaml
+++ /dev/null
@@ -1,83 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_pim sanity test"
-
-- name: "Setup: Disable features"
- nxos_feature: &disable_feature
- feature: "{{ item }}"
- state: disabled
- ignore_errors: yes
- loop:
- - pim
- - bfd
-
-- name: "Setup: Enable features"
- nxos_feature:
- feature: "{{ item }}"
- state: enabled
- loop:
- - pim
- - bfd
-
-- name: "Setup: Configure ssm_range none"
- nxos_pim: &none
- ssm_range: "none"
-
-- block:
- - name: Initial config from none
- nxos_pim: &configure
- bfd: enable
- ssm_range:
- - "239.128.1.0/24"
- - "224.0.0.0/8"
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: Initial config idempotence
- nxos_pim: *configure
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: Configure ssm_range default
- nxos_pim: &conf_default
- bfd: disable
- ssm_range: "default"
- register: result
-
- - assert: *true
-
- - name: ssm_range default idempotence
- nxos_pim: *conf_default
- register: result
-
- - assert: *false
-
- - name: Configure ssm_range none
- nxos_pim: *none
- register: result
-
- - assert: *true
-
- - meta: end_play
- - name: ssm_range none idempotence
- nxos_pim: *none
- register: result
-
- - assert: *false
-
- always:
- - name: "Teardown: Disable features"
- nxos_feature:
- feature: "{{ item }}"
- state: disabled
- ignore_errors: yes
- loop:
- - pim
- - bfd
-
-- debug: msg="END connection={{ ansible_connection }} nxos_pim sanity test"
diff --git a/test/integration/targets/nxos_pim_interface/defaults/main.yaml b/test/integration/targets/nxos_pim_interface/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_pim_interface/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_pim_interface/meta/main.yml b/test/integration/targets/nxos_pim_interface/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_pim_interface/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_pim_interface/tasks/cli.yaml b/test/integration/targets/nxos_pim_interface/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_pim_interface/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_pim_interface/tasks/main.yaml b/test/integration/targets/nxos_pim_interface/tasks/main.yaml
deleted file mode 100644
index fea9337c14..0000000000
--- a/test/integration/targets/nxos_pim_interface/tasks/main.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-# Use block to ensure that both cli and nxapi tests
-# will run even if there are failures or errors.
-- block:
- - { include: cli.yaml, tags: ['cli'] }
- always:
- - { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_pim_interface/tasks/nxapi.yaml b/test/integration/targets/nxos_pim_interface/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_pim_interface/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_pim_interface/tests/common/sanity.yaml b/test/integration/targets/nxos_pim_interface/tests/common/sanity.yaml
deleted file mode 100644
index 90d8a6d2fb..0000000000
--- a/test/integration/targets/nxos_pim_interface/tests/common/sanity.yaml
+++ /dev/null
@@ -1,188 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_pim_interface sanity test"
-
-- name: "Setup: Disable features"
- nxos_feature: &disable_feature
- feature: "{{ item }}"
- state: disabled
- loop: ['pim', 'bfd']
- ignore_errors: yes
-
-- name: "Setup: Enable features"
- nxos_feature:
- feature: "{{ item }}"
- state: enabled
- loop: ['pim', 'bfd']
-
-- set_fact: testint="{{ nxos_int1 }}"
-
-- name: "Setup: Put interface {{ testint }} into a default state"
- nxos_config:
- lines:
- - "default interface {{ testint }}"
- ignore_errors: yes
-
-- name: "Ensure {{testint}} is layer3"
- nxos_interface:
- interface: "{{ testint }}"
- mode: layer3
- description: 'Configured by Ansible - Layer3'
- admin_state: 'up'
- state: present
-
-- block:
- - name: Configure nxos_pim_interface state absent
- nxos_pim_interface: &pimabsent
- interface: "{{ testint }}"
- state: absent
-
- - name: configure jp policy and type
- nxos_pim_interface: &configjp
- interface: "{{ testint }}"
- jp_policy_in: JPIN
- jp_policy_out: JPOUT
- jp_type_in: routemap
- jp_type_out: routemap
- sparse: True
- border: True
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: Check idempotence
- nxos_pim_interface: *configjp
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: configure neighbor policy and rm
- nxos_pim_interface: &confignpr
- interface: "{{ testint }}"
- neighbor_policy: NPR
- neighbor_type: routemap
- register: result
-
- - assert: *true
-
- - name: Check idempotence
- nxos_pim_interface: *confignpr
- register: result
-
- - assert: *false
-
- - pause:
- seconds: 5
-
- - name: configure neighbor policy and prefix
- nxos_pim_interface: &confignpp
- interface: "{{ testint }}"
- neighbor_policy: NPPF
- neighbor_type: prefix
- register: result
-
- - assert: *true
-
- - name: Check idempotence
- nxos_pim_interface: *confignpp
- register: result
-
- - assert: *false
-
- - name: configure hello_auth_key
- nxos_pim_interface: &confighak1
- interface: "{{ testint }}"
- hello_auth_key: password1
- register: result
-
- - assert: *true
-
- - name: configure pim other params
- nxos_pim_interface: &configo
- interface: "{{ testint }}"
- dr_prio: 10
- hello_interval: 40
- sparse: True
- border: True
- bfd: enable
- state: present
- register: result
-
- - assert: *true
-
- - name: Check idempotence
- nxos_pim_interface: *configo
- register: result
-
- - assert: *false
-
- - name: configure negative
- nxos_pim_interface: &configno
- interface: "{{ testint }}"
- sparse: False
- border: False
- bfd: disable
- state: present
- register: result
-
- - assert: *true
-
- - name: Check idempotence
- nxos_pim_interface: *configno
- register: result
-
- - assert: *false
-
- - pause:
- seconds: 5
-
- - name: configure state default
- nxos_pim_interface: &configdefault
- interface: "{{ testint }}"
- state: default
- register: result
-
- - assert: *true
-
- - name: Check idempotence
- nxos_pim_interface: *configdefault
- register: result
-
- - assert: *false
-
- - name: configure border
- nxos_pim_interface: &configb
- interface: "{{ testint }}"
- border: True
- state: present
- register: result
-
- - assert: *true
-
- - name: Check idempotence
- nxos_pim_interface: *configb
- register: result
-
- - assert: *false
-
- - name: configure state absent
- nxos_pim_interface: *pimabsent
- register: result
-
- - assert: *true
-
- - name: Check idempotence
- nxos_pim_interface: *pimabsent
- register: result
-
- - assert: *false
-
- always:
- - name: "Disable feature PIM"
- nxos_feature: *disable_feature
- loop: ['pim', 'bfd']
-
-- debug: msg="END connection={{ ansible_connection }} nxos_pim_interface sanity test"
diff --git a/test/integration/targets/nxos_pim_rp_address/defaults/main.yaml b/test/integration/targets/nxos_pim_rp_address/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_pim_rp_address/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_pim_rp_address/meta/main.yml b/test/integration/targets/nxos_pim_rp_address/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_pim_rp_address/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_pim_rp_address/tasks/cli.yaml b/test/integration/targets/nxos_pim_rp_address/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_pim_rp_address/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_pim_rp_address/tasks/main.yaml b/test/integration/targets/nxos_pim_rp_address/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_pim_rp_address/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_pim_rp_address/tasks/nxapi.yaml b/test/integration/targets/nxos_pim_rp_address/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_pim_rp_address/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_pim_rp_address/tests/common/configure.yaml b/test/integration/targets/nxos_pim_rp_address/tests/common/configure.yaml
deleted file mode 100644
index d5f5898dc6..0000000000
--- a/test/integration/targets/nxos_pim_rp_address/tests/common/configure.yaml
+++ /dev/null
@@ -1,215 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_pim_rp_address sanity"
-
-- block:
- # platforms do not support bidir
- - set_fact: bidir_true="true"
- - set_fact: bidir_false="false"
- when: platform is not search('N3L')
-
-- block:
- # platforms can only remove rpa, cannot remove rpa+prefixlist or rpa+routemap
- - set_fact: pim_prefix_list="pim_prefix_list"
- - set_fact: pim_route_map="pim_route_map"
- when: platform is not search('N3L|N7K')
-
-- block:
- - name: "Disable feature PIM"
- nxos_feature: &disable_feature
- feature: pim
- state: disabled
-
- - name: "Enable feature PIM"
- nxos_feature: &enable_feature
- feature: pim
- state: enabled
-
- - name: 1.0 Configure rp_address + group_list
- # This test should always run regardless of bidir support
- nxos_pim_rp_address: &configgl
- rp_address: "10.1.1.1"
- group_list: "224.0.0.0/8"
- bidir: "{{ bidir_true|default(omit) }}"
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: 1.0 Idempotence rp_address + group_list
- nxos_pim_rp_address: *configgl
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - block: # bidir test
- - name: 1.1 Configure rp_address + group_list (bidir_false)
- nxos_pim_rp_address: &config11
- rp_address: "10.1.1.1"
- group_list: "224.0.0.0/8"
- bidir: false
- state: present
- register: result
-
- - assert: *true
-
- - name: 1.1 Idempotence rp_address + group_list (bidir_false)
- nxos_pim_rp_address: *config11
- register: result
-
- - assert: *false
-
- - name: 1.2 Configure rp_address (bidir_true)
- nxos_pim_rp_address: &config12
- rp_address: "10.1.1.1"
- bidir: true
- state: present
- register: result
-
- - assert: *true
-
- - name: 1.2 Idempotence rp_address (bidir_true)
- nxos_pim_rp_address: *config12
- register: result
-
- - assert: *false
-
- - name: 1.3 Configure rp_address (bidir_false)
- nxos_pim_rp_address: &config13
- rp_address: "10.1.1.1"
- bidir: false
- state: present
- register: result
-
- - assert: *true
-
- - name: 1.3 Idempotence rp_address (bidir_false)
- nxos_pim_rp_address: *config13
- register: result
-
- - assert: *false
- when: bidir_true is defined
-
- - name: 1.4 Remove rp_address + group_list
- nxos_pim_rp_address: &config14
- rp_address: "10.1.1.1"
- group_list: "224.0.0.0/8"
- state: absent
- register: result
-
- - assert: *true
-
- - name: 1.4 Idempotence remove rp_address + group_list
- nxos_pim_rp_address: *config14
- register: result
-
- - assert: *false
-
- - name: 2.0 Configure rp_address + prefix_list (bidir_true)
- nxos_pim_rp_address: &config20
- rp_address: "10.1.1.2"
- prefix_list: "{{ pim_prefix_list|default(omit) }}"
- bidir: "{{ bidir_true|default(omit) }}"
- state: present
- register: result
-
- - assert: *true
-
- - name: 2.0 Idempotence rp_address + prefix_list (bidir_true)
- nxos_pim_rp_address: *config20
- register: result
-
- - assert: *false
-
- - block: # bidir test
- - name: 2.1 Configure rp_address + prefix_list (bidir_false)
- nxos_pim_rp_address: &config21
- rp_address: "10.1.1.2"
- prefix_list: "{{ pim_prefix_list|default(omit) }}"
- bidir: "{{ bidir_false|default(omit) }}"
- state: present
- register: result
-
- - assert: *true
-
- - name: 2.1 Idempotence rp_address + prefix_list (bidir_false)
- nxos_pim_rp_address: *config21
- register: result
-
- - assert: *false
- when: bidir_false is defined
-
- - name: 2.2 Remove rp_address + prefix_list (bidir_false)
- nxos_pim_rp_address: &config22
- rp_address: "10.1.1.2"
- prefix_list: "{{ pim_prefix_list|default(omit)}}"
- bidir: "{{ bidir_false|default(omit)}}"
- state: absent
- register: result
-
- - assert: *true
-
- - name: 2.2 Idempotence remove rp_address + prefix_list (bidir_false)
- nxos_pim_rp_address: *config22
- register: result
-
- - assert: *false
-
- - name: 3.0 Configure rp_address + route_map + (bidir_true)
- nxos_pim_rp_address: &config30
- rp_address: "10.1.1.3"
- route_map: "{{ pim_route_map|default(omit)}}"
- bidir: "{{ bidir_true|default(omit) }}"
- state: present
- register: result
-
- - assert: *true
-
- - name: 3.0 Idempotence rp_address + route_map + (bidir_true)
- nxos_pim_rp_address: *config30
- register: result
-
- - assert: *false
-
- - block: # bidir test
- - name: 3.1 Configure rp_address + route_map (bidir_false)
- nxos_pim_rp_address: &config31
- rp_address: "10.1.1.3"
- route_map: "{{ pim_route_map|default(omit)}}"
- bidir: "{{ bidir_false|default(omit)}}"
- state: present
- register: result
-
- - assert: *true
-
- - name: 3.1 Idempotence rp_address + route_map
- nxos_pim_rp_address: *config31
- register: result
-
- - assert: *false
- when: bidir_false is defined
-
- - name: 3.2 Remove rp_address + route_map (bidir_false)
- nxos_pim_rp_address: &config32
- rp_address: "10.1.1.3"
- route_map: "{{ pim_route_map|default(omit)}}"
- bidir: "{{ bidir_false|default(omit)}}"
- state: absent
- register: result
-
- - assert: *true
-
- - name: 3.2 Idempotence remove rp_address + route_map (bidir_false)
- nxos_pim_rp_address: *config32
- register: result
-
- - assert: *false
-
- always:
- - name: "Disable feature PIM"
- nxos_feature: *disable_feature
-
-- debug: msg="END connection={{ ansible_connection }} nxos_pim_rp_address sanity"
diff --git a/test/integration/targets/nxos_reboot/defaults/main.yaml b/test/integration/targets/nxos_reboot/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_reboot/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_reboot/meta/main.yml b/test/integration/targets/nxos_reboot/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_reboot/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_reboot/tasks/cli.yaml b/test/integration/targets/nxos_reboot/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_reboot/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_reboot/tasks/main.yaml b/test/integration/targets/nxos_reboot/tasks/main.yaml
deleted file mode 100644
index 066027891a..0000000000
--- a/test/integration/targets/nxos_reboot/tasks/main.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-- include: cli.yaml
- tags: cli
-- include: nxapi.yaml
- tags: nxapi
diff --git a/test/integration/targets/nxos_reboot/tasks/nxapi.yaml b/test/integration/targets/nxos_reboot/tasks/nxapi.yaml
deleted file mode 100644
index 0014c8a485..0000000000
--- a/test/integration/targets/nxos_reboot/tasks/nxapi.yaml
+++ /dev/null
@@ -1,28 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
- tags: nxapi_httpapi
diff --git a/test/integration/targets/nxos_reboot/tests/common/sanity.yaml b/test/integration/targets/nxos_reboot/tests/common/sanity.yaml
deleted file mode 100644
index 839026d534..0000000000
--- a/test/integration/targets/nxos_reboot/tests/common/sanity.yaml
+++ /dev/null
@@ -1,23 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_reboot sanity test"
-
-- debug: msg="***WARNING*** Remove meta end_play to verify this module ***WARNING***"
-
-- meta: end_play
-
-- block:
- - name: Reboot Switch
- nxos_reboot:
- confirm: True
- ignore_errors: yes
-
- always:
- - name: Wait for device to come back up
- wait_for:
- port: 22
- state: started
- timeout: 600
- delay: 60
- host: "{{ inventory_hostname }}"
-
- - debug: msg="END connection={{ ansible_connection }} nxos_reboot sanity test"
diff --git a/test/integration/targets/nxos_rollback/defaults/main.yaml b/test/integration/targets/nxos_rollback/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_rollback/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_rollback/meta/main.yml b/test/integration/targets/nxos_rollback/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_rollback/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_rollback/tasks/cli.yaml b/test/integration/targets/nxos_rollback/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_rollback/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_rollback/tasks/main.yaml b/test/integration/targets/nxos_rollback/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_rollback/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_rollback/tasks/nxapi.yaml b/test/integration/targets/nxos_rollback/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_rollback/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_rollback/tests/common/sanity.yaml b/test/integration/targets/nxos_rollback/tests/common/sanity.yaml
deleted file mode 100644
index fab64b5daf..0000000000
--- a/test/integration/targets/nxos_rollback/tests/common/sanity.yaml
+++ /dev/null
@@ -1,24 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_rollback sanity test"
-
-- name: delete existing checkpoint file
- nxos_config: &delete
- commands:
- - terminal dont-ask
- - delete backup.cfg
- match: none
- ignore_errors: yes
-
-- name: Create checkpoint file
- nxos_rollback:
- checkpoint_file: backup.cfg
-
-- name: rollback to the previously created checkpoint file
- nxos_rollback:
- rollback_to: backup.cfg
-
-- name: cleanup checkpoint file
- nxos_config: *delete
- ignore_errors: yes
-
-- debug: msg="END connection={{ ansible_connection }} nxos_rollback sanity test"
diff --git a/test/integration/targets/nxos_rpm/defaults/main.yaml b/test/integration/targets/nxos_rpm/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_rpm/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_rpm/meta/main.yml b/test/integration/targets/nxos_rpm/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_rpm/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_rpm/tasks/cli.yaml b/test/integration/targets/nxos_rpm/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_rpm/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_rpm/tasks/main.yaml b/test/integration/targets/nxos_rpm/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_rpm/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_rpm/tasks/nxapi.yaml b/test/integration/targets/nxos_rpm/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_rpm/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_rpm/tests/common/sanity.yaml b/test/integration/targets/nxos_rpm/tests/common/sanity.yaml
deleted file mode 100644
index 971757452b..0000000000
--- a/test/integration/targets/nxos_rpm/tests/common/sanity.yaml
+++ /dev/null
@@ -1,151 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_rpm sanity test"
-
-- set_fact: smu_run="false"
-- set_fact: smu_run="true"
- when: ((platform is search('N9K')) and (imagetag and (imagetag is version_compare('I2', 'ge'))))
-
-- set_fact: sdk_run="false"
-- set_fact: sdk_run="true"
- when: ((platform is search('N9K')) and (imagetag and (imagetag is version_compare('I6', 'ge'))))
-
-# The smu and nxsdk packages MUST be present on the device before the tests are run.
-# The smu patch must be built to match the image version under test
-# Only run this test after replacing the pkg with proper rpm files
-
-- debug: msg="***WARNING*** Remove meta end_play to verify this module ***WARNING***"
-
-- meta: end_play
-
-- block:
- - name: Install smu RPM
- nxos_rpm: &tsmurpm
- pkg: "nxos.sample-n9k_ALL-1.0.0-7.0.3.I6.1.lib32_n9000.rpm"
- register: result
-
- - assert: &true1
- that:
- - "result.changed == true"
-
- - name: Check Idempotence
- nxos_rpm: *tsmurpm
- register: result
-
- - assert: &false1
- that:
- - "result.changed == false"
-
- - name: Remove smu RPM
- nxos_rpm: &rsmurpm
- pkg: "nxos.sample-n9k_ALL-1.0.0-7.0.3.I6.1.lib32_n9000.rpm"
- state: absent
- register: result
-
- - assert: *true1
-
- - name: Check Idempotence
- nxos_rpm: *rsmurpm
- register: result
-
- - assert: *false1
-
- when: smu_run
-
-# healthMonitor-1.0-1.5.0.x86_64.rpm is avaibale at https://github.com/CiscoDevNet/NX-SDK/tree/master/rpm/RPMS
-- block:
- - name: Install nxsdk RPM(aggregate)
- nxos_rpm: &tsdkrpm
- aggregate:
- - { pkg: "healthMonitor-1.0-1.5.0.x86_64.rpm", file_system: "bootflash" }
- - { pkg: "customCliApp-1.0-1.0.0.x86_64.rpm" }
- register: result
-
- - assert: &true2
- that:
- - "result.changed == true"
-
- - name: Check Idempotence
- nxos_rpm: *tsdkrpm
- register: result
-
- - assert: &false2
- that:
- - "result.changed == false"
-
- - name: Remove nxsdk RPM(aggregate)
- nxos_rpm: &rsdkrpm
- aggregate:
- - { pkg: "healthMonitor-1.0-1.5.0.x86_64.rpm" }
- - { pkg: "customCliApp-1.0-1.0.0.x86_64.rpm" }
- state: absent
- register: result
-
- - assert: *true2
-
- - name: Check Idempotence
- nxos_rpm: *rsdkrpm
- register: result
-
- - assert: *false2
-
- when: sdk_run
-
-- block:
- - name: Install reload smu RPM
- nxos_rpm: &trsmurpm
- pkg: "nxos.CSCve91311-n9k_ALL-1.0.0-7.0.3.I6.1.lib32_n9000.rpm"
- register: result
-
- - assert: *true1
-
- - name: Wait for device to come back up
- wait_for:
- port: 22
- state: started
- timeout: 600
- delay: 60
- host: "{{ inventory_hostname_short }}"
-
- - name: Continue with install reload smu RPM
- nxos_rpm: *trsmurpm
- register: result
-
- - assert: *true1
-
- - name: Check Idempotence
- nxos_rpm: *trsmurpm
- register: result
-
- - assert: *false1
-
- - name: Remove reload smu RPM
- nxos_rpm: &rrsmurpm
- pkg: "nxos.CSCve91311-n9k_ALL-1.0.0-7.0.3.I6.1.lib32_n9000.rpm"
- state: absent
- register: result
-
- - assert: *true1
-
- - name: Wait for device to come back up
- wait_for:
- port: 22
- state: started
- timeout: 600
- delay: 60
- host: "{{ inventory_hostname_short }}"
-
- - name: Continue with remove reload smu RPM
- nxos_rpm: *rrsmurpm
- register: result
-
- - assert: *true1
-
- - name: Check Idempotence
- nxos_rpm: *rrsmurpm
- register: result
-
- - assert: *false1
-
- when: smu_run
-
-- debug: msg="END connection={{ ansible_connection }} nxos_rpm sanity test"
diff --git a/test/integration/targets/nxos_smoke/defaults/main.yaml b/test/integration/targets/nxos_smoke/defaults/main.yaml
deleted file mode 100644
index 9ef5ba5165..0000000000
--- a/test/integration/targets/nxos_smoke/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "*"
-test_items: []
diff --git a/test/integration/targets/nxos_smoke/meta/main.yml b/test/integration/targets/nxos_smoke/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_smoke/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_smoke/tasks/cli.yaml b/test/integration/targets/nxos_smoke/tasks/cli.yaml
deleted file mode 100644
index e0f563729a..0000000000
--- a/test/integration/targets/nxos_smoke/tasks/cli.yaml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
-
-- name: run test cases (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_smoke/tasks/main.yaml b/test/integration/targets/nxos_smoke/tasks/main.yaml
deleted file mode 100644
index b165a5f6e1..0000000000
--- a/test/integration/targets/nxos_smoke/tasks/main.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
----
-# Some of the tests in this suite change the hostname to switch.
-# This block/always ensures the hostname gets changed back to
-# the correct name.
-- block:
- - { include: cli.yaml, tags: ['cli'] }
- - { include: nxapi.yaml, tags: ['nxapi'] }
-
- always:
- - name: "Change hostname back to {{ inventory_hostname_short }}"
- nxos_config:
- lines:
- - "hostname {{ inventory_hostname_short }}"
- match: none
diff --git a/test/integration/targets/nxos_smoke/tasks/nxapi.yaml b/test/integration/targets/nxos_smoke/tasks/nxapi.yaml
deleted file mode 100644
index 04c99602e6..0000000000
--- a/test/integration/targets/nxos_smoke/tasks/nxapi.yaml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
-
-- name: run test cases (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_smoke/tests/cli/misc_tests.yaml b/test/integration/targets/nxos_smoke/tests/cli/misc_tests.yaml
deleted file mode 100644
index 9bb1435e61..0000000000
--- a/test/integration/targets/nxos_smoke/tests/cli/misc_tests.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-- debug: msg="START cli/misc_tests.yaml on connection={{ ansible_connection }}"
-
-
-- block:
- # Test that transport values are properly ignored
- - name: wrong transport specified
- eos_command:
- commands: show version
- transport: nxapi
-
- - name: wrong transport specified in provider
- eos_command:
- commands: show version
- provider: "{{ nxapi }}"
-
- when: "ansible_connection != 'local'"
diff --git a/test/integration/targets/nxos_smoke/tests/common/common_config.yaml b/test/integration/targets/nxos_smoke/tests/common/common_config.yaml
deleted file mode 100644
index c551f12cc3..0000000000
--- a/test/integration/targets/nxos_smoke/tests/common/common_config.yaml
+++ /dev/null
@@ -1,160 +0,0 @@
----
-# nxos_config -> NetworkConfig, dumps
-# nxos_static_route -> CustomNetworkConfig
-
-# hit NetworkConfig
-# Select interface for test
-- debug: msg="START connection={{ ansible_connection }} common/common_config.yaml"
-- debug: msg="Using provider={{ connection.transport }}"
- when: ansible_connection == "local"
-
-- set_fact: intname="{{ nxos_int1 }}"
-
-- name: setup
- nxos_config:
- commands:
- - no description
- - no shutdown
- parents:
- - "interface {{ intname }}"
- match: none
- provider: "{{ connection }}"
-
-- name: collect any backup files
- find: &backups
- paths: "{{ role_path }}/backup"
- pattern: "{{ inventory_hostname_short }}_config*"
- connection: local
- register: backup_files
-
-- name: delete backup files
- file:
- path: "{{ item.path }}"
- state: absent
- with_items: "{{backup_files.files|default([])}}"
-
-- name: configure device with config
- nxos_config:
- commands:
- - description this is a test
- - shutdown
- parents:
- - "interface {{ intname }}"
- backup: yes
- provider: "{{ connection }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "result.updates is defined"
-
-- name: collect any backup files
- find: *backups
- connection: local
- register: backup_files
-
-- assert:
- that:
- - "backup_files.files is defined"
-
-# hit block/sublevel sections
-- name: setup
- nxos_config: &clear
- lines: no ip access-list test
- provider: "{{ connection }}"
- match: none
- ignore_errors: yes
-
-# hit NetworkConfig._diff_exact
-- name: configure sub level command using block replace - exact
- nxos_config:
- lines:
- - 10 permit ip 192.0.2.1/32 any log
- - 20 permit ip 192.0.2.2/32 any log
- - 30 permit ip 192.0.2.3/32 any log
- - 40 permit ip 192.0.2.4/32 any log
- parents: ip access-list test
- replace: block
- provider: "{{ connection }}"
- match: exact
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'ip access-list test' in result.updates"
- - "'10 permit ip 192.0.2.1/32 any log' in result.updates"
- - "'20 permit ip 192.0.2.2/32 any log' in result.updates"
- - "'30 permit ip 192.0.2.3/32 any log' in result.updates"
- - "'40 permit ip 192.0.2.4/32 any log' in result.updates"
-
-# hit NetworkConfig._diff_strict
-- name: configure sub level command using block replace strict
- nxos_config:
- lines:
- - 10 permit ip 192.0.2.1/32 any log
- - 20 permit ip 192.0.2.2/32 any log
- - 30 permit ip 192.0.2.3/32 any log
- - 40 permit ip 192.0.2.4/32 any log
- parents: ip access-list test
- replace: block
- provider: "{{ connection }}"
- match: strict
- register: result
-
-- name: teardown
- nxos_config: *clear
-
-# hit CustomNetworkConfig
-- block:
- - name: create static route
- nxos_static_route: &configure
- prefix: "192.168.20.64/24"
- next_hop: "192.0.2.3"
- route_name: testing
- pref: 100
- tag: 5500
- vrf: testing
- provider: "{{ connection }}"
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: remove static route
- nxos_static_route: &remove
- prefix: "192.168.20.64/24"
- next_hop: "192.0.2.3"
- route_name: testing
- pref: 100
- tag: 5500
- vrf: testing
- state: absent
- provider: "{{ connection }}"
- register: result
-
- - assert: *true
-
- always:
- - name: remove static route
- nxos_static_route:
- prefix: "192.168.20.64/24"
- next_hop: "192.0.2.3"
- route_name: testing
- pref: 100
- tag: 5500
- vrf: testing
- state: absent
- provider: "{{ connection }}"
- ignore_errors: yes
-
- - name: remove static route aggregate
- nxos_static_route:
- aggregate:
- - { prefix: "192.168.22.64/24", next_hop: "192.0.2.3" }
- - { prefix: "192.168.24.64/24", next_hop: "192.0.2.3" }
- state: absent
- provider: "{{ connection }}"
- ignore_errors: yes
diff --git a/test/integration/targets/nxos_smoke/tests/common/common_utils.yaml b/test/integration/targets/nxos_smoke/tests/common/common_utils.yaml
deleted file mode 100644
index db088061e4..0000000000
--- a/test/integration/targets/nxos_smoke/tests/common/common_utils.yaml
+++ /dev/null
@@ -1,102 +0,0 @@
----
-# nxos_command -> ComplexList
-# nxos_config -> to_list
-# nxos_interface -> conditional, remove_default_spec
-
-- debug: msg="START connection={{ ansible_connection }} common/common_utils.yaml"
-- debug: msg="Using provider={{ connection.transport }}"
- when: ansible_connection == "local"
-
-# hit ComplexList
-- name: test contains operator
- nxos_command:
- commands:
- - show version
- provider: "{{ connection }}"
-
-# hit to_list()
-- name: setup
- nxos_config:
- lines: hostname switch
- provider: "{{ connection }}"
- match: none
-
-- name: configure top level command
- nxos_config:
- lines: hostname foo
- provider: "{{ connection }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'hostname foo' in result.updates"
-
-- name: setup
- nxos_config:
- lines: hostname switch
- provider: "{{ connection }}"
- match: none
-
-# hit conditional()
-- set_fact: testint1="{{ nxos_int1 }}"
-- set_fact: testint2="{{ nxos_int2 }}"
-
-- name: "Setup: Put interfaces into a default state"
- nxos_config:
- lines:
- - "default interface {{ testint1 }}"
- - "default interface {{ testint2 }}"
- provider: "{{ connection }}"
- ignore_errors: yes
-
- register: result
-
-- name: Check intent arguments
- nxos_interface:
- name: "{{ testint2 }}"
- admin_state: up
- tx_rate: ge(0)
- rx_rate: ge(0)
- provider: "{{ connection }}"
- register: result
-
-- assert:
- that:
- - "result.failed == false"
-
-- name: Check intent arguments (failed condition)
- nxos_interface:
- name: "{{ testint2 }}"
- admin_state: down
- tx_rate: gt(0)
- rx_rate: lt(0)
- provider: "{{ connection }}"
- ignore_errors: yes
- register: result
-
-- assert:
- that:
- - "result.failed == true"
- - "'tx_rate gt(0)' in result.failed_conditions"
- - "'rx_rate lt(0)' in result.failed_conditions"
-
-- name: aggregate definition of interface
- nxos_interface:
- aggregate:
- - { name: "{{ testint1 }}", description: "Test aggregation on first interface" }
- - { name: "{{ testint2 }}", mode: layer3 }
- provider: "{{ connection }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: "TearDown: Put interfaces into a default state"
- nxos_config:
- lines:
- - "default interface {{ testint1 }}"
- - "default interface {{ testint2 }}"
- provider: "{{ connection }}"
- ignore_errors: yes
diff --git a/test/integration/targets/nxos_smoke/tests/common/misc_tests.yaml b/test/integration/targets/nxos_smoke/tests/common/misc_tests.yaml
deleted file mode 100644
index 6ae0b003ea..0000000000
--- a/test/integration/targets/nxos_smoke/tests/common/misc_tests.yaml
+++ /dev/null
@@ -1,30 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} common/misc_tests.yaml"
-- debug: msg="Using provider={{ connection.transport }}"
- when: ansible_connection == "local"
-
-- name: hit conditional for lists of 10 or more commands
- nxos_command:
- commands:
- - show hostname
- - show hostname
- - show hostname
- - show hostname
- - show hostname
- - show hostname
- - show hostname
- - show hostname
- - show hostname
- - show hostname
- provider: "{{ connection }}"
- register: result
-
-- assert:
- that:
- - result.stdout|length == 10
-
-- name: combine with provider
- nxos_command:
- commands:
- - show hostname
- provider: "{{ connection | combine({'timeout': 500}) }}"
diff --git a/test/integration/targets/nxos_snapshot/defaults/main.yaml b/test/integration/targets/nxos_snapshot/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_snapshot/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_snapshot/meta/main.yml b/test/integration/targets/nxos_snapshot/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_snapshot/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_snapshot/tasks/cli.yaml b/test/integration/targets/nxos_snapshot/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_snapshot/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_snapshot/tasks/main.yaml b/test/integration/targets/nxos_snapshot/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_snapshot/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_snapshot/tasks/nxapi.yaml b/test/integration/targets/nxos_snapshot/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_snapshot/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_snapshot/tests/common/sanity.yaml b/test/integration/targets/nxos_snapshot/tests/common/sanity.yaml
deleted file mode 100644
index 025039dc55..0000000000
--- a/test/integration/targets/nxos_snapshot/tests/common/sanity.yaml
+++ /dev/null
@@ -1,128 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_snapshot sanity test"
-
-- set_fact: snapshot_run="true"
-
-- set_fact: snapshot_run="false"
- when: titanium and (ansible_connection is match('nxapi'))
-
-- set_fact: snapshot_run="false"
- when: platform is match('N35')
-
-- set_fact: add_sec="true"
-- set_fact: add_sec="false"
- when: imagetag is search("D1")
-
-- block:
- - name: create snapshot
- nxos_snapshot: &crss1
- action: create
- snapshot_name: test_snapshot1
- description: Ansible
- save_snapshot_locally: True
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Conf Idempotence"
- nxos_snapshot: *crss1
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - block:
- - name: Add section
- nxos_snapshot: &add
- action: add
- section: myshow
- show_command: show ip interface brief
- row_id: ROW_intf
- element_key1: intf-name
- element_key2: intf-name
- register: result
-
- - assert: *true
-
- - name: "Conf Idempotence"
- nxos_snapshot: *add
- register: result
-
- - assert: *false
-
- when: add_sec
-
- - name: create another snapshot
- nxos_snapshot: &crss2
- action: create
- snapshot_name: test_snapshot2
- description: row
- section: myshow
- show_command: show ip interface brief
- row_id: ROW_intf
- element_key1: intf-name
- register: result
-
- - assert: *true
-
- - name: "Conf Idempotence"
- nxos_snapshot: *crss2
- register: result
-
- - assert: *false
-
- - name: compare snapshots
- nxos_snapshot:
- action: compare
- snapshot1: test_snapshot1
- snapshot2: test_snapshot2
- comparison_results_file: compare_snapshots.txt
- compare_option: summary
- path: '.'
-
- - name: delete snapshot
- nxos_snapshot: &del
- snapshot_name: test_snapshot2
- action: delete
- register: result
-
- - assert: *true
-
- - name: "Conf Idempotence"
- nxos_snapshot: *del
- register: result
-
- - assert: *false
-
- - name: delete all snapshots
- nxos_snapshot: &delall
- action: delete_all
- register: result
-
- - assert: *true
-
- - name: "Conf Idempotence"
- nxos_snapshot: *delall
- register: result
-
- - assert: *false
-
- when: snapshot_run
-
- always:
- - name: delete all sections
- nxos_config:
- commands:
- - snapshot section delete myshow
- match: none
- ignore_errors: yes
-
- - name: delete all snapshots
- nxos_snapshot:
- action: delete_all
- ignore_errors: yes
-
-- debug: msg="END connection={{ ansible_connection }} nxos_snapshot sanity test"
diff --git a/test/integration/targets/nxos_snmp_community/defaults/main.yaml b/test/integration/targets/nxos_snmp_community/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_snmp_community/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_snmp_community/meta/main.yml b/test/integration/targets/nxos_snmp_community/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_snmp_community/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_snmp_community/tasks/cli.yaml b/test/integration/targets/nxos_snmp_community/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_snmp_community/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_snmp_community/tasks/main.yaml b/test/integration/targets/nxos_snmp_community/tasks/main.yaml
deleted file mode 100644
index fea9337c14..0000000000
--- a/test/integration/targets/nxos_snmp_community/tasks/main.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-# Use block to ensure that both cli and nxapi tests
-# will run even if there are failures or errors.
-- block:
- - { include: cli.yaml, tags: ['cli'] }
- always:
- - { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_snmp_community/tasks/nxapi.yaml b/test/integration/targets/nxos_snmp_community/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_snmp_community/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_snmp_community/tests/common/sanity.yaml b/test/integration/targets/nxos_snmp_community/tests/common/sanity.yaml
deleted file mode 100644
index 468fd40809..0000000000
--- a/test/integration/targets/nxos_snmp_community/tests/common/sanity.yaml
+++ /dev/null
@@ -1,138 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_snmp_community sanity test"
-
-- name: Setup - Remove snmp_community if configured
- nxos_snmp_community: &remove
- community: TESTING7
- group: network-operator
- state: absent
- ignore_errors: yes
-
-- block:
-
- - name: Configure snmp_community group
- nxos_snmp_community: &config
- community: TESTING7
- group: network-operator
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: Idempotence Check
- nxos_snmp_community: *config
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: Change snmp_community group
- nxos_snmp_community: &chg
- community: TESTING7
- group: network-admin
- state: present
- register: result
-
- - assert: *true
-
- - name: Idempotence Check
- nxos_snmp_community: *chg
- register: result
-
- - assert: *false
-
- - name: Remove snmp_community
- nxos_snmp_community: *remove
- register: result
-
- - assert: *true
-
- - name: Idempotence Check
- nxos_snmp_community: *remove
- register: result
-
- - assert: *false
-
- - name: Configure snmp_community access read-only
- nxos_snmp_community: &configaccess
- community: TESTING7
- access: ro
- state: present
- register: result
-
- - assert: *true
-
- - name: Idempotence Check
- nxos_snmp_community: *configaccess
- register: result
-
- - assert: *false
-
- - name: Remove snmp_community
- nxos_snmp_community: *remove
- register: result
-
- - assert: *true
-
- - name: Idempotence Check
- nxos_snmp_community: *remove
- register: result
-
- - assert: *false
-
- - name: Configure snmp_community access read-write
- nxos_snmp_community: &configaccessrw
- community: TESTING7
- access: rw
- acl: ansible_acl
- state: present
- register: result
-
- - assert: *true
-
- - name: Idempotence Check
- nxos_snmp_community: *configaccessrw
- register: result
-
- - assert: *false
-
- - name: Change acl
- nxos_snmp_community: &chgacl
- community: TESTING7
- access: rw
- acl: new_acl
- state: present
- register: result
-
- - assert: *true
-
- - name: Idempotence Check
- nxos_snmp_community: *chgacl
- register: result
-
- - assert: *false
-
- - name: Remove acl
- nxos_snmp_community: &removeacl
- community: TESTING7
- access: rw
- acl: default
- state: present
- register: result
-
- - assert: *true
-
- - name: Idempotence Check
- nxos_snmp_community: *removeacl
- register: result
-
- - assert: *false
-
- always:
- - name: Cleanup
- nxos_snmp_community: *remove
-
- - debug: msg="END connection={{ ansible_connection }} nxos_snmp_community sanity test"
diff --git a/test/integration/targets/nxos_snmp_contact/defaults/main.yaml b/test/integration/targets/nxos_snmp_contact/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_snmp_contact/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_snmp_contact/meta/main.yml b/test/integration/targets/nxos_snmp_contact/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_snmp_contact/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_snmp_contact/tasks/cli.yaml b/test/integration/targets/nxos_snmp_contact/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_snmp_contact/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_snmp_contact/tasks/main.yaml b/test/integration/targets/nxos_snmp_contact/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_snmp_contact/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_snmp_contact/tasks/nxapi.yaml b/test/integration/targets/nxos_snmp_contact/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_snmp_contact/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_snmp_contact/tests/common/sanity.yaml b/test/integration/targets/nxos_snmp_contact/tests/common/sanity.yaml
deleted file mode 100644
index d43e60c2a4..0000000000
--- a/test/integration/targets/nxos_snmp_contact/tests/common/sanity.yaml
+++ /dev/null
@@ -1,59 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_snmp_community sanity test"
-
-- name: Setup - Remove snmp_contact if configured
- nxos_snmp_contact: &remove
- contact: Test
- state: absent
-
-- block:
-
- - name: Configure snmp contact
- nxos_snmp_contact: &config
- contact: Testing
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: Idempotence Check
- nxos_snmp_contact: *config
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: Change snmp contact
- nxos_snmp_contact: &config1
- contact: Test
- state: present
- register: result
-
- - assert: *true
-
- - name: Idempotence Check
- nxos_snmp_contact: *config1
- register: result
-
- - assert: *false
-
- - name: Remove snmp contact
- nxos_snmp_contact: *remove
- register: result
-
- - assert: *true
-
- - name: Idempotence Check
- nxos_snmp_contact: *remove
- register: result
-
- - assert: *false
-
- always:
- - name: Cleanup
- nxos_snmp_contact: *remove
-
- - debug: msg="END connection={{ ansible_connection }} nxos_snmp_community sanity test"
diff --git a/test/integration/targets/nxos_snmp_host/defaults/main.yaml b/test/integration/targets/nxos_snmp_host/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_snmp_host/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_snmp_host/meta/main.yml b/test/integration/targets/nxos_snmp_host/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_snmp_host/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_snmp_host/tasks/cli.yaml b/test/integration/targets/nxos_snmp_host/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_snmp_host/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_snmp_host/tasks/main.yaml b/test/integration/targets/nxos_snmp_host/tasks/main.yaml
deleted file mode 100644
index fea9337c14..0000000000
--- a/test/integration/targets/nxos_snmp_host/tasks/main.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-# Use block to ensure that both cli and nxapi tests
-# will run even if there are failures or errors.
-- block:
- - { include: cli.yaml, tags: ['cli'] }
- always:
- - { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_snmp_host/tasks/nxapi.yaml b/test/integration/targets/nxos_snmp_host/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_snmp_host/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v1_trap.yaml b/test/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v1_trap.yaml
deleted file mode 100644
index dd50e0719d..0000000000
--- a/test/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v1_trap.yaml
+++ /dev/null
@@ -1,123 +0,0 @@
----
-- set_fact: snmp_type="trap"
-- set_fact: snmp_version="v1"
-
-- debug: msg="START connection={{ ansible_connection }} nxos_snmp_host {{ snmp_type }} {{ snmp_version }} sanity test"
-
-# Select interface for test
-- set_fact: intname="{{ nxos_int1 }}"
- when: platform is not search('N5K|N6K')
-
-
-- name: Setup - Remove snmp_host if configured
- nxos_snmp_host: &remove
- snmp_host: 192.0.2.3
- community: TESTING
- version: "{{ snmp_version }}"
- snmp_type: "{{ snmp_type }}"
- vrf: management
- vrf_filter: management
- src_intf: "{{ intname|default(omit) }}"
- udp: 222
- state: absent
- ignore_errors: yes
-
-- block:
-
- - name: Configure snmp host
- nxos_snmp_host: &config
- snmp_host: 192.0.2.3
- community: TESTING
- version: "{{ snmp_version }}"
- snmp_type: "{{ snmp_type }}"
- vrf: management
- vrf_filter: management
- src_intf: "{{ intname|default(omit) }}"
- udp: 222
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: Idempotence Check
- nxos_snmp_host: *config
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - block:
- - name: Add another vrf to filter
- nxos_snmp_host: &config1
- snmp_host: 192.0.2.3
- vrf_filter: default
- udp: 222
- state: present
- register: result
-
- - assert: *true
-
- - name: Idempotence Check
- nxos_snmp_host: *config1
- register: result
-
- - assert: *false
- when: platform is not search('N35|N5K|N6K')
-
- - name: remove some configuration
- nxos_snmp_host: &rem1
- snmp_host: 192.0.2.3
- udp: 222
- src_intf: "{{ intname|default(omit) }}"
- vrf: management
- vrf_filter: management
- state: absent
- register: result
-
- - assert: *true
-
- - name: Idempotence Check
- nxos_snmp_host: *rem1
- register: result
-
- - assert: *false
-
- - block:
- - name: remove some more configuration
- nxos_snmp_host: &rem2
- snmp_host: 192.0.2.3
- udp: 222
- vrf_filter: default
- state: absent
- register: result
-
- - assert: *true
-
- - name: Idempotence Check
- nxos_snmp_host: *rem2
- register: result
-
- - assert: *false
- when: platform is not search('N35|N5K|N6K')
-
-
- - name: Cleanup
- nxos_snmp_host: *remove
- register: result
-
- - assert: *true
-
- - name: Cleanup Idempotence
- nxos_snmp_host: *remove
- register: result
-
- - assert: *false
-
- always:
- - name: Cleanup
- nxos_snmp_host: *remove
-
- - debug: msg="END connection={{ ansible_connection }} nxos_snmp_host {{ snmp_type }} {{ snmp_version }} sanity test"
diff --git a/test/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v2_inform.yaml b/test/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v2_inform.yaml
deleted file mode 100644
index e3b9fa7faf..0000000000
--- a/test/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v2_inform.yaml
+++ /dev/null
@@ -1,121 +0,0 @@
----
-- set_fact: snmp_type="inform"
-- set_fact: snmp_version="v2c"
-
-- debug: msg="START connection={{ ansible_connection }} nxos_snmp_host {{ snmp_type }} {{ snmp_version }} sanity test"
-
-# Select interface for test
-- set_fact: intname="{{ nxos_int1 }}"
- when: platform is not search('N5K|N6K')
-
-- name: Setup - Remove snmp_host if configured
- nxos_snmp_host: &remove
- snmp_host: 192.0.2.3
- community: TESTING
- version: "{{ snmp_version }}"
- snmp_type: "{{ snmp_type }}"
- vrf: management
- vrf_filter: management
- src_intf: "{{ intname|default(omit) }}"
- udp: 222
- state: absent
- ignore_errors: yes
-
-- block:
-
- - name: Configure snmp host
- nxos_snmp_host: &config
- snmp_host: 192.0.2.3
- community: TESTING
- version: "{{ snmp_version }}"
- snmp_type: "{{ snmp_type }}"
- vrf: management
- vrf_filter: management
- src_intf: "{{ intname|default(omit) }}"
- udp: 222
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: Idempotence Check
- nxos_snmp_host: *config
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - block:
- - name: Add another vrf to filter
- nxos_snmp_host: &config1
- snmp_host: 192.0.2.3
- vrf_filter: default
- udp: 222
- state: present
- register: result
-
- - assert: *true
-
- - name: Idempotence Check
- nxos_snmp_host: *config1
- register: result
-
- - assert: *false
- when: platform is not search('N35|N5K|N6K')
-
- - name: remove some configuration
- nxos_snmp_host: &rem1
- snmp_host: 192.0.2.3
- udp: 222
- src_intf: "{{ intname|default(omit) }}"
- vrf: management
- vrf_filter: management
- state: absent
- register: result
-
- - assert: *true
-
- - name: Idempotence Check
- nxos_snmp_host: *rem1
- register: result
-
- - assert: *false
-
- - block:
- - name: remove some more configuration
- nxos_snmp_host: &rem2
- snmp_host: 192.0.2.3
- udp: 222
- vrf_filter: default
- state: absent
- register: result
-
- - assert: *true
-
- - name: Idempotence Check
- nxos_snmp_host: *rem2
- register: result
-
- - assert: *false
- when: platform is not search('N35|N5K|N6K')
-
- - name: Cleanup
- nxos_snmp_host: *remove
- register: result
-
- - assert: *true
-
- - name: Cleanup Idempotence
- nxos_snmp_host: *remove
- register: result
-
- - assert: *false
-
- always:
- - name: Cleanup
- nxos_snmp_host: *remove
-
- - debug: msg="END connection={{ ansible_connection }} nxos_snmp_host {{ snmp_type }} {{ snmp_version }} sanity test"
diff --git a/test/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v3_inform.yaml b/test/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v3_inform.yaml
deleted file mode 100644
index f41b0176a6..0000000000
--- a/test/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v3_inform.yaml
+++ /dev/null
@@ -1,127 +0,0 @@
----
-- set_fact: snmp_type="inform"
-- set_fact: snmp_version="v3"
-- set_fact: snmp_auth="priv"
-
-- debug: msg="START connection={{ ansible_connection }} nxos_snmp_host {{ snmp_type }} {{ snmp_version }} sanity test"
-
-# Select interface for test
-- set_fact: intname="{{ nxos_int1 }}"
- when: platform is not search('N5K|N6K')
-
-
-- set_fact: run="true"
-- set_fact: run="false"
- when: platform is match('N35')
-
-- name: Setup - Remove snmp_host if configured
- nxos_snmp_host: &remove
- snmp_host: 192.0.2.3
- community: TESTING
- version: "{{ snmp_version }}"
- snmp_type: "{{ snmp_type }}"
- v3: "{{ snmp_auth }}"
- vrf: management
- vrf_filter: management
- src_intf: "{{ intname|default(omit) }}"
- state: absent
- ignore_errors: yes
-
-- block:
-
- - name: Configure snmp host
- nxos_snmp_host: &config
- snmp_host: 192.0.2.3
- community: TESTING
- v3: "{{ snmp_auth|default(omit) }}"
- version: "{{ snmp_version }}"
- snmp_type: "{{ snmp_type }}"
- vrf: management
- vrf_filter: management
- src_intf: "{{ intname|default(omit) }}"
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: Idempotence Check
- nxos_snmp_host: *config
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - block:
- - name: Add another vrf to filter
- nxos_snmp_host: &config1
- snmp_host: 192.0.2.3
- vrf_filter: default
- state: present
- register: result
-
- - assert: *true
-
- - name: Idempotence Check
- nxos_snmp_host: *config1
- register: result
-
- - assert: *false
- when: platform is not search('N35|N5K|N6K')
-
- - name: remove some configuration
- nxos_snmp_host: &rem1
- snmp_host: 192.0.2.3
- src_intf: "{{ intname|default(omit) }}"
- vrf: management
- vrf_filter: management
- state: absent
- register: result
-
- - assert: *true
-
- - name: Idempotence Check
- nxos_snmp_host: *rem1
- register: result
-
- - assert: *false
-
- - block:
- - name: remove some more configuration
- nxos_snmp_host: &rem2
- snmp_host: 192.0.2.3
- vrf_filter: default
- state: absent
- register: result
-
- - assert: *true
-
- - name: Idempotence Check
- nxos_snmp_host: *rem2
- register: result
-
- - assert: *false
- when: platform is not search('N35|N5K|N6K')
-
- - name: Cleanup
- nxos_snmp_host: *remove
- register: result
-
- - assert: *true
-
- - name: Cleanup Idempotence
- nxos_snmp_host: *remove
- register: result
-
- - assert: *false
-
- when: run
-
- always:
- - name: Cleanup
- nxos_snmp_host: *remove
- register: result
-
- - debug: msg="END connection={{ ansible_connection }} nxos_snmp_host {{ snmp_type }} {{ snmp_version }} sanity test"
diff --git a/test/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v3_trap.yaml b/test/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v3_trap.yaml
deleted file mode 100644
index 86895ff2ea..0000000000
--- a/test/integration/targets/nxos_snmp_host/tests/common/sanity_snmp_v3_trap.yaml
+++ /dev/null
@@ -1,125 +0,0 @@
----
-- set_fact: snmp_type="trap"
-- set_fact: snmp_version="v3"
-- set_fact: snmp_auth="priv"
-
-- debug: msg="START connection={{ ansible_connection }} nxos_snmp_host {{ snmp_type }} {{ snmp_version }} sanity test"
-
-# Select interface for test
-- set_fact: intname="{{ nxos_int1 }}"
- when: platform is not search('N5K|N6K')
-
-- name: Setup - Remove snmp_host if configured
- nxos_snmp_host: &remove
- snmp_host: 192.0.2.3
- community: TESTING
- udp: 222
- v3: "{{ snmp_auth|default(omit) }}"
- version: "{{ snmp_version }}"
- snmp_type: "{{ snmp_type }}"
- vrf: management
- vrf_filter: management
- src_intf: "{{ intname|default(omit) }}"
- state: absent
- ignore_errors: yes
-
-- block:
-
- - name: Configure snmp host
- nxos_snmp_host: &config
- snmp_host: 192.0.2.3
- community: TESTING
- udp: 222
- v3: "{{ snmp_auth|default(omit) }}"
- version: "{{ snmp_version }}"
- snmp_type: "{{ snmp_type }}"
- vrf: management
- vrf_filter: management
- src_intf: "{{ intname|default(omit) }}"
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: Idempotence Check
- nxos_snmp_host: *config
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - block:
- - name: Add another vrf to filter
- nxos_snmp_host: &config1
- snmp_host: 192.0.2.3
- udp: 222
- vrf_filter: default
- state: present
- register: result
-
- - assert: *true
-
- - name: Idempotence Check
- nxos_snmp_host: *config1
- register: result
-
- - assert: *false
- when: platform is not search('N35|N5K|N6K')
-
- - name: remove some configuration
- nxos_snmp_host: &rem1
- snmp_host: 192.0.2.3
- udp: 222
- src_intf: "{{ intname|default(omit) }}"
- vrf: management
- vrf_filter: management
- state: absent
- register: result
-
- - assert: *true
-
- - name: Idempotence Check
- nxos_snmp_host: *rem1
- register: result
-
- - assert: *false
-
- - block:
- - name: remove some more configuration
- nxos_snmp_host: &rem2
- snmp_host: 192.0.2.3
- udp: 222
- vrf_filter: default
- state: absent
- register: result
-
- - assert: *true
-
- - name: Idempotence Check
- nxos_snmp_host: *rem2
- register: result
-
- - assert: *false
- when: platform is not search('N35|N5K|N6K')
-
- - name: Cleanup
- nxos_snmp_host: *remove
- register: result
-
- - assert: *true
-
- - name: Cleanup Idempotence
- nxos_snmp_host: *remove
- register: result
-
- - assert: *false
-
- always:
- - name: Cleanup
- nxos_snmp_host: *remove
- register: result
-
- - debug: msg="END connection={{ ansible_connection }} nxos_snmp_host {{ snmp_type }} {{ snmp_version }} sanity test"
diff --git a/test/integration/targets/nxos_snmp_location/defaults/main.yaml b/test/integration/targets/nxos_snmp_location/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_snmp_location/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_snmp_location/meta/main.yml b/test/integration/targets/nxos_snmp_location/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_snmp_location/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_snmp_location/tasks/cli.yaml b/test/integration/targets/nxos_snmp_location/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_snmp_location/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_snmp_location/tasks/main.yaml b/test/integration/targets/nxos_snmp_location/tasks/main.yaml
deleted file mode 100644
index fea9337c14..0000000000
--- a/test/integration/targets/nxos_snmp_location/tasks/main.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-# Use block to ensure that both cli and nxapi tests
-# will run even if there are failures or errors.
-- block:
- - { include: cli.yaml, tags: ['cli'] }
- always:
- - { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_snmp_location/tasks/nxapi.yaml b/test/integration/targets/nxos_snmp_location/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_snmp_location/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_snmp_location/tests/common/sanity.yaml b/test/integration/targets/nxos_snmp_location/tests/common/sanity.yaml
deleted file mode 100644
index e1be07aebf..0000000000
--- a/test/integration/targets/nxos_snmp_location/tests/common/sanity.yaml
+++ /dev/null
@@ -1,59 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_snmp_location sanity test"
-
-- name: Setup - Remove snmp_location if configured
- nxos_snmp_location: &remove
- location: Test
- state: absent
-
-- block:
- - name: Configure snmp location
- nxos_snmp_location: &config
- location: Testing
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: Idempotence Check
- nxos_snmp_location: *config
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: Change snmp location
- nxos_snmp_location: &config1
- location: Test
- state: present
- register: result
-
- - assert: *true
-
- - name: Idempotence Check
- nxos_snmp_location: *config1
- register: result
-
- - assert: *false
-
- - name: remove snmp location
- nxos_snmp_location: *remove
- register: result
-
- - assert: *true
-
- - name: Remove Idempotence
- nxos_snmp_location: *remove
- register: result
-
- - assert: *false
-
- always:
- - name: Cleanup
- nxos_snmp_location: *remove
- register: result
-
- - debug: msg="END connection={{ ansible_connection }} nxos_snmp_location sanity test"
diff --git a/test/integration/targets/nxos_snmp_traps/defaults/main.yaml b/test/integration/targets/nxos_snmp_traps/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_snmp_traps/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_snmp_traps/meta/main.yml b/test/integration/targets/nxos_snmp_traps/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_snmp_traps/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_snmp_traps/tasks/cli.yaml b/test/integration/targets/nxos_snmp_traps/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_snmp_traps/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_snmp_traps/tasks/main.yaml b/test/integration/targets/nxos_snmp_traps/tasks/main.yaml
deleted file mode 100644
index fea9337c14..0000000000
--- a/test/integration/targets/nxos_snmp_traps/tasks/main.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-# Use block to ensure that both cli and nxapi tests
-# will run even if there are failures or errors.
-- block:
- - { include: cli.yaml, tags: ['cli'] }
- always:
- - { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_snmp_traps/tasks/nxapi.yaml b/test/integration/targets/nxos_snmp_traps/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_snmp_traps/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_snmp_traps/tests/common/sanity.yaml b/test/integration/targets/nxos_snmp_traps/tests/common/sanity.yaml
deleted file mode 100644
index c035e2992c..0000000000
--- a/test/integration/targets/nxos_snmp_traps/tests/common/sanity.yaml
+++ /dev/null
@@ -1,77 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_snmp_traps sanity test"
-
-- name: Setup - Remove snmp_traps if configured
- nxos_snmp_traps: &remove
- group: all
- state: disabled
-
-- block:
- - name: Configure one snmp trap group
- nxos_snmp_traps: &config
- group: bridge
- state: enabled
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: Idempotence Check
- nxos_snmp_traps: *config
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: Remove snmp trap group
- nxos_snmp_traps: &rem1
- group: bridge
- state: disabled
- register: result
-
- - assert: *true
-
- - name: Idempotence Check
- nxos_snmp_traps: *rem1
- register: result
-
- - assert: *false
-
- - name: Configure all snmp trap groups
- nxos_snmp_traps: &config1
- group: all
- state: enabled
- register: result
-
- - assert: *true
-
- - block:
- # On I2/I7, link command does not work properly
- # On D1, callhome command does not work properly
- # skip for these older platforms
- - name: Idempotence Check
- nxos_snmp_traps: *config1
- register: result
-
- - assert: *false
- when: imagetag is not search("I2|I7|D1")
-
- - name: Cleanup
- nxos_snmp_traps: *remove
- register: result
-
- - assert: *true
-
- - name: Cleanup Idempotence
- nxos_snmp_traps: *remove
- register: result
-
- - assert: *false
-
- always:
- - name: Cleanup
- nxos_snmp_traps: *remove
-
- - debug: msg="END connection={{ ansible_connection }} nxos_snmp_traps sanity test"
diff --git a/test/integration/targets/nxos_snmp_user/defaults/main.yaml b/test/integration/targets/nxos_snmp_user/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_snmp_user/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_snmp_user/meta/main.yml b/test/integration/targets/nxos_snmp_user/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_snmp_user/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_snmp_user/tasks/cli.yaml b/test/integration/targets/nxos_snmp_user/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_snmp_user/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_snmp_user/tasks/main.yaml b/test/integration/targets/nxos_snmp_user/tasks/main.yaml
deleted file mode 100644
index fea9337c14..0000000000
--- a/test/integration/targets/nxos_snmp_user/tasks/main.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-# Use block to ensure that both cli and nxapi tests
-# will run even if there are failures or errors.
-- block:
- - { include: cli.yaml, tags: ['cli'] }
- always:
- - { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_snmp_user/tasks/nxapi.yaml b/test/integration/targets/nxos_snmp_user/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_snmp_user/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_snmp_user/tests/common/sanity.yaml b/test/integration/targets/nxos_snmp_user/tests/common/sanity.yaml
deleted file mode 100644
index ae09a4d071..0000000000
--- a/test/integration/targets/nxos_snmp_user/tests/common/sanity.yaml
+++ /dev/null
@@ -1,107 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_snmp_user sanity test"
-
-- set_fact: delete_last_user_allowed='true'
-- set_fact: delete_last_user_allowed='false'
- when: imagetag and (major_version is version_compare('9.1', 'ge'))
-- set_fact: delete_last_user_allowed='false'
- when: platform is search('N5K|N6K|N9K-F')
-
-- name: Remove snmp user
- nxos_snmp_user: &remove_snmp_user
- user: ntc
- state: absent
- ignore_errors: yes
- when: platform is not search('N5K|N6K|N9K-F')
-
-- name: Remove user workaround
- # Some platforms will not allow snmp_user to remove the last role
- nxos_user: &workaround_remove_user
- name: ntc
- state: absent
- ignore_errors: yes
- when: platform is search('N5K|N6K|N9K-F')
-
-- pause:
- seconds: 5
-
-- block:
- - name: Create snmp user
- nxos_snmp_user: &create
- user: ntc
- group: network-operator
- authentication: md5
- pwd: N$tOpe%1
- privacy: HelloU$er1
- encrypt: true
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: Add another group to user
- nxos_snmp_user: &chg
- user: ntc
- group: network-admin
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_snmp_user: *chg
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: Remove group from user
- nxos_snmp_user: &remg
- user: ntc
- group: network-admin
- state: absent
- register: result
-
- - assert: *true
-
- - pause:
- seconds: 5
-
- - name: "Check Idempotence"
- nxos_snmp_user: *remg
- register: result
-
- - assert: *false
-
- - block:
- # Some platforms will not allow snmp_user to remove the last role
- - name: delete snmp user
- nxos_snmp_user: &remove1
- user: ntc
- group: network-operator
- state: absent
- register: result
-
- - assert: *true
-
- - pause:
- seconds: 5
-
- - name: "Remove Idempotence"
- nxos_snmp_user: *remove1
- register: result
-
- - assert: *false
- when: delete_last_user_allowed
-
- always:
- - name: delete snmp user
- nxos_snmp_user: *remove_snmp_user
- when: platform is not search('N5K|N6K|N9K-F')
-
- - name: remove user workaround
- nxos_user: *workaround_remove_user
- when: platform is search('N5K|N6K|N9K-F')
-
-- debug: msg="END connection={{ ansible_connection }} nxos_snmp_user sanity test"
diff --git a/test/integration/targets/nxos_static_route/defaults/main.yaml b/test/integration/targets/nxos_static_route/defaults/main.yaml
deleted file mode 100644
index 525b7aab90..0000000000
--- a/test/integration/targets/nxos_static_route/defaults/main.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-testcase: "*"
-vrfs:
- - default
- - myvrf
diff --git a/test/integration/targets/nxos_static_route/meta/main.yml b/test/integration/targets/nxos_static_route/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_static_route/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_static_route/tasks/cli.yaml b/test/integration/targets/nxos_static_route/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_static_route/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_static_route/tasks/main.yaml b/test/integration/targets/nxos_static_route/tasks/main.yaml
deleted file mode 100644
index fea9337c14..0000000000
--- a/test/integration/targets/nxos_static_route/tasks/main.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-# Use block to ensure that both cli and nxapi tests
-# will run even if there are failures or errors.
-- block:
- - { include: cli.yaml, tags: ['cli'] }
- always:
- - { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_static_route/tasks/nxapi.yaml b/test/integration/targets/nxos_static_route/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_static_route/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_static_route/tests/common/sanity.yaml b/test/integration/targets/nxos_static_route/tests/common/sanity.yaml
deleted file mode 100644
index f07fefb40a..0000000000
--- a/test/integration/targets/nxos_static_route/tests/common/sanity.yaml
+++ /dev/null
@@ -1,195 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_static_route sanity test"
-
-# Flag used to test the track feature. Some platforms
-# don't support it so this flag will be toggled accordingly.
-- set_fact: test_track_feature="true"
-
-- name: configure track
- nxos_config:
- lines:
- - track 1 ip sla 1
- register: cmd_result
- ignore_errors: yes
-
-- debug: msg="cmd result {{ cmd_result }}"
-
-- set_fact: test_track_feature="false"
- when: cmd_result.failed
-
-- debug: msg="Test Track Feature {{ test_track_feature }}"
-
-- name: Setup and teardown, remove test routes if present
- nxos_static_route: &setup_teardown
- aggregate:
- - { prefix: "192.168.1.164/32", next_hop: "192.0.2.3" }
- - { prefix: "192.168.20.64/24", next_hop: "192.0.2.3" }
- - { prefix: "192.168.22.64/24", next_hop: "192.0.2.3" }
- - { prefix: "192.168.24.64/24", next_hop: "192.0.2.3" }
- vrf: "{{ item }}"
- state: absent
- with_items: "{{ vrfs }}"
- ignore_errors: yes
-
-- name: Setup noise routes to ensure testing while non-test routes present
- nxos_static_route:
- prefix: "192.168.1.164/32"
- next_hop: "192.0.2.3"
- vrf: "{{ item }}"
- state: present
- with_items: "{{ vrfs }}"
-
-- block:
- - name: create static route
- nxos_static_route: &configure_static
- prefix: "192.168.20.64/24"
- next_hop: "192.0.2.3"
- route_name: testing
- pref: 100
- tag: 5500
- vrf: "{{ item }}"
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Conf static Idempotence"
- nxos_static_route: *configure_static
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: change static route
- nxos_static_route: &change_static
- prefix: "192.168.20.64/24"
- next_hop: "192.0.2.3"
- route_name: default
- pref: 10
- tag: default
- vrf: "{{ item }}"
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Change Idempotence"
- nxos_static_route: *change_static
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *false
-
- - name: configure static route with track
- nxos_static_route: &config_static_track
- prefix: "192.168.20.64/24"
- next_hop: "192.0.2.3"
- route_name: default
- pref: 10
- tag: default
- track: 1
- vrf: "{{ item }}"
- with_items: "{{ vrfs }}"
- register: result
- when: test_track_feature
-
- - assert: *true
- when: test_track_feature
-
- - name: "Config track Idempotence"
- nxos_static_route: *config_static_track
- with_items: "{{ vrfs }}"
- register: result
- when: test_track_feature
-
- - assert: *false
- when: test_track_feature
-
- - name: configure static route with not configured track
- nxos_static_route:
- prefix: "192.168.20.64/24"
- next_hop: "192.0.2.3"
- route_name: default
- pref: 10
- tag: default
- track: 2
- vrf: "{{ item }}"
- with_items: "{{ vrfs }}"
- register: result
- ignore_errors: yes
- when: test_track_feature
-
- - assert:
- that:
- - "result.failed == True"
- when: test_track_feature
-
- - name: remove static route
- nxos_static_route: &remove_static
- prefix: "192.168.20.64/24"
- next_hop: "192.0.2.3"
- route_name: testing
- pref: 100
- vrf: "{{ item }}"
- state: absent
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *true
-
- - name: "Remove Idempotence"
- nxos_static_route: *remove_static
- with_items: "{{ vrfs }}"
- register: result
-
- - assert: *false
-
- - name: configure static route(aggregate)
- nxos_static_route: &conf_agg
- aggregate:
- - { prefix: "192.168.22.64/24", next_hop: "192.0.2.3" }
- - { prefix: "192.168.24.64/24", next_hop: "192.0.2.3" }
- register: result
-
- - assert: *true
-
- - name: configure static route aggregate(Idempotence)
- nxos_static_route: *conf_agg
- register: result
-
- - assert: *false
-
- - name: remove static route aggregate
- nxos_static_route: &remove_agg
- aggregate:
- - { prefix: "192.168.22.64/24", next_hop: "192.0.2.3" }
- - { prefix: "192.168.24.64/24", next_hop: "192.0.2.3" }
- state: absent
- register: result
-
- - assert: *true
-
- - name: remove static route aggregate(Idempotence)
- nxos_static_route: *remove_agg
- register: result
-
- - assert: *false
-
- always:
- - name: remove track
- nxos_config:
- lines:
- - no track 1
- ignore_errors: yes
- when: test_track_feature
-
- - name: teardown test routes
- nxos_static_route: *setup_teardown
- with_items: "{{ vrfs }}"
- ignore_errors: yes
-
-- debug: msg="END connection={{ ansible_connection }} nxos_static_route sanity test"
diff --git a/test/integration/targets/nxos_system/defaults/main.yaml b/test/integration/targets/nxos_system/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_system/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_system/meta/main.yml b/test/integration/targets/nxos_system/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_system/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_system/tasks/cli.yaml b/test/integration/targets/nxos_system/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_system/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_system/tasks/main.yaml b/test/integration/targets/nxos_system/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_system/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_system/tasks/nxapi.yaml b/test/integration/targets/nxos_system/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_system/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_system/tests/cli/net_system.yaml b/test/integration/targets/nxos_system/tests/cli/net_system.yaml
deleted file mode 100644
index 483bcfdaec..0000000000
--- a/test/integration/targets/nxos_system/tests/cli/net_system.yaml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-- debug: msg="START nxos 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
- nxos_config:
- lines:
- - no ip domain-list ansible.com
- - no ip domain-list redhat.com
- match: none
-
-- name: configure domain_list using platform agnostic module
- net_system:
- domain_search:
- - ansible.com
- - redhat.com
- register: result
-
-- assert:
- that:
- - result.changed == true
- - "'ip domain-list ansible.com' in result.commands"
- - "'ip domain-list redhat.com' in result.commands"
-
-- name: setup
- nxos_config:
- lines:
- - no ip domain-list ansible.com
- - no ip domain-list redhat.com
- match: none
-
-- debug: msg="END nxos cli/net_system.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_system/tests/cli/set_domain_list.yaml b/test/integration/targets/nxos_system/tests/cli/set_domain_list.yaml
deleted file mode 100644
index 6884b79f8b..0000000000
--- a/test/integration/targets/nxos_system/tests/cli/set_domain_list.yaml
+++ /dev/null
@@ -1,112 +0,0 @@
----
-- debug: msg="START cli/set_domain_list.yaml"
-
-- name: setup
- nxos_config:
- lines:
- - no ip domain-list ansible.com
- - no ip domain-list redhat.com
- match: none
-
-- name: configure domain_list
- nxos_system:
- domain_search:
- - ansible.com
- - redhat.com
- 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_list
- nxos_system:
- domain_search:
- - ansible.com
- - redhat.com
- register: result
-
-- assert:
- that:
- - result.changed == false
-
-- name: remove one entry
- nxos_system:
- domain_search:
- - ansible.com
- register: result
-
-- assert:
- that:
- - result.changed == true
- - "'no ip domain-list redhat.com' in result.commands"
-
-- name: verify remove one entry
- nxos_system:
- domain_search:
- - ansible.com
- register: result
-
-- assert:
- that:
- - result.changed == false
-
-- name: add one entry
- nxos_system:
- domain_search:
- - ansible.com
- - redhat.com
- register: result
-
-- assert:
- that:
- - result.changed == true
- - "'ip domain-list redhat.com' in result.commands"
-
-- name: verify add one entry
- nxos_system:
- domain_search:
- - ansible.com
- - redhat.com
- register: result
-
-- assert:
- that:
- - result.changed == false
-
-- name: add and remove one entry
- nxos_system:
- domain_search:
- - ansible.com
- - eng.ansible.com
- 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
- nxos_system:
- domain_search:
- - ansible.com
- - eng.ansible.com
- register: result
-
-- assert:
- that:
- - result.changed == false
-
-- name: teardown
- nxos_config:
- lines:
- - no ip domain-list ansible.com
- - no ip domain-list redhat.com
- - no ip domain-list eng.ansible.com
- match: none
-
-- debug: msg="END cli/set_domain_search.yaml"
diff --git a/test/integration/targets/nxos_system/tests/cli/set_domain_name.yaml b/test/integration/targets/nxos_system/tests/cli/set_domain_name.yaml
deleted file mode 100644
index 3c64cd5b31..0000000000
--- a/test/integration/targets/nxos_system/tests/cli/set_domain_name.yaml
+++ /dev/null
@@ -1,32 +0,0 @@
----
-- debug: msg="START cli/set_domain_name.yaml"
-
-- name: setup
- nxos_config:
- lines: no ip domain-name eng.ansible.com
- match: none
-
-- name: configure domain_name
- nxos_system:
- domain_name: eng.ansible.com
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: verify domain_name
- nxos_system:
- domain_name: eng.ansible.com
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- nxos_config:
- lines: no ip domain-name eng.ansible.com
- match: none
-
-- debug: msg="END cli/set_domain_name.yaml"
diff --git a/test/integration/targets/nxos_system/tests/cli/set_name_servers.yaml b/test/integration/targets/nxos_system/tests/cli/set_name_servers.yaml
deleted file mode 100644
index a6bd35ab90..0000000000
--- a/test/integration/targets/nxos_system/tests/cli/set_name_servers.yaml
+++ /dev/null
@@ -1,100 +0,0 @@
----
-- debug: msg="START cli/set_name_servers.yaml"
-
-- name: setup
- nxos_config: &reset
- lines:
- - no ip name-server 192.0.2.1
- - no ip name-server 192.0.2.2
- - no ip name-server 192.0.2.3
- match: none
-
-- name: configure name_servers
- nxos_system:
- name_servers:
- - 192.0.2.1
- - 192.0.2.2
- - 192.0.2.3
- register: result
-
-- assert:
- that:
- - result.changed == true
- - "'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
- nxos_system:
- name_servers:
- - 192.0.2.1
- - 192.0.2.2
- - 192.0.2.3
- register: result
-
-- assert:
- that:
- - result.changed == false
-
-#- name: change to vrf
-# nxos_system:
-# name_servers:
-# - 192.0.2.1
-# - { server: 192.0.2.2, vrf: ansible }
-# - 192.0.2.3
-# 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
-# nxos_system:
-# name_servers:
-# - 192.0.2.1
-# - { server: 192.0.2.2, vrf: ansible }
-# - 192.0.2.3
-# register: result
-#
-#- assert:
-# that:
-# - result.changed == false
-
-- name: remove one
- nxos_system:
- name_servers:
- - 192.0.2.1
- - 192.0.2.2
- register: result
-
-- assert:
- that:
- - result.changed == true
- - result.commands|length == 1
- - "'no ip name-server 192.0.2.3' in result.commands"
-
-- name: default name server
- nxos_system: &defns
- name_servers: default
- register: result
-
-- assert:
- that:
- - result.changed == true
-
-- name: Idempotent check
- nxos_system: *defns
- register: result
-
-- assert:
- that:
- - result.changed == false
-
-- name: teardown
- nxos_config: *reset
- ignore_errors: yes
-
-- debug: msg="END cli/set_name_servers.yaml"
diff --git a/test/integration/targets/nxos_system/tests/common/sanity.yaml b/test/integration/targets/nxos_system/tests/common/sanity.yaml
deleted file mode 100644
index 74d8843226..0000000000
--- a/test/integration/targets/nxos_system/tests/common/sanity.yaml
+++ /dev/null
@@ -1,126 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }}/sanity.yaml"
-
-- block:
- - name: remove configuration
- nxos_system: &remove
- state: absent
- register: result
- ignore_errors: yes
-
- - name: configure domain lookup
- nxos_system: &dlo
- domain_lookup: true
- state: present
- register: result
-
- - name: configure hostname and domain-name
- nxos_system: &hostname
- hostname: switch
- domain_name: test.example.com
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: Idempotence check
- nxos_system: *hostname
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: configure name servers
- nxos_system: &ns
- name_servers:
- - 8.8.8.8
- - 8.8.4.4
- register: result
-
- - assert: *true
-
- - name: Idempotence check
- nxos_system: *ns
- register: result
-
- - assert: *false
-
- - name: configure name servers with VRF support
- nxos_system: &nsv
- name_servers:
- - { server: 8.8.8.8, vrf: management }
- - { server: 8.8.4.4, vrf: management }
- register: result
-
- - assert: *true
-
- - name: Idempotence check
- nxos_system: *nsv
- register: result
-
- - assert: *false
-
- - name: configure domain lookup1
- nxos_system: &ndlo
- domain_lookup: false
- register: result
-
- - assert: *true
-
- - name: Idempotence check
- nxos_system: *ndlo
- register: result
-
- - assert: *false
-
- - name: configure domain lookup2
- nxos_system: *dlo
- register: result
-
- - assert: *true
-
- - name: Idempotence check
- nxos_system: *dlo
- register: result
-
- - assert: *false
-
- - name: configure system mtu
- nxos_system: &sysmtu
- system_mtu: 3000
- register: result
-
- - assert: *true
-
- - name: Idempotence check
- nxos_system: *sysmtu
- register: result
-
- - assert: *false
-
- - name: default configuration
- nxos_system: &default
- hostname: default
- domain_name: default
- name_servers: default
- system_mtu: default
- register: result
-
- - assert: *true
-
- - name: Idempotence check
- nxos_system: *default
- register: result
-
- - assert: *false
-
- always:
- - name: remove configuration
- nxos_system: *remove
-
- - name: Re-configure hostname
- nxos_system: *hostname
-
- - debug: msg="END connection={{ ansible_connection }}/sanity.yaml"
diff --git a/test/integration/targets/nxos_system/tests/common/set_hostname.yaml b/test/integration/targets/nxos_system/tests/common/set_hostname.yaml
deleted file mode 100644
index da9090a7a8..0000000000
--- a/test/integration/targets/nxos_system/tests/common/set_hostname.yaml
+++ /dev/null
@@ -1,35 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }}/set_hostname.yaml"
-
-- block:
- - name: setup
- nxos_config:
- lines: "hostname switch"
- match: none
-
- - name: configure hostname
- nxos_system:
- hostname: foo
- register: result
-
- - assert:
- that:
- - "result.changed == true"
-
- - name: verify hostname
- nxos_system:
- hostname: foo
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- always:
- - name: teardown
- nxos_config:
- lines: "hostname switch"
- match: none
-
-
- - debug: msg="END connection={{ ansible_connection }}/set_hostname.yaml"
diff --git a/test/integration/targets/nxos_system/tests/nxapi/net_system.yaml b/test/integration/targets/nxos_system/tests/nxapi/net_system.yaml
deleted file mode 100644
index e7810f7fc5..0000000000
--- a/test/integration/targets/nxos_system/tests/nxapi/net_system.yaml
+++ /dev/null
@@ -1,35 +0,0 @@
----
-- debug: msg="START nxos nxapi/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
- nxos_config:
- lines:
- - no ip domain-list ansible.com
- - no ip domain-list redhat.com
- match: none
- ignore_errors: yes
-
-- name: configure domain_list using platform agnostic module
- net_system:
- domain_search:
- - ansible.com
- - redhat.com
- register: result
-
-- assert:
- that:
- - result.changed == true
- - "'ip domain-list ansible.com' in result.commands"
- - "'ip domain-list redhat.com' in result.commands"
-
-- name: setup
- nxos_config:
- lines:
- - no ip domain-list ansible.com
- - no ip domain-list redhat.com
- match: none
-
-- debug: msg="END nxos nxapi/net_system.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/nxos_system/tests/nxapi/set_domain_list.yaml b/test/integration/targets/nxos_system/tests/nxapi/set_domain_list.yaml
deleted file mode 100644
index d22736c2e6..0000000000
--- a/test/integration/targets/nxos_system/tests/nxapi/set_domain_list.yaml
+++ /dev/null
@@ -1,121 +0,0 @@
----
-- debug: msg="START nxapi/set_domain_list.yaml"
-
-
-# nxapi will error if you try and remove a non-existent entry,
-# Therefore we do this as a with_items loop with ignore_errors
-- name: setup
- nxos_config:
- lines:
- - no ip domain-list {{ item }}
- match: none
- ignore_errors: yes
- with_items:
- - ansible.com
- - redhat.com
-
-- name: configure domain_list
- nxos_system:
- domain_search:
- - ansible.com
- - redhat.com
- 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_list
- nxos_system:
- domain_search:
- - ansible.com
- - redhat.com
- register: result
-
-- assert:
- that:
- - result.changed == false
-
-- name: remove one entry
- nxos_system:
- domain_search:
- - ansible.com
- register: result
-
-- assert:
- that:
- - result.changed == true
- - "'no ip domain-list redhat.com' in result.commands"
-
-- name: verify remove one entry
- nxos_system:
- domain_search:
- - ansible.com
- register: result
-
-- assert:
- that:
- - result.changed == false
-
-- name: add one entry
- nxos_system:
- domain_search:
- - ansible.com
- - redhat.com
- register: result
-
-- assert:
- that:
- - result.changed == true
- - "'ip domain-list redhat.com' in result.commands"
-
-- name: verify add one entry
- nxos_system:
- domain_search:
- - ansible.com
- - redhat.com
- register: result
-
-- assert:
- that:
- - result.changed == false
-
-- name: add and remove one entry
- nxos_system:
- domain_search:
- - ansible.com
- - eng.ansible.com
- 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
- nxos_system:
- domain_search:
- - ansible.com
- - eng.ansible.com
- register: result
-
-- assert:
- that:
- - result.changed == false
-
-- name: teardown
- nxos_config:
- lines:
- - no ip domain-list {{ item }}
- match: none
- ignore_errors: yes
- with_items:
- - ansible.com
- - redhat.com
- - eng.ansible.com
-
-- debug: msg="END nxapi/set_domain_search.yaml"
diff --git a/test/integration/targets/nxos_system/tests/nxapi/set_domain_name.yaml b/test/integration/targets/nxos_system/tests/nxapi/set_domain_name.yaml
deleted file mode 100644
index 13adfcbf4b..0000000000
--- a/test/integration/targets/nxos_system/tests/nxapi/set_domain_name.yaml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-- debug: msg="START nxapi/set_domain_name.yaml"
-
-- name: setup
- nxos_config:
- lines: no ip domain-name eng.ansible.com
- match: none
-# NXAPI errors if you try to remove something that doesn't exist
- ignore_errors: yes
-
-- name: configure domain_name
- nxos_system:
- domain_name: eng.ansible.com
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: verify domain_name
- nxos_system:
- domain_name: eng.ansible.com
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- nxos_config:
- lines: no ip domain-name eng.ansible.com
- match: none
-
-- debug: msg="END nxapi/set_domain_name.yaml"
diff --git a/test/integration/targets/nxos_system/tests/nxapi/set_name_servers.yaml b/test/integration/targets/nxos_system/tests/nxapi/set_name_servers.yaml
deleted file mode 100644
index 7baaa7e9f5..0000000000
--- a/test/integration/targets/nxos_system/tests/nxapi/set_name_servers.yaml
+++ /dev/null
@@ -1,110 +0,0 @@
----
-- debug: msg="START nxapi/set_name_servers.yaml"
-
-
-# nxapi will error if you try and remove a non-existent entry,
-# Therefore we do this as a with_items loop with ignore_errors
-- name: setup
- nxos_config: &reset
- lines:
- - no ip name-server {{ item }}
- match: none
- ignore_errors: yes
- with_items:
- - 192.0.2.1
- - 192.0.2.2
- - 192.0.2.3
-
-- name: configure name_servers
- nxos_system:
- name_servers:
- - 192.0.2.1
- - 192.0.2.2
- - 192.0.2.3
- register: result
-
-- assert:
- that:
- - result.changed == true
- - "'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
- nxos_system:
- name_servers:
- - 192.0.2.1
- - 192.0.2.2
- - 192.0.2.3
- register: result
-
-- assert:
- that:
- - result.changed == false
-
-#- name: change to vrf
-# nxos_system:
-# name_servers:
-# - 192.0.2.1
-# - { server: 192.0.2.2, vrf: ansible }
-# - 192.0.2.3
-# 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
-# nxos_system:
-# name_servers:
-# - 192.0.2.1
-# - { server: 192.0.2.2, vrf: ansible }
-# - 192.0.2.3
-# register: result
-#
-#- assert:
-# that:
-# - result.changed == false
-
-- name: remove one
- nxos_system:
- name_servers:
- - 192.0.2.1
- - 192.0.2.2
- register: result
-
-- assert:
- that:
- - result.changed == true
- - result.commands|length == 1
- - "'no ip name-server 192.0.2.3' in result.commands"
-
-- name: default name server
- nxos_system: &defns
- name_servers: default
- register: result
-
-- assert:
- that:
- - result.changed == true
-
-- name: Idempotent check
- nxos_system: *defns
- register: result
-
-- assert:
- that:
- - result.changed == false
-
-- name: teardown
- nxos_config: *reset
- with_items:
- - 192.0.2.1
- - 192.0.2.2
- - 192.0.2.3
- ignore_errors: yes
-
-- debug: msg="END nxapi/set_name_servers.yaml"
diff --git a/test/integration/targets/nxos_telemetry/defaults/main.yaml b/test/integration/targets/nxos_telemetry/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_telemetry/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_telemetry/meta/main.yml b/test/integration/targets/nxos_telemetry/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_telemetry/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_telemetry/tasks/cli.yaml b/test/integration/targets/nxos_telemetry/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_telemetry/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_telemetry/tasks/main.yaml b/test/integration/targets/nxos_telemetry/tasks/main.yaml
deleted file mode 100644
index c070015619..0000000000
--- a/test/integration/targets/nxos_telemetry/tasks/main.yaml
+++ /dev/null
@@ -1,18 +0,0 @@
----
-- set_fact: run_test="true"
-
-# Telemetry module only supported on N9k
-- set_fact: run_test="false"
- when: platform is not search("N9K")
-
-# Telemetry module not supported on versions earlier then 7.0(3)I7(x)
-- set_fact: run_test="false"
- when: imagetag is search("I2|I3|I4|I5|I6")
-
-- include: cli.yaml
- tags: 'cli'
- when: run_test
-# Uncomment below when nxapi is supported for resource module builder modules
-# - include: nxapi.yaml
-# tags: 'nxapi'
-# when: run_test
diff --git a/test/integration/targets/nxos_telemetry/tasks/nxapi.yaml b/test/integration/targets/nxos_telemetry/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_telemetry/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_telemetry/tests/common/deleted.yaml b/test/integration/targets/nxos_telemetry/tests/common/deleted.yaml
deleted file mode 100644
index 6e6875f644..0000000000
--- a/test/integration/targets/nxos_telemetry/tests/common/deleted.yaml
+++ /dev/null
@@ -1,93 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_telemetry deleted sanity test"
-
-- set_fact: source_interface="Loopback55"
- when: imagetag and (major_version is version_compare('9.1', 'ge'))
-
-- set_fact: before_keys_length=6
-- set_fact: before_keys_length=7
- when: imagetag and (major_version is version_compare('9.1', 'ge'))
-
-- name: Setup
- nxos_feature: &setup_teardown
- feature: telemetry
- state: disabled
- ignore_errors: yes
-
-- name: Setup - Configure Telemetry
- nxos_telemetry:
- state: 'merged'
- config:
- certificate:
- key: /bootflash/server.key
- hostname: localhost
- compression: gzip
- source_interface: "{{source_interface|default(omit)}}"
- vrf: management
- destination_groups:
- - id: 2
- destination:
- ip: 192.168.0.1
- port: 50001
- protocol: grpc
- encoding: gpb
- - { id: 2, destination: {ip: 192.168.0.2, port: 60001, protocol: gRPC, encoding: GPB}}
- - { id: 10, destination: {ip: 192.168.0.1, port: 50001, protocol: Grpc, encoding: gPB}}
- - { id: 10, destination: {ip: 192.168.0.2, port: 60001, protocol: gRPC, encoding: gpb}}
- sensor_groups:
- - { id: 8, data_source: NX-API, path: {name: '"show bgp l2vpn evpn summary"', depth: 0, query_condition: foo, filter_condition: foo}}
- - { id: 2, data_source: NX-API, path: {name: '"show ip bgp neighbors"', depth: unbounded, query_condition: foo, filter_condition: foo}}
- - { id: 55, data_source: DME, path: {name: 'sys/bgp/inst/dom-default/peer-[10.10.10.11]/ent-[10.10.10.11]', depth: 0, query_condition: foo, filter_condition: foo}}
- - { id: 55, data_source: DME, path: {name: sys/ospf, depth: 0, query_condition: foo, filter_condition: 'or(eq(ethpmPhysIf.operSt,"down"),eq(ethpmPhysIf.operSt,"up"))'}}
- subscriptions:
- - { id: 44, destination_group: 10, sensor_group: {id: 8, sample_interval: 2000}}
- - { id: 44, destination_group: 2, sensor_group: {id: 2, sample_interval: 2000}}
- - { id: 55, destination_group: 10, sensor_group: {id: 55, sample_interval: 2000}}
-
-- block:
- - name: Gather Telemetry Facts Before Changes
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources:
- - telemetry
-
- - name: Telemetry - deleted
- nxos_telemetry: &deleted
- state: 'deleted'
- register: result
-
- # result.before|dict2items|length checks the number of dictionary keys.
- - assert:
- that:
- - "result.changed == true"
- - "'no telemetry' in result.commands"
- - "result.before|dict2items|length == {{ before_keys_length }}"
-
- - assert:
- that:
- - "(ansible_facts.network_resources.telemetry|dict2items)|symmetric_difference(result.before|dict2items)|length == 0"
-
- - name: Gather Telemetry Facts After Changes
- nxos_facts: *facts
-
- - assert:
- that:
- - "(ansible_facts.network_resources.telemetry|dict2items)|symmetric_difference(result.after|dict2items)|length == 0"
-
- - name: Telemetry - deleted - idempotence
- nxos_telemetry: *deleted
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: Teardown
- nxos_feature: *setup_teardown
- ignore_errors: yes
-
- - debug: msg="END connection={{ ansible_connection }} nxos_telemetry deleted sanity test"
diff --git a/test/integration/targets/nxos_telemetry/tests/common/merged.yaml b/test/integration/targets/nxos_telemetry/tests/common/merged.yaml
deleted file mode 100644
index 6b280e3fa3..0000000000
--- a/test/integration/targets/nxos_telemetry/tests/common/merged.yaml
+++ /dev/null
@@ -1,184 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_telemetry merged sanity test"
-
-- set_fact: source_interface="Loopback55"
- when: imagetag and (major_version is version_compare('9.1', 'ge'))
-
-- set_fact: command_list_length=30
-- set_fact: command_list_length=31
- when: imagetag and (major_version is version_compare('9.1', 'ge'))
-
-- name: Setup
- nxos_feature: &setup_teardown
- feature: telemetry
- state: disabled
- ignore_errors: yes
-
-- block:
- - name: Gather Telemetry Facts Before Changes
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources:
- - telemetry
-
- - name: Telemetry - merged
- nxos_telemetry: &merged
- state: 'merged'
- config:
- certificate:
- key: /bootflash/server.key
- hostname: localhost
- compression: gzip
- source_interface: "{{source_interface|default(omit)}}"
- vrf: management
- destination_groups:
- - id: 2
- destination:
- ip: 192.168.0.1
- port: 50001
- protocol: grpc
- encoding: gpb
- - { id: 2, destination: {ip: 192.168.0.2, port: 60001, protocol: gRPC, encoding: GPB}}
- - { id: 10, destination: {ip: 192.168.0.1, port: 50001, protocol: Grpc, encoding: gPB}}
- - { id: 10, destination: {ip: 192.168.0.2, port: 60001, protocol: gRPC, encoding: gpb}}
- sensor_groups:
- - { id: 8, data_source: NX-API, path: {name: '"show bgp l2vpn evpn summary"', depth: 0, query_condition: foo, filter_condition: foo}}
- - { id: 2, data_source: NX-API, path: {name: '"show ip bgp neighbors"', depth: unbounded, query_condition: foo, filter_condition: foo}}
- - { id: 55, data_source: DME, path: {name: 'sys/bgp/inst/dom-default/peer-[10.10.10.11]/ent-[10.10.10.11]', depth: 0, query_condition: foo, filter_condition: foo}}
- - { id: 55, data_source: DME, path: {name: sys/ospf, depth: 0, query_condition: foo, filter_condition: 'or(eq(ethpmPhysIf.operSt,"down"),eq(ethpmPhysIf.operSt,"up"))'}}
- subscriptions:
- - { id: 44, destination_group: 10, sensor_group: {id: 8, sample_interval: 2000}}
- - { id: 44, destination_group: 2, sensor_group: {id: 2, sample_interval: 2000}}
- - { id: 55, destination_group: 10, sensor_group: {id: 55, sample_interval: 2000}}
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "result.before|length == 0"
- - "'feature telemetry' in result.commands"
- - "'telemetry' in result.commands"
- - "'certificate /bootflash/server.key localhost' in result.commands"
- - "'destination-profile' in result.commands"
- - "'use-compression gzip' in result.commands"
- - "'use-vrf management' in result.commands"
- - "'destination-group 2' in result.commands"
- - "'ip address 192.168.0.1 port 50001 protocol grpc encoding gpb' in result.commands"
- - "'ip address 192.168.0.2 port 60001 protocol grpc encoding gpb' in result.commands"
- - "'destination-group 10' in result.commands"
- - "'ip address 192.168.0.1 port 50001 protocol grpc encoding gpb' in result.commands"
- - "'ip address 192.168.0.2 port 60001 protocol grpc encoding gpb' in result.commands"
- - "'sensor-group 8' in result.commands"
- - "'data-source NX-API' in result.commands"
- - result.commands is search("path .*show bgp l2vpn evpn summary.* depth 0 query-condition foo filter-condition foo")
- - "'sensor-group 2' in result.commands"
- - "'data-source NX-API' in result.commands"
- - result.commands is search("path .*show ip bgp neighbors.* depth unbounded query-condition foo filter-condition foo")
- - "'sensor-group 55' in result.commands"
- - "'data-source DME' in result.commands"
- - "'path sys/bgp/inst/dom-default/peer-[10.10.10.11]/ent-[10.10.10.11] depth 0 query-condition foo filter-condition foo' in result.commands"
- - "'path sys/ospf depth 0 query-condition foo filter-condition or(eq(ethpmPhysIf.operSt,\"down\"),eq(ethpmPhysIf.operSt,\"up\"))' in result.commands"
- - "'subscription 44' in result.commands"
- - "'dst-grp 10' in result.commands"
- - "'dst-grp 2' in result.commands"
- - "'snsr-grp 8 sample-interval 2000' in result.commands"
- - "'snsr-grp 2 sample-interval 2000' in result.commands"
- - "'subscription 55' in result.commands"
- - "'dst-grp 10' in result.commands"
- - "'snsr-grp 55 sample-interval 2000' in result.commands"
- - "result.commands|length == {{ command_list_length }}"
-
- # Source interface may or may not be included based on the image version.
- - assert:
- that:
- - "'source-interface loopback55' in result.commands"
- when: imagetag and (major_version is version_compare('9.1', 'ge'))
-
- - assert:
- that:
- - "(ansible_facts.network_resources.telemetry|dict2items)|symmetric_difference(result.before|dict2items)|length == 0"
-
- - name: Gather Telemetry Facts After Changes
- nxos_facts: *facts
-
- - assert:
- that:
- - "(ansible_facts.network_resources.telemetry|dict2items)|symmetric_difference(result.after|dict2items)|length == 0"
-
- - name: Telemetry - merged - idempotence
- nxos_telemetry: *merged
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- - name: Telemetry - change values
- nxos_telemetry: &merged_change
- state: 'merged'
- config:
- certificate:
- key: /bootflash/local_server.key
- hostname: localhost
- compression: gzip
- source_interface: "{{source_interface|default(omit)}}"
- vrf: management
- destination_groups:
- - id: 2
- destination:
- ip: 192.168.0.1
- port: 50001
- protocol: grpc
- encoding: gpb
- - { id: 2, destination: {ip: 192.168.0.2, port: 60001, protocol: gRPC, encoding: GPB}}
- - { id: 10, destination: {ip: 192.168.0.1, port: 50001, protocol: Grpc, encoding: gPB}}
- - { id: 10, destination: {ip: 192.168.0.2, port: 60001, protocol: gRPC, encoding: gpb}}
- sensor_groups:
- - { id: 8, data_source: NX-API, path: {name: '"show bgp l2vpn evpn summary"', depth: 0, query_condition: foo, filter_condition: foo}}
- - { id: 2, data_source: NX-API, path: {name: '"show ip bgp neighbors"', depth: unbounded, query_condition: foo, filter_condition: foo}}
- - { id: 55, data_source: DME, path: {name: 'sys/bgp/inst/dom-default/peer-[10.10.10.11]/ent-[10.10.10.11]', depth: 0, query_condition: foo, filter_condition: foo}}
- - { id: 55, data_source: DME, path: {name: sys/ospf, depth: 0, query_condition: foo, filter_condition: 'or(eq(ethpmPhysIf.operSt,"down"),eq(ethpmPhysIf.operSt,"up"))'}}
- subscriptions:
- - { id: 44, destination_group: 10, sensor_group: {id: 8, sample_interval: 1000}}
- - { id: 44, destination_group: 2, sensor_group: {id: 2, sample_interval: 2000}}
- - { id: 55, destination_group: 10, sensor_group: {id: 55, sample_interval: 2000}}
- register: result
-
- # The step above should result in only the following changes:
- # "commands": [
- # "telemetry",
- # "certificate /bootflash/local_server.key localhost",
- # "subscription 44",
- # "snsr-grp 8 sample-interval 1000"
- # ],
-
- - set_fact:
- test_list:
- - "telemetry"
- - "certificate /bootflash/local_server.key localhost"
- - "subscription 44"
- - "snsr-grp 8 sample-interval 1000"
-
- - assert:
- that:
- - "result.changed == true"
- - "test_list|symmetric_difference(result.commands)|length == 0"
-
- - name: Telemetry - change values - idempotent
- nxos_telemetry: *merged_change
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: Teardown
- nxos_feature: *setup_teardown
- ignore_errors: yes
-
- - debug: msg="END connection={{ ansible_connection }} nxos_telemetry merged sanity test"
diff --git a/test/integration/targets/nxos_telemetry/tests/common/replaced.yaml b/test/integration/targets/nxos_telemetry/tests/common/replaced.yaml
deleted file mode 100644
index 6ddcaaad8d..0000000000
--- a/test/integration/targets/nxos_telemetry/tests/common/replaced.yaml
+++ /dev/null
@@ -1,190 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_telemetry replaced sanity test"
-
-- set_fact: source_interface="Loopback55"
- when: imagetag and (major_version is version_compare('9.1', 'ge'))
-
-- set_fact: command_list_length=27
-- set_fact: command_list_length=28
- when: imagetag and (major_version is version_compare('9.1', 'ge'))
-
-- set_fact: dict_facts_length=6
-- set_fact: dict_facts_length=7
- when: imagetag and (major_version is version_compare('9.1', 'ge'))
-
-- name: Setup - disable feature telemetry
- nxos_feature: &setup_teardown
- feature: telemetry
- state: disabled
- ignore_errors: yes
-
-- name: Setup - enable feature telemetry
- nxos_feature:
- feature: telemetry
- state: enabled
-
-- name: Setup - add initial telemetry config
- cli_config:
- config: |
- telemetry
- certificate test_cert host.example.com
- destination-profile
- use-vrf blue
- use-compression gzip
- destination-group 2
- ip address 192.168.0.1 port 50001 protocol gRPC encoding GPB
- ip address 192.168.0.2 port 60001 protocol gRPC encoding GPB
- destination-group 10
- ip address 192.168.0.1 port 50001 protocol gRPC encoding GPB
- ip address 192.168.0.2 port 60001 protocol gRPC encoding GPB
- ip address 192.168.1.1 port 55 protocol HTTP encoding JSON
- ip address 192.168.1.2 port 100 protocol gRPC encoding GPB
- destination-group 99
- sensor-group 2
- data-source NX-API
- path "show bgp l2vpn evpn summary" depth unbounded query-condition foo filter-condition foo
- sensor-group 8
- data-source NX-API
- path "show ip bgp neighbors" depth 0 query-condition foo filter-condition foo
- sensor-group 55
- data-source DME
- path sys/bgp/inst/dom-default/peer-[10.10.10.11]/ent-[10.10.10.11] depth 0 query-condition foo filter-condition foo
- path sys/ospf depth 0 query-condition foo filter-condition or(eq(ethpmPhysIf.operSt,"down"),eq(ethpmPhysIf.operSt,"up"))
- sensor-group 77
- subscription 44
- dst-grp 2
- dst-grp 10
- snsr-grp 2 sample-interval 2000
- snsr-grp 8 sample-interval 2000
- subscription 55
- dst-grp 10
- snsr-grp 55 sample-interval 2000
- subscription 99
- dst-grp 2
- dst-grp 99
- snsr-grp 8 sample-interval 90000
- snsr-grp 77 sample-interval 2000
-- name: Setup - add initial source-interface telemetry config
- cli_config:
- config: |
- telemetry
- destination-profile
- source-interface loopback55
- when: imagetag and (major_version is version_compare('9.1', 'ge'))
-
-- block:
- - name: Gather Telemetry Facts Before Changes
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources:
- - telemetry
-
- - name: Telemetry - replaced
- nxos_telemetry: &replace
- state: 'replaced'
- config:
- certificate:
- key: /file_dir/new_server.key
- hostname: newhost.example.com
- vrf: management
- compression: gzip
- destination_groups:
- - id: 2
- destination:
- ip: 192.168.0.1
- port: 65001
- protocol: grpc
- encoding: gpb
- - id: 2
- destination:
- ip: 192.168.0.3
- port: 55001
- protocol: grpc
- encoding: gpb
- sensor_groups:
- - id: 100
- data_source: NX-API
- path:
- name: '"show bgp l2vpn evpn summary"'
- depth: unbounded
- query_condition: foo
- filter_condition: foo
- subscriptions:
- - id: 99
- destination_group: 2
- sensor_group:
- id: 100
- sample_interval: 2000
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "result.before|length == {{ dict_facts_length }}"
- - "result.before.certificate|length == 2"
- - "result.before.destination_groups|length == 7"
- - "result.before.sensor_groups|length == 8"
- - "result.before.subscriptions|length == 10"
- - "'telemetry' in result.commands"
- - "'no subscription 55' in result.commands"
- - "'subscription 99' in result.commands"
- - "'no dst-grp 99' in result.commands"
- - "'no snsr-grp 8 sample-interval 90000' in result.commands"
- - "'no snsr-grp 77 sample-interval 2000' in result.commands"
- - "'no subscription 44' in result.commands"
- - "'no sensor-group 55' in result.commands"
- - "'no sensor-group 8' in result.commands"
- - "'no sensor-group 2' in result.commands"
- - "'no sensor-group 77' in result.commands"
- - "'no destination-group 99' in result.commands"
- - "'no destination-group 10' in result.commands"
- - "'destination-group 2' in result.commands"
- - "'no ip address 192.168.0.1 port 50001 protocol grpc encoding gpb' in result.commands"
- - "'no ip address 192.168.0.2 port 60001 protocol grpc encoding gpb' in result.commands"
- - "'destination-group 2' in result.commands"
- - "'ip address 192.168.0.1 port 65001 protocol grpc encoding gpb' in result.commands"
- - "'ip address 192.168.0.3 port 55001 protocol grpc encoding gpb' in result.commands"
- - "'sensor-group 100' in result.commands"
- - result.commands is search("path .*show bgp l2vpn evpn summary.* depth unbounded query-condition foo filter-condition foo")
- - "'data-source NX-API' in result.commands"
- - "'subscription 99' in result.commands"
- - "'snsr-grp 100 sample-interval 2000' in result.commands"
- - "'certificate /file_dir/new_server.key newhost.example.com' in result.commands"
- - "'destination-profile' in result.commands"
- - "'use-vrf management' in result.commands"
- - "result.commands|length == {{ command_list_length }}"
-
- # Source interface may or may not be included based on the image version.
- - assert:
- that:
- - "'no source-interface loopback55' in result.commands"
- when: imagetag and (major_version is version_compare('9.1', 'ge'))
-
- - assert:
- that:
- - "(ansible_facts.network_resources.telemetry|dict2items)|symmetric_difference(result.before|dict2items)|length == 0"
-
- - name: Gather Telemetry Facts After Changes
- nxos_facts: *facts
-
- - assert:
- that:
- - "(ansible_facts.network_resources.telemetry|dict2items)|symmetric_difference(result.after|dict2items)|length == 0"
-
- - name: Telemetry - replaced - idempotence
- nxos_telemetry: *replace
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: Teardown
- nxos_feature: *setup_teardown
- ignore_errors: yes
-
- - debug: msg="END connection={{ ansible_connection }} nxos_telemetry replaced sanity test"
diff --git a/test/integration/targets/nxos_udld/defaults/main.yaml b/test/integration/targets/nxos_udld/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_udld/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_udld/meta/main.yml b/test/integration/targets/nxos_udld/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_udld/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_udld/tasks/cli.yaml b/test/integration/targets/nxos_udld/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_udld/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_udld/tasks/main.yaml b/test/integration/targets/nxos_udld/tasks/main.yaml
deleted file mode 100644
index fea9337c14..0000000000
--- a/test/integration/targets/nxos_udld/tasks/main.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-# Use block to ensure that both cli and nxapi tests
-# will run even if there are failures or errors.
-- block:
- - { include: cli.yaml, tags: ['cli'] }
- always:
- - { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_udld/tasks/nxapi.yaml b/test/integration/targets/nxos_udld/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_udld/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_udld/tests/common/sanity.yaml b/test/integration/targets/nxos_udld/tests/common/sanity.yaml
deleted file mode 100644
index 7430381137..0000000000
--- a/test/integration/targets/nxos_udld/tests/common/sanity.yaml
+++ /dev/null
@@ -1,92 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_udld sanity test"
-
-- set_fact: udld_run="true"
-- set_fact: udld_run="false"
- when: ((platform is search('N9K-F')) and (imagetag and (imagetag is version_compare('F3', 'lt'))))
-- set_fact: udld_run="false"
- when: titanium
-
-- block:
- - name: "Enable feature udld"
- nxos_feature:
- feature: udld
- state: enabled
-
- - name: Configure udld
- nxos_udld: &conf1
- aggressive: enabled
- msg_time: 20
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Check Idempotence"
- nxos_udld: *conf1
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: Reset udld
- nxos_udld:
- reset: True
-
- - name: Configure udld2
- nxos_udld: &conf2
- aggressive: disabled
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_udld: *conf2
- register: result
-
- - assert: *false
-
- - name: Configure udld3
- nxos_udld: &conf3
- msg_time: default
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_udld: *conf3
- register: result
-
- - assert: *false
-
- - name: Configure udld again
- nxos_udld: *conf1
- register: result
-
- - assert: *true
-
- - name: Remove udld config
- nxos_udld: &conf4
- state: absent
- register: result
-
- - assert: *true
-
- - name: "Check Idempotence"
- nxos_udld: *conf4
- register: result
-
- - assert: *false
-
- when: udld_run
-
- always:
- - name: "Disable udld"
- nxos_feature:
- feature: udld
- state: disabled
- ignore_errors: yes
-
-- debug: msg="END connection={{ ansible_connection }} nxos_udld sanity test"
diff --git a/test/integration/targets/nxos_udld_interface/defaults/main.yaml b/test/integration/targets/nxos_udld_interface/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_udld_interface/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_udld_interface/meta/main.yml b/test/integration/targets/nxos_udld_interface/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_udld_interface/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_udld_interface/tasks/cli.yaml b/test/integration/targets/nxos_udld_interface/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_udld_interface/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_udld_interface/tasks/main.yaml b/test/integration/targets/nxos_udld_interface/tasks/main.yaml
deleted file mode 100644
index fea9337c14..0000000000
--- a/test/integration/targets/nxos_udld_interface/tasks/main.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-# Use block to ensure that both cli and nxapi tests
-# will run even if there are failures or errors.
-- block:
- - { include: cli.yaml, tags: ['cli'] }
- always:
- - { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_udld_interface/tasks/nxapi.yaml b/test/integration/targets/nxos_udld_interface/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_udld_interface/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_udld_interface/tests/common/sanity.yaml b/test/integration/targets/nxos_udld_interface/tests/common/sanity.yaml
deleted file mode 100644
index 18893cba8a..0000000000
--- a/test/integration/targets/nxos_udld_interface/tests/common/sanity.yaml
+++ /dev/null
@@ -1,108 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_udld_interface sanity test"
-
-- set_fact: udld_run="true"
-- set_fact: udld_enable="true"
-- set_fact: udld_run="false"
- when: ((platform is search('N9K-F')) and (imagetag and (imagetag is version_compare('F3', 'lt'))))
-- set_fact: udld_run="false"
- when: titanium
-- set_fact: udld_enable="false"
- when: imagetag and (imagetag is version_compare('N1', 'eq'))
-
-# Select interface for test
-- set_fact: intname="{{ nxos_int1 }}"
-
-- block:
- - name: "Enable feature udld"
- nxos_feature:
- feature: udld
- state: enabled
-
- - name: "put the interface into default state"
- nxos_config:
- commands:
- - "default interface {{intname}}"
- match: none
-
- - name: ensure interface is configured to be in aggressive mode
- nxos_udld_interface: &conf1
- interface: "{{ intname }}"
- mode: aggressive
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Conf1 Idempotence"
- nxos_udld_interface: *conf1
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - block:
-
- - name: ensure interface has mode enabled
- nxos_udld_interface: &conf2
- interface: "{{ intname }}"
- mode: enabled
- state: present
- register: result
-
- - assert: *true
-
- - name: "Conf2 Idempotence"
- nxos_udld_interface: *conf2
- register: result
-
- - assert: *false
-
- - name: ensure interface has mode aggressive
- nxos_udld_interface: *conf1
- register: result
-
- - assert: *true
-
- - name: "Conf1 Idempotence"
- nxos_udld_interface: *conf1
- register: result
-
- - assert: *false
-
- - name: ensure interface has mode disabled
- nxos_udld_interface: &conf3
- interface: "{{ intname }}"
- mode: disabled
- state: present
- register: result
-
- - assert: *true
-
- - name: "Conf3 Idempotence"
- nxos_udld_interface: *conf3
- register: result
-
- - assert: *false
-
- when: udld_enable
-
- - name: Remove the config
- nxos_udld_interface: &remove
- interface: "{{ intname }}"
- mode: enabled
- state: absent
-
- when: udld_run
-
- always:
- - name: "Disable udld"
- nxos_feature:
- feature: udld
- state: disabled
- ignore_errors: yes
-
-- debug: msg="END connection={{ ansible_connection }} nxos_udld_interface sanity test"
diff --git a/test/integration/targets/nxos_user/defaults/main.yaml b/test/integration/targets/nxos_user/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_user/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_user/meta/main.yaml b/test/integration/targets/nxos_user/meta/main.yaml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_user/meta/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_user/tasks/cli.yaml b/test/integration/targets/nxos_user/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_user/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_user/tasks/main.yaml b/test/integration/targets/nxos_user/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_user/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_user/tasks/nxapi.yaml b/test/integration/targets/nxos_user/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_user/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_user/tests/common/auth.yaml b/test/integration/targets/nxos_user/tests/common/auth.yaml
deleted file mode 100644
index a05b1aa5ff..0000000000
--- a/test/integration/targets/nxos_user/tests/common/auth.yaml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-- block:
- - name: Create user with password
- nxos_user:
- name: auth_user
- role: network-operator
- state: present
- configured_password: pasS!123
-
- - 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: "pasS!123"
-
- - 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
- nxos_user:
- name: auth_user
- state: absent
- register: result
diff --git a/test/integration/targets/nxos_user/tests/common/basic.yaml b/test/integration/targets/nxos_user/tests/common/basic.yaml
deleted file mode 100644
index cf77ed3870..0000000000
--- a/test/integration/targets/nxos_user/tests/common/basic.yaml
+++ /dev/null
@@ -1,55 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_user basic test"
-
-- name: Remove old entries of user
- nxos_user:
- aggregate:
- - { name: ansibletest1 }
- - { name: ansibletest2 }
- - { name: ansibletest3 }
- state: absent
-
-# Start tests
-- name: Create user
- nxos_user:
- name: ansibletest1
- roles: network-operator
- state: present
- register: result
-
-- debug: msg="{{result}}"
-
-- assert:
- that:
- - 'result.changed == true'
- - '"username" in result.commands[0]'
- - '"role network-operator" in result.commands[0]'
-
-- name: Collection of users
- nxos_user:
- aggregate:
- - { name: ansibletest2 }
- - { name: ansibletest3 }
- state: present
- roles: network-admin
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
-
-- name: tearDown
- nxos_user:
- aggregate:
- - { name: ansibletest1 }
- - { name: ansibletest2 }
- - { name: ansibletest3 }
- state: absent
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"no username" in result.commands[0]'
-
-- debug: msg="END connection={{ ansible_connection }} nxos_user basic test"
diff --git a/test/integration/targets/nxos_user/tests/common/net_user.yaml b/test/integration/targets/nxos_user/tests/common/net_user.yaml
deleted file mode 100644
index 4676577d29..0000000000
--- a/test/integration/targets/nxos_user/tests/common/net_user.yaml
+++ /dev/null
@@ -1,31 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos common/net_user.yaml"
-
-# Add minimal testcase to check args are passed correctly to
-# implementation module and module run is successful.
-
-- name: "Remove old entries of user - setup"
- net_user:
- name: ansibletest1
- state: absent
-
-# Start tests
-- name: Create user with platform agnostic module
- net_user:
- name: ansibletest1
- roles: network-operator
- state: present
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"username" in result.commands[0]'
- - '"role network-operator" in result.commands[0]'
-
-- name: teardown
- net_user:
- name: ansibletest1
- state: absent
-
-- debug: msg="END connection={{ ansible_connection }} nxos common/net_user.yaml"
diff --git a/test/integration/targets/nxos_user/tests/common/sanity.yaml b/test/integration/targets/nxos_user/tests/common/sanity.yaml
deleted file mode 100644
index 86b7e4e7fb..0000000000
--- a/test/integration/targets/nxos_user/tests/common/sanity.yaml
+++ /dev/null
@@ -1,110 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_user parameter test"
-
-- set_fact: idem="true"
-- set_fact: idem="false"
- when: ((platform is search('N7K')) and (imagetag and (imagetag is version_compare('D1', 'eq'))))
-
-- block:
- - name: Create user
- nxos_user: &configure
- name: netend
- configured_password: Hello!23$
- update_password: on_create
- roles: network-operator
- state: present
- register: result
-
- - assert: &true
- that:
- - 'result.changed == true'
-
- - block:
- - name: conf idempotency
- nxos_user: *configure
- register: result
-
- - assert: &false
- that:
- - 'result.changed == false'
- when: idem
-
- - name: Remove user
- nxos_user: &remove
- name: netend
- state: absent
- register: result
-
- - assert: *true
-
- - name: remove idempotency
- nxos_user: *remove
- register: result
-
- - assert: *false
-
- - debug: msg="skipping sshkey test as the key needs to be created on the server first"
-
-# - name: create a new user
-# nxos_user: &conf1
-# name: ansible
-# sshkey: "{{ lookup('file', '~/.ssh/id_rsa.pub') }}"
-# state: present
-# register: result
-#
-# - assert: *true
-
-# - block:
-# - name: user idempotency
-# nxos_user: *conf1
-# register: result
-#
-# - assert: *false
-#
-# when: idem
-
- - name: Collection of users
- nxos_user: &coll
- users:
- - name: test1
- - name: test2
- configured_password: Hello!23$
- update_password: on_create
- state: present
- roles:
- - network-admin
- - network-operator
- register: result
-
- - assert: *true
-
- - block:
- - name: users idempotency
- nxos_user: *coll
- register: result
-
- - assert: *false
-
- when: idem
-
- - name: tearDown
- nxos_user: &tear
- name: "{{ ansible_user }}"
- purge: yes
- register: result
-
- - assert: *true
-
- - name: teardown idempotency
- nxos_user: *tear
- register: result
-
- - assert: *false
-
- always:
- - name: tearDown
- nxos_user: *tear
- register: result
- ignore_errors: yes
-
-- debug: msg="END connection={{ ansible_connection }} nxos_user parameter test"
diff --git a/test/integration/targets/nxos_vlan/defaults/main.yaml b/test/integration/targets/nxos_vlan/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_vlan/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_vlan/meta/main.yml b/test/integration/targets/nxos_vlan/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_vlan/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_vlan/tasks/cli.yaml b/test/integration/targets/nxos_vlan/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_vlan/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vlan/tasks/main.yaml b/test/integration/targets/nxos_vlan/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_vlan/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_vlan/tasks/nxapi.yaml b/test/integration/targets/nxos_vlan/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_vlan/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vlan/tests/common/agg.yaml b/test/integration/targets/nxos_vlan/tests/common/agg.yaml
deleted file mode 100644
index 690e89c80d..0000000000
--- a/test/integration/targets/nxos_vlan/tests/common/agg.yaml
+++ /dev/null
@@ -1,114 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }}/agg.yaml"
-
-- name: setup - remove vlan used in test
- nxos_config: &rm
- lines:
- - no vlan 102
- - no vlan 103
- - no vlan 104
- ignore_errors: yes
-
-
-- name: configure vlan with aggregate
- nxos_vlan: &conf1
- aggregate:
- - { name: app02, vlan_id: 102 }
- - { name: app03, vlan_id: 103 }
- vlan_state: active
- admin_state: up
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"vlan 102" in result.commands'
- - '"vlan 103" in result.commands'
- - '"no shutdown" in result.commands'
- - '"state active" in result.commands'
-
-- name: conf1 - Idempotence
- nxos_vlan: *conf1
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- name: change property of existing vlan - admin_state down
- nxos_vlan: &conf2
- aggregate:
- - { name: app02, vlan_id: 102 }
- - { name: app03, vlan_id: 103 }
- vlan_state: active
- admin_state: down
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"vlan 102" in result.commands'
- - '"vlan 103" in result.commands'
- - '"shutdown" in result.commands'
-
-- name: conf2 - Idempotence
- nxos_vlan: *conf2
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- name: purge
- nxos_vlan: &purge
- vlan_id: 1
- purge: yes
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"no vlan 102" in result.commands'
- - '"no vlan 103" in result.commands'
-
-- name: purge - Idempotence
- nxos_vlan: *purge
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- name: "setup for purge test with aggregate add"
- nxos_vlan:
- vlan_id: 104
- purge: true
-
-- name: purge 104 with aggregate add 102-103
- nxos_vlan: &purge_add
- aggregate:
- - { vlan_id: 102 }
- - { vlan_id: 103 }
- purge: true
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"vlan 102" in result.commands'
- - '"vlan 103" in result.commands'
- - '"no vlan 104" in result.commands'
-
-- name: purge_add - Idempotence
- nxos_vlan: *purge_add
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- name: teardown
- nxos_config: *rm
- ignore_errors: yes
-
-- debug: msg="END connection={{ ansible_connection }}/agg.yaml"
diff --git a/test/integration/targets/nxos_vlan/tests/common/interface.yaml b/test/integration/targets/nxos_vlan/tests/common/interface.yaml
deleted file mode 100644
index 580feadaa9..0000000000
--- a/test/integration/targets/nxos_vlan/tests/common/interface.yaml
+++ /dev/null
@@ -1,124 +0,0 @@
----
-- set_fact: testint1="{{ nxos_int1 }}"
-- set_fact: testint2="{{ nxos_int2 }}"
-
-- name: setup - remove vlan used in test
- nxos_config:
- lines:
- - no vlan 100
- ignore_errors: yes
-
-- name: setup - remove vlan from interfaces used in test(part1)
- nxos_config:
- lines:
- - no switchport access vlan 100
- parents: switchport
- before: "interface {{ testint1 }}"
-
-- name: setup - remove vlan from interfaces used in test(part2)
- nxos_config:
- lines:
- - no switchport access vlan 100
- parents: switchport
- before: "interface {{ testint2 }}"
-
-- name: create vlan
- nxos_vlan:
- vlan_id: 100
-
-- name: Add interfaces to vlan and check intent (config + intent)
- nxos_vlan: &interfaces
- vlan_id: 100
- interfaces:
- - "{{ testint1 }}"
- - "{{ testint2 }}"
- associated_interfaces:
- - "{{ testint1 }}"
- - "{{ testint2 }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface {{ testint1 }}" in result.commands'
- - '"switchport" in result.commands'
- - '"switchport mode access" in result.commands'
- - '"switchport access vlan 100" in result.commands'
- - '"interface {{ testint2 }}" in result.commands'
- - '"switchport" in result.commands'
- - '"switchport mode access" in result.commands'
- - '"switchport access vlan 100" in result.commands'
-
-- name: Add interfaces to vlan(idempotence)
- nxos_vlan: *interfaces
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- name: Check interfaces intent
- nxos_vlan:
- vlan_id: 100
- associated_interfaces:
- - "{{ testint1 }}"
- - "{{ testint2 }}"
- register: result
-
-- assert:
- that:
- - "result.failed == false"
-
-- name: Check interfaces intent fail
- nxos_vlan:
- vlan_id: 100
- associated_interfaces:
- - test
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - "result.failed == True"
-
-- name: Remove interface from vlan
- nxos_vlan: &single_int
- vlan_id: 100
- interfaces:
- - "{{ testint2 }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface {{ testint1 }}" in result.commands'
- - '"switchport" in result.commands'
- - '"switchport mode access" in result.commands'
- - '"no switchport access vlan 100" in result.commands'
-
-- name: Remove interface from vlan(idempotence)
- nxos_vlan: *single_int
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- name: teardown(part1)
- nxos_config:
- lines:
- - no vlan 100
-
-- name: teardown - remove vlan from interfaces used in test(part1)
- nxos_config:
- lines:
- - no switchport access vlan 100
- parents: switchport
- before: "interface {{ testint1 }}"
-
-- name: teardown - remove vlan from interfaces used in test(part2)
- nxos_config:
- lines:
- - no switchport access vlan 100
- parents: switchport
- before: "interface {{ testint2 }}"
diff --git a/test/integration/targets/nxos_vlan/tests/common/sanity.yaml b/test/integration/targets/nxos_vlan/tests/common/sanity.yaml
deleted file mode 100644
index 5204f3c419..0000000000
--- a/test/integration/targets/nxos_vlan/tests/common/sanity.yaml
+++ /dev/null
@@ -1,224 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_vlan sanity test"
-
-- set_fact: testint1="{{ nxos_int1 }}"
-- set_fact: testint2="{{ nxos_int2 }}"
-
-- block:
- - name: Install and Enable FabricPath feature set
- nxos_config:
- lines:
- - install feature-set fabricpath
- - feature-set fabricpath
- when: platform is search('N5K|N7K')
-
- - name: "Enable feature vn segment"
- nxos_config:
- commands:
- - feature vn-segment-vlan-based
- match: none
- when: platform is search('N9K')
-
- - name: vlan teardown
- nxos_vlan: &vlan_teardown
- vlan_range: "2-200"
- state: absent
- ignore_errors: yes
-
- - name: Ensure a range of VLANs are present on the switch
- nxos_vlan: &conf_vlan
- vlan_range: "2-10,20,50,55-60,100-150"
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Vlan Idempotence"
- nxos_vlan: *conf_vlan
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: Ensure VLAN 50 exists with the name WEB and is in the shutdown state
- nxos_vlan: &web1
- vlan_id: 50
- vlan_state: suspend
- admin_state: down
- name: WEB
- mapped_vni: 5555
- register: result
- when: platform is search('N9K')
-
- - assert: *true
- when: platform is search('N9K')
-
- - name: "web1 Idempotence"
- nxos_vlan: *web1
- register: result
- when: platform is search('N9K')
-
- - assert: *false
- when: platform is search('N9K')
-
- - name: change name and vni to default
- nxos_vlan: &web2
- vlan_id: 50
- vlan_state: active
- admin_state: up
- name: default
- mapped_vni: default
- register: result
- when: platform is search('N9K')
-
- - assert: *true
- when: platform is search('N9K')
-
- - name: "web2 Idempotence"
- nxos_vlan: *web2
- register: result
- when: platform is search('N9K')
-
- - assert: *false
- when: platform is search('N9K')
-
- - name: Ensure VLAN 50 exists with the name WEB and is in the shutdown state
- nxos_vlan: &web3
- vlan_id: 50
- vlan_state: suspend
- admin_state: down
- name: WEB
- register: result
- when: platform is search('N3K|N7K')
-
- - assert: *true
- when: platform is search('N3K|N7K')
-
- - name: "web3 Idempotence"
- nxos_vlan: *web3
- register: result
- when: platform is search('N3K|N7K')
-
- - assert: *false
- when: platform is search('N3K|N7K')
-
- - name: Change name to default
- nxos_vlan: &web4
- vlan_id: 50
- vlan_state: active
- admin_state: up
- name: default
- register: result
- when: platform is search('N3K|N7K')
-
- - assert: *true
- when: platform is search('N3K|N7K')
-
- - name: "web4 Idempotence"
- nxos_vlan: *web4
- register: result
- when: platform is search('N3K|N7K')
-
- - assert: *false
- when: platform is search('N3K|N7K')
-
- - name: Change mode
- nxos_vlan: &mode1
- vlan_id: 50
- mode: fabricpath
- register: result
- when: platform is search('N5K|N7K')
-
- - assert: *true
- when: platform is search('N5K|N7K')
-
- - name: "mode1 Idempotence"
- nxos_vlan: *mode1
- register: result
- when: platform is search('N5K|N7K')
-
- - assert: *false
- when: platform is search('N5K|N7K')
-
- - name: Change mode again
- nxos_vlan: &mode2
- vlan_id: 50
- mode: ce
- register: result
- when: platform is search('N5K|N7K')
-
- - assert: *true
- when: platform is search('N5K|N7K')
-
- - name: "mode2 Idempotence"
- nxos_vlan: *mode2
- register: result
- when: platform is search('N5K|N7K')
-
- - assert: *false
- when: platform is search('N5K|N7K')
-
- - name: Ensure VLAN is NOT on the device
- nxos_vlan: &no_vlan
- vlan_id: 50
- state: absent
- register: result
-
- - assert: *true
-
- - name: "no vlan Idempotence"
- nxos_vlan: *no_vlan
- register: result
-
- - assert: *false
-
- - name: Add interfaces to vlan
- nxos_vlan: &addint
- vlan_id: 101
- vlan_state: suspend
- interfaces:
- - "{{ testint1 }}"
- - "{{ testint2 }}"
- register: result
-
- - assert: *true
-
- - name: "Addint idempotence"
- nxos_vlan: *addint
- register: result
-
- - assert: *false
-
- - name: Remove interfaces from vlan
- nxos_vlan: &remint
- vlan_id: 101
- interfaces: default
- register: result
-
- - assert: *true
-
- - name: "Remint idempotence"
- nxos_vlan: *remint
- register: result
-
- - assert: *false
-
- always:
- - name: Remove int from vlan
- nxos_vlan: *remint
- ignore_errors: yes
-
- - name: vlan teardown final
- nxos_vlan: *vlan_teardown
- ignore_errors: yes
-
- - name: "Disable feature vn segement"
- nxos_feature:
- feature: vn-segment-vlan-based
- state: disabled
- ignore_errors: yes
- when: platform is search('N9K')
-
-- debug: msg="END connection={{ ansible_connection }} nxos_vlan sanity test"
diff --git a/test/integration/targets/nxos_vlans/defaults/main.yaml b/test/integration/targets/nxos_vlans/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_vlans/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_vlans/meta/main.yml b/test/integration/targets/nxos_vlans/meta/main.yml
deleted file mode 100644
index 32cf5dda7e..0000000000
--- a/test/integration/targets/nxos_vlans/meta/main.yml
+++ /dev/null
@@ -1 +0,0 @@
-dependencies: []
diff --git a/test/integration/targets/nxos_vlans/tasks/cli.yaml b/test/integration/targets/nxos_vlans/tasks/cli.yaml
deleted file mode 100644
index 6c7ea4a7f9..0000000000
--- a/test/integration/targets/nxos_vlans/tasks/cli.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vlans/tasks/main.yaml b/test/integration/targets/nxos_vlans/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/nxos_vlans/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/nxos_vlans/tasks/nxapi.yaml b/test/integration/targets/nxos_vlans/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_vlans/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vlans/tests/cli/deleted.yaml b/test/integration/targets/nxos_vlans/tests/cli/deleted.yaml
deleted file mode 100644
index e3e8de7d06..0000000000
--- a/test/integration/targets/nxos_vlans/tests/cli/deleted.yaml
+++ /dev/null
@@ -1,48 +0,0 @@
----
-- debug:
- msg: "Start nxos_vlans deleted integration tests connection={{ ansible_connection }}"
-
-- name: setup
- cli_config:
- config: |
- no vlan 2-100
- vlan 5
- vlan 6
-
-- block:
- - name: Gather vlans facts
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: vlans
-
- - name: deleted
- nxos_vlans: &deleted
- state: deleted
- register: result
-
- - assert:
- that:
- - "result.before|length == (ansible_facts.network_resources.vlans|length - 1)"
- - "result.after|length == 0"
- - "result.changed == true"
- - "'no vlan 5' in result.commands"
- - "'no vlan 6' in result.commands"
- - "result.commands|length == 2"
-
- - name: Idempotence - deleted
- nxos_vlans: *deleted
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config:
- config: |
- no vlan 5
- no vlan 6
diff --git a/test/integration/targets/nxos_vlans/tests/cli/merged.yaml b/test/integration/targets/nxos_vlans/tests/cli/merged.yaml
deleted file mode 100644
index 88000fbca7..0000000000
--- a/test/integration/targets/nxos_vlans/tests/cli/merged.yaml
+++ /dev/null
@@ -1,55 +0,0 @@
----
-- debug:
- msg: "Start nxos_vlans merged integration tests connection={{ ansible_connection }}"
-
-- name: setup
- cli_config: &cleanup
- config: |
- no vlan 2-100
-
-- block:
- - name: Merged
- nxos_vlans: &merged
- config:
- - vlan_id: 5
- name: vlan5
- - vlan_id: 6
- name: vlan6
- state: suspend
- state: merged
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - "result.before|length == 0"
- - "'vlan 5' in result.commands"
- - "'name vlan5' in result.commands"
- - "'vlan 6' in result.commands"
- - "'name vlan6' in result.commands"
- - "'state suspend' in result.commands"
- - "result.commands|length == 5"
-
- - name: Gather vlans facts
- nxos_facts:
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: vlans
-
- - assert:
- that:
- - "result.after|length == (ansible_facts.network_resources.vlans|length - 1)"
-
- - name: Idempotence - Merged
- nxos_vlans: *merged
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config: *cleanup
diff --git a/test/integration/targets/nxos_vlans/tests/cli/overridden.yaml b/test/integration/targets/nxos_vlans/tests/cli/overridden.yaml
deleted file mode 100644
index ad0760ea4a..0000000000
--- a/test/integration/targets/nxos_vlans/tests/cli/overridden.yaml
+++ /dev/null
@@ -1,65 +0,0 @@
----
-- debug:
- msg: "Start nxos_vlans overridden integration tests connection={{ ansible_connection }}"
-
-- name: setup1
- cli_config: &cleanup
- config: |
- no vlan 2-100
-
-- block:
- - name: setup
- cli_config:
- config: |
- vlan 5
- name test-vlan5
- state suspend
- vlan 6
- exit
-
- - name: Gather vlans facts
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: vlans
-
- - name: Overridden
- nxos_vlans: &overridden
- config:
- - vlan_id: 9
- name: test-vlan9
- enabled: false
- state: overridden
- register: result
-
- - assert:
- that:
- - "result.before|length == (ansible_facts.network_resources.vlans|length - 1)"
- - "result.changed == true"
- - "'no vlan 5' in result.commands"
- - "'no vlan 6' in result.commands"
- - "'vlan 9' in result.commands"
- - "'name test-vlan9' in result.commands"
- - "'shutdown' in result.commands"
- - "result.commands|length == 5"
-
- - name: Gather vlans post facts
- nxos_facts: *facts
-
- - assert:
- that:
- - "result.after|length == (ansible_facts.network_resources.vlans|length - 1)"
-
- - name: Idempotence - Overridden
- nxos_vlans: *overridden
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config: *cleanup
diff --git a/test/integration/targets/nxos_vlans/tests/cli/replaced.yaml b/test/integration/targets/nxos_vlans/tests/cli/replaced.yaml
deleted file mode 100644
index e55c1dd2e1..0000000000
--- a/test/integration/targets/nxos_vlans/tests/cli/replaced.yaml
+++ /dev/null
@@ -1,62 +0,0 @@
----
-- debug:
- msg: "Start nxos_vlans replaced integration tests connection={{ ansible_connection }}"
-
-- name: setup1
- cli_config: &cleanup
- config: |
- no vlan 2-100
-
-- block:
- - name: setup2
- cli_config:
- config: |
- vlan 5
- name test-vlan5
- vlan 6
- name test-vlan6
- exit
-
- - name: Gather vlans facts
- nxos_facts: &facts
- gather_subset:
- - '!all'
- - '!min'
- gather_network_resources: vlans
-
- - name: Replaced
- nxos_vlans: &replaced
- config:
- - vlan_id: 6
- state: suspend
- state: replaced
- register: result
-
- - assert:
- that:
- - "result.before|length == (ansible_facts.network_resources.vlans|length - 1)"
- - "result.changed == true"
- - "'vlan 6' in result.commands"
- - "'no name' in result.commands"
- - "'state suspend' in result.commands"
- - "result.commands|length == 3"
-
- - name: Gather vlans post facts
- nxos_facts: *facts
-
- - assert:
- that:
- - "result.after|length == (ansible_facts.network_resources.vlans|length - 1)"
-
- - name: Idempotence - Replaced
- nxos_vlans: *replaced
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.commands|length == 0"
-
- always:
- - name: teardown
- cli_config: *cleanup
diff --git a/test/integration/targets/nxos_vpc/defaults/main.yaml b/test/integration/targets/nxos_vpc/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_vpc/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_vpc/meta/main.yml b/test/integration/targets/nxos_vpc/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_vpc/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_vpc/tasks/cli.yaml b/test/integration/targets/nxos_vpc/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_vpc/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vpc/tasks/main.yaml b/test/integration/targets/nxos_vpc/tasks/main.yaml
deleted file mode 100644
index fea9337c14..0000000000
--- a/test/integration/targets/nxos_vpc/tasks/main.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-# Use block to ensure that both cli and nxapi tests
-# will run even if there are failures or errors.
-- block:
- - { include: cli.yaml, tags: ['cli'] }
- always:
- - { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_vpc/tasks/nxapi.yaml b/test/integration/targets/nxos_vpc/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_vpc/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vpc/tests/common/sanity.yaml b/test/integration/targets/nxos_vpc/tests/common/sanity.yaml
deleted file mode 100644
index 2073223a06..0000000000
--- a/test/integration/targets/nxos_vpc/tests/common/sanity.yaml
+++ /dev/null
@@ -1,178 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_vpc sanity test"
-
-- block:
- - set_fact: delay_restore_orphan_port=25
- - set_fact: def_delay_restore_orphan_port=default
- when: platform is not search("N35|N5K|N6K")
-
-- block:
- - name: disable vpc for initial vpc config cleanup
- nxos_feature:
- feature: vpc
- state: disabled
-
- - name: enable feature vpc
- nxos_feature:
- feature: vpc
- state: enabled
-
- - name: Ensure ntc VRF exists on switch
- nxos_vrf:
- vrf: ntc
-
- - name: Configure vpc
- nxos_vpc: &conf_vpc
- state: present
- domain: 100
- pkl_dest: 192.168.100.4
- pkl_src: 10.1.100.20
- pkl_vrf: ntc
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Conf Idempotence"
- nxos_vpc: *conf_vpc
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: Configure vpc1
- nxos_vpc: &conf_vpc1
- state: present
- domain: 100
- role_priority: 500
- system_priority: 2000
- peer_gw: True
- delay_restore: 5
- delay_restore_interface_vlan: 15
- delay_restore_orphan_port: "{{ delay_restore_orphan_port|default(omit) }}"
- register: result
-
- - assert: *true
-
- - name: "Conf Idempotence"
- nxos_vpc: *conf_vpc1
- register: result
-
- - assert: *false
-
- - block:
- # This block is only useful on platforms that nvgen 'no auto-recovery'.
- # Note: auto_recovery is mutually_exclusive with auto_recovery_reload_delay.
- - set_fact: def_auto_recovery=False
- - set_fact: def_auto_recovery=True
- when: platform is search("N7K")
-
- - name: auto-recovery from default to non-default
- nxos_vpc: &auto_recovery_1
- domain: 100
- auto_recovery: "{{ not def_auto_recovery }}"
- register: result
-
- - assert: *true
-
- - name: "Conf Idempotence auto-recovery def-to-non-def"
- nxos_vpc: *auto_recovery_1
- register: result
-
- - assert: *false
-
- - name: auto-recovery from non-default to default
- nxos_vpc: &auto_recovery_2
- domain: 100
- auto_recovery: "{{ def_auto_recovery }}"
- register: result
-
- - assert: *true
-
- - name: "Conf Idempotence auto-recovery non-def-to-def"
- nxos_vpc: *auto_recovery_2
- register: result
-
- - assert: *false
-
- when: platform is search("N35|N7K|N3K-F|N9K-F")
-
- - name: Configure auto-recovery reload-delay
- nxos_vpc: &auto_reload
- domain: 100
- auto_recovery_reload_delay: 242
- register: result
-
- - assert: *true
-
- - name: "Conf Idempotence auto-recovery reload-delay"
- nxos_vpc: *auto_reload
- register: result
-
- - assert: *false
-
- - name: Configure vpc2
- nxos_vpc: &conf_vpc2
- state: present
- domain: 100
- role_priority: default
- system_priority: default
- peer_gw: True
- delay_restore: default
- delay_restore_interface_vlan: default
- delay_restore_orphan_port: "{{ def_delay_restore_orphan_port|default(omit) }}"
- register: result
-
- - assert: *true
-
- - name: "Conf Idempotence"
- nxos_vpc: *conf_vpc2
- register: result
-
- - assert: *false
-
- - name: Configure vpc3
- nxos_vpc: &conf_vpc3
- state: present
- domain: 100
- peer_gw: False
- register: result
-
- - assert: *true
-
- - name: "Conf Idempotence"
- nxos_vpc: *conf_vpc3
- register: result
-
- - assert: *false
-
- - name: remove vpc
- nxos_vpc: &rem_vpc
- state: absent
- domain: 100
- register: result
-
- - assert: *true
-
- - name: "Remove Idempotence"
- nxos_vpc: *rem_vpc
- register: result
-
- - assert: *false
-
- always:
- - name: remove vrf
- nxos_vrf:
- vrf: ntc
- state: absent
- ignore_errors: yes
-
- - name: disable feature vpc
- nxos_feature:
- feature: vpc
- state: disabled
- ignore_errors: yes
-
-- debug: msg="END connection={{ ansible_connection }} nxos_vpc sanity test"
diff --git a/test/integration/targets/nxos_vpc_interface/defaults/main.yaml b/test/integration/targets/nxos_vpc_interface/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_vpc_interface/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_vpc_interface/meta/main.yml b/test/integration/targets/nxos_vpc_interface/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_vpc_interface/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_vpc_interface/tasks/cli.yaml b/test/integration/targets/nxos_vpc_interface/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_vpc_interface/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vpc_interface/tasks/main.yaml b/test/integration/targets/nxos_vpc_interface/tasks/main.yaml
deleted file mode 100644
index fea9337c14..0000000000
--- a/test/integration/targets/nxos_vpc_interface/tasks/main.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-# Use block to ensure that both cli and nxapi tests
-# will run even if there are failures or errors.
-- block:
- - { include: cli.yaml, tags: ['cli'] }
- always:
- - { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_vpc_interface/tasks/nxapi.yaml b/test/integration/targets/nxos_vpc_interface/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_vpc_interface/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vpc_interface/tests/common/sanity.yaml b/test/integration/targets/nxos_vpc_interface/tests/common/sanity.yaml
deleted file mode 100644
index f29feb08b8..0000000000
--- a/test/integration/targets/nxos_vpc_interface/tests/common/sanity.yaml
+++ /dev/null
@@ -1,140 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_vpc_interface sanity test"
-
-- block:
- - name: enable feature vpc
- nxos_feature:
- feature: vpc
- state: enabled
-
- - name: create port-channel10
- nxos_config:
- commands:
- - interface port-channel10
- - switchport
- match: none
-
- - name: create port-channel11
- nxos_config:
- commands:
- - interface port-channel11
- - switchport
- match: none
-
- - name: configure vpc
- nxos_vpc:
- state: present
- domain: 100
- role_priority: 32667
- system_priority: 2000
- pkl_dest: 192.168.100.4
- pkl_src: 10.1.100.20
- peer_gw: true
- auto_recovery: false
-
- - name: Configure vpc port channel
- nxos_vpc_interface: &conf
- portchannel: 10
- vpc: 10
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Conf Idempotence"
- nxos_vpc_interface: *conf
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
-# The vpc peer-link command seems to be invalid for the NXOSv we have in Zuul CI
-# Hence, we're temporarily skipping the tests that have `peer_link` key
-
- - name: Configure vpc port channel
- nxos_vpc_interface: &conf1
- portchannel: 11
- peer_link: True
- register: result
- when: image_version != "7.0(3)I5(1)"
-
- - assert: *true
- when: image_version != "7.0(3)I5(1)"
-
- - name: "Conf Idempotence"
- nxos_vpc_interface: *conf1
- register: result
- when: image_version != "7.0(3)I5(1)"
-
- - assert: *false
- when: image_version != "7.0(3)I5(1)"
-
- - name: Configure vpc port channel
- nxos_vpc_interface: &conf2
- portchannel: 11
- peer_link: False
- register: result
- when: image_version != "7.0(3)I5(1)"
-
- - assert: *true
- when: image_version != "7.0(3)I5(1)"
-
- - name: "Conf Idempotence"
- nxos_vpc_interface: *conf2
- register: result
- when: image_version != "7.0(3)I5(1)"
-
- - assert: *false
- when: image_version != "7.0(3)I5(1)"
-
- - name: remove vpc port channel
- nxos_vpc_interface: &remove
- portchannel: 10
- vpc: 10
- state: absent
- register: result
-
- - assert: *true
-
- - name: "Remove Idempotence"
- nxos_vpc_interface: *remove
- register: result
-
- - assert: *false
-
- always:
- - name: remove vpc
- nxos_vpc:
- state: absent
- domain: 100
- role_priority: 32667
- system_priority: 2000
- pkl_dest: 192.168.100.4
- pkl_src: 10.1.100.20
- peer_gw: true
- auto_recovery: false
- ignore_errors: yes
-
- - name: remove vpc port channel
- nxos_vpc_interface:
- portchannel: 10
- vpc: 10
- state: absent
- ignore_errors: yes
-
- - name: remove port channel
- nxos_config:
- commands:
- - no interface port-channel10
- - no interface port-channel11
- match: none
- ignore_errors: yes
-
- - name: disable feature vpc
- nxos_feature:
- feature: vpc
- state: disabled
-
-- debug: msg="END connection={{ ansible_connection }} nxos_vpc_interface sanity test"
diff --git a/test/integration/targets/nxos_vrf/defaults/main.yaml b/test/integration/targets/nxos_vrf/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_vrf/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_vrf/meta/main.yml b/test/integration/targets/nxos_vrf/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_vrf/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_vrf/tasks/cli.yaml b/test/integration/targets/nxos_vrf/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_vrf/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vrf/tasks/main.yaml b/test/integration/targets/nxos_vrf/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_vrf/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_vrf/tasks/nxapi.yaml b/test/integration/targets/nxos_vrf/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_vrf/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vrf/tests/common/intent.yaml b/test/integration/targets/nxos_vrf/tests/common/intent.yaml
deleted file mode 100644
index f98162bc0a..0000000000
--- a/test/integration/targets/nxos_vrf/tests/common/intent.yaml
+++ /dev/null
@@ -1,183 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_vrf intent & aggregate test"
-
-- set_fact: testint1="{{ nxos_int1 }}"
-- set_fact: testint2="{{ nxos_int2 }}"
-
-- name: setup - remove vrf from interfaces used in test(part1)
- nxos_config:
- lines:
- - no vrf member test1
- parents: no switchport
- before: "interface {{ testint1 }}"
- ignore_errors: yes
-
-- name: setup - remove vrf from interfaces used in test(part2)
- nxos_config:
- lines:
- - no vrf member test1
- parents: no switchport
- before: "interface {{ testint2 }}"
- ignore_errors: yes
-
-- name: setup - delete VRF test1 used in test
- nxos_config:
- lines:
- - no vrf context test1
- ignore_errors: yes
-
-- name: setup - remove VRF test2 used in test
- nxos_config:
- lines:
- - no vrf context test2
- ignore_errors: yes
-
-- name: aggregate definitions of VRFs
- nxos_vrf: &create
- aggregate:
- - { name: test1, description: Configured by Ansible }
- - { name: test2, description: Testing, admin_state: down }
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"vrf context test1" in result.commands'
- - '"description Configured by Ansible" in result.commands'
- - '"no shutdown" in result.commands'
- - '"vrf context test2" in result.commands'
- - '"description Testing" in result.commands'
- - '"shutdown" in result.commands'
-
-- name: aggregate definitions of VRFs(Idempotence)
- nxos_vrf: *create
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Assign interfaces to VRF (Config + intent)
- nxos_vrf: &interfaces
- name: test1
- interfaces:
- - "{{ testint1 }}"
- - "{{ testint2 }}"
- associated_interfaces:
- - "{{ testint1 }}"
- - "{{ testint2 }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - "result.failed == false"
- - '"interface {{ testint1 }}" in result.commands'
- - '"vrf member test1" in result.commands'
- - '"interface {{ testint2 }}" in result.commands'
- - '"vrf member test1" in result.commands'
-
-- name: Assign interfaces to vrf(Idempotence)
- nxos_vrf: *interfaces
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- name: Check interfaces assigned to VRF (intent)
- nxos_vrf:
- name: test1
- associated_interfaces:
- - "{{ testint1 }}"
- - "{{ testint2 }}"
- register: result
-
-- assert:
- that:
- - "result.failed == false"
-
-- name: Assign interfaces to VRF (intent fail)
- nxos_vrf:
- name: test1
- associated_interfaces:
- - test
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - "result.failed == True"
-
-- name: Remove interface from vrf
- nxos_vrf: &single_int
- name: test1
- interfaces:
- - "{{ testint2 }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"interface {{ testint1 }}" in result.commands'
- - '"no vrf member test1" in result.commands'
-
-- name: Remove interface from vrf(idempotence)
- nxos_vrf: *single_int
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- name: Delete VRFs
- nxos_vrf: &delete
- aggregate:
- - { name: test1, description: Configured by Ansible }
- - { name: test2, description: Testing, admin_state: down }
- state: absent
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - '"no vrf context test1" in result.commands'
- - '"no vrf context test2" in result.commands'
-
-- name: Delete VRFs(Idempotence)
- nxos_vrf: *delete
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: setup - remove vrf from interfaces used in test(part1)
- nxos_config:
- lines:
- - no vrf member test1
- parents: no switchport
- before: "interface {{ testint1 }}"
- ignore_errors: yes
-
-- name: setup - remove vrf from interfaces used in test(part2)
- nxos_config:
- lines:
- - no vrf member test1
- parents: no switchport
- before: "interface {{ testint2 }}"
- ignore_errors: yes
-
-- name: setup - delete VRF test1 used in test
- nxos_config:
- lines:
- - no vrf context test1
- ignore_errors: yes
-
-- name: setup - remove VRF test2 used in test
- nxos_config:
- lines:
- - no vrf context test2
- ignore_errors: yes
-
-- debug: msg="END connection={{ ansible_connection }} nxos_vrf intent & aggregate test"
diff --git a/test/integration/targets/nxos_vrf/tests/common/sanity.yaml b/test/integration/targets/nxos_vrf/tests/common/sanity.yaml
deleted file mode 100644
index 25f778dc62..0000000000
--- a/test/integration/targets/nxos_vrf/tests/common/sanity.yaml
+++ /dev/null
@@ -1,110 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_vrf sanity test"
-
-- set_fact: intname1="{{ nxos_int1 }}"
-- set_fact: intname2="{{ nxos_int2 }}"
-
-- set_fact: rdnd="1:2"
- when: (platform is not match("N35|N7K")) and ((imagetag != 'I2'))
-
-- set_fact: rdd="default"
- when: (platform is not match("N35|N7K")) and ((imagetag != 'I2'))
-
-- set_fact: vnind="5000"
- when: platform is not match("N35|N7K|N3L")
-
-- set_fact: vnid="default"
- when: platform is not match("N35|N7K|N3L")
-
-- name: "Enable feature BGP"
- nxos_feature:
- feature: bgp
- state: enabled
- ignore_errors: yes
-
-- name: "Setup: Enable nv overlay evpn"
- nxos_config:
- commands:
- - nv overlay evpn
- provider: "{{ connection }}"
- ignore_errors: yes
- when: platform is match("N5K|N6K")
-
-- block:
- - name: Ensure ntc VRF exists on switch
- nxos_vrf: &configure
- vrf: ntc
- admin_state: down
- description: testing
- vni: "{{vnind|default(omit)}}"
- rd: "{{rdnd|default(omit)}}"
- interfaces:
- - "{{ intname1 }}"
- - "{{ intname2 }}"
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Conf Idempotence"
- nxos_vrf: *configure
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - pause:
- seconds: 30
-
- - name: Remove config
- nxos_vrf: &remconf
- vrf: ntc
- admin_state: up
- vni: "{{vnid|default(omit)}}"
- rd: "{{rdd|default(omit)}}"
- interfaces: default
- register: result
-
- - assert: *true
-
- - name: "Conf Idempotence"
- nxos_vrf: *remconf
- register: result
-
- - assert: *false
-
- - name: Ensure ntc VRF does not exist on switch
- nxos_vrf: &remove
- vrf: ntc
- state: absent
- register: result
-
- - assert: *true
-
- - pause:
- seconds: 30
-
- - name: "Remove Idempotence"
- nxos_vrf: *remove
- register: result
-
- - assert: *false
-
- always:
- - name: "Setup: Disable nv overlay evpn"
- nxos_config:
- commands:
- - no nv overlay evpn
- provider: "{{ connection }}"
- ignore_errors: yes
- when: platform is match("N5K|N6K")
-
- - name: "Disable feature BGP"
- nxos_feature:
- feature: bgp
- state: disabled
- ignore_errors: yes
-
- - debug: msg="END connection={{ ansible_connection }} nxos_vrf sanity test"
diff --git a/test/integration/targets/nxos_vrf_af/defaults/main.yaml b/test/integration/targets/nxos_vrf_af/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_vrf_af/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_vrf_af/meta/main.yml b/test/integration/targets/nxos_vrf_af/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_vrf_af/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_vrf_af/tasks/cli.yaml b/test/integration/targets/nxos_vrf_af/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_vrf_af/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vrf_af/tasks/main.yaml b/test/integration/targets/nxos_vrf_af/tasks/main.yaml
deleted file mode 100644
index fea9337c14..0000000000
--- a/test/integration/targets/nxos_vrf_af/tasks/main.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-# Use block to ensure that both cli and nxapi tests
-# will run even if there are failures or errors.
-- block:
- - { include: cli.yaml, tags: ['cli'] }
- always:
- - { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_vrf_af/tasks/nxapi.yaml b/test/integration/targets/nxos_vrf_af/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_vrf_af/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vrf_af/tests/common/sanity.yaml b/test/integration/targets/nxos_vrf_af/tests/common/sanity.yaml
deleted file mode 100644
index cd321d6fca..0000000000
--- a/test/integration/targets/nxos_vrf_af/tests/common/sanity.yaml
+++ /dev/null
@@ -1,146 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_vrf_af sanity test"
-
-- name: Configure feature bgp
- nxos_feature:
- feature: bgp
- state: enabled
-
-- name: Configure feature nv overlay
- nxos_config:
- commands: "feature nv overlay"
- ignore_errors: yes
-
-- name: Configure nv overlay evpn
- nxos_config:
- commands: "nv overlay evpn"
- ignore_errors: yes
-
-- block:
- - name: Configure vrf af ipv4
- nxos_vrf_af: &configure4
- vrf: ansible
- afi: ipv4
- route_target_both_auto_evpn: True
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Conf Idempotence"
- nxos_vrf_af: *configure4
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: Configure vrf af ipv6
- nxos_vrf_af: &configure6
- vrf: ansible
- afi: ipv6
- route_target_both_auto_evpn: True
- register: result
-
- - assert: *true
-
- - name: "Conf Idempotence"
- nxos_vrf_af: *configure6
- register: result
-
- - assert: *false
-
- - name: Remove router target4
- nxos_vrf_af: &rrt4
- vrf: ansible
- afi: ipv4
- route_target_both_auto_evpn: False
- register: result
-
- - assert: *true
-
- - name: "Conf Idempotence"
- nxos_vrf_af: *rrt4
- register: result
-
- - assert: *false
-
- - name: Remove router target6
- nxos_vrf_af: &rrt6
- vrf: ansible
- afi: ipv6
- route_target_both_auto_evpn: False
- register: result
-
- - assert: *true
-
- - name: "Conf Idempotence"
- nxos_vrf_af: *rrt6
- register: result
-
- - assert: *false
-
- - name: Remove vrf af v6
- nxos_vrf_af: &remove6
- vrf: ansible
- afi: ipv6
- route_target_both_auto_evpn: True
- state: absent
- register: result
-
- - assert: *true
-
- - pause:
- seconds: 30
-
- - name: "Remove Idempotence"
- nxos_vrf_af: *remove6
- register: result
-
- - assert: *false
-
- - name: Remove vrf af v4
- nxos_vrf_af: &remove4
- vrf: ansible
- afi: ipv4
- route_target_both_auto_evpn: True
- state: absent
- register: result
-
- - assert: *true
-
- - pause:
- seconds: 30
-
- - name: "Remove Idempotence"
- nxos_vrf_af: *remove4
- register: result
-
- - assert: *false
-
- when: not platform is search("N35|N3L")
-
- always:
- - name: Remove vrf
- nxos_config:
- commands: "no vrf context ansible"
- ignore_errors: yes
-
- - name: Remove nv overlay evpn
- nxos_config:
- commands: "no nv overlay evpn"
- ignore_errors: yes
-
- - name: Remove feature nv overlay
- nxos_config:
- commands: "no feature nv overlay"
- ignore_errors: yes
-
- - name: Remove feature bgp
- nxos_feature:
- feature: bgp
- state: disabled
- ignore_errors: yes
-
-- debug: msg="END connection={{ ansible_connection }} nxos_vrf_af sanity test"
diff --git a/test/integration/targets/nxos_vrf_interface/defaults/main.yaml b/test/integration/targets/nxos_vrf_interface/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_vrf_interface/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_vrf_interface/meta/main.yml b/test/integration/targets/nxos_vrf_interface/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_vrf_interface/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_vrf_interface/tasks/cli.yaml b/test/integration/targets/nxos_vrf_interface/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_vrf_interface/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vrf_interface/tasks/main.yaml b/test/integration/targets/nxos_vrf_interface/tasks/main.yaml
deleted file mode 100644
index fea9337c14..0000000000
--- a/test/integration/targets/nxos_vrf_interface/tasks/main.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-# Use block to ensure that both cli and nxapi tests
-# will run even if there are failures or errors.
-- block:
- - { include: cli.yaml, tags: ['cli'] }
- always:
- - { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_vrf_interface/tasks/nxapi.yaml b/test/integration/targets/nxos_vrf_interface/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_vrf_interface/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vrf_interface/tests/common/sanity.yaml b/test/integration/targets/nxos_vrf_interface/tests/common/sanity.yaml
deleted file mode 100644
index ef7828cdab..0000000000
--- a/test/integration/targets/nxos_vrf_interface/tests/common/sanity.yaml
+++ /dev/null
@@ -1,57 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_vrf_interface sanity test"
-
-# Select interface for test
-- set_fact: intname="{{ nxos_int1 }}"
-
-- block:
- - name: put interface in L3
- nxos_config:
- commands:
- - no switchport
- parents:
- - "interface {{ intname }}"
- match: none
-
- - name: Ensure vrf ntc exists on interface
- nxos_vrf_interface: &configure
- vrf: ntc
- interface: "{{ intname }}"
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Conf Idempotence"
- nxos_vrf_interface: *configure
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: Ensure ntc VRF does not exist on interface
- nxos_vrf_interface: &remove
- vrf: ntc
- interface: "{{ intname }}"
- state: absent
- register: result
-
- - assert: *true
-
- - name: "Remove Idempotence"
- nxos_vrf_interface: *remove
- register: result
-
- - assert: *false
-
- always:
- - name: put interface in default mode
- nxos_config:
- lines: "default interface {{ intname }}"
- match: none
- ignore_errors: yes
-
-- debug: msg="END connection={{ ansible_connection }} nxos_vrf_interface sanity test"
diff --git a/test/integration/targets/nxos_vrrp/defaults/main.yaml b/test/integration/targets/nxos_vrrp/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_vrrp/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_vrrp/meta/main.yml b/test/integration/targets/nxos_vrrp/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_vrrp/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_vrrp/tasks/cli.yaml b/test/integration/targets/nxos_vrrp/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_vrrp/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vrrp/tasks/main.yaml b/test/integration/targets/nxos_vrrp/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_vrrp/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_vrrp/tasks/nxapi.yaml b/test/integration/targets/nxos_vrrp/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_vrrp/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vrrp/tests/common/sanity.yaml b/test/integration/targets/nxos_vrrp/tests/common/sanity.yaml
deleted file mode 100644
index 1ff951c8ad..0000000000
--- a/test/integration/targets/nxos_vrrp/tests/common/sanity.yaml
+++ /dev/null
@@ -1,132 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_vrrp sanity test"
-
-- block:
- - name: "Enable interface-vlan"
- nxos_feature:
- feature: interface-vlan
- state: enabled
-
- - name: "Enable vrrp"
- nxos_feature:
- feature: vrrp
- state: enabled
-
- - name: "create int vlan 10"
- nxos_config:
- commands: "int vlan 10"
-
- - name: Ensure vrrp group 100 and vip 10.1.100.1 is on vlan10
- nxos_vrrp: &configure
- interface: vlan10
- group: 100
- vip: 10.1.100.1
- admin_state: 'no shutdown'
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Conf Idempotence"
- nxos_vrrp: *configure
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: Ensure vrrp group 100 is default
- nxos_vrrp: &configure_def
- interface: vlan10
- group: 100
- vip: default
- admin_state: default
- register: result
-
- - assert: *true
-
- - name: "Conf Idempotence"
- nxos_vrrp: *configure_def
- register: result
-
- - assert: *false
-
- - name: Ensure removal of the vrrp group config
- nxos_vrrp: &remove
- interface: vlan10
- group: 100
- state: absent
- register: result
-
- - assert: *true
-
- - pause:
- seconds: 30
-
- - name: "Remove Idempotence"
- nxos_vrrp: *remove
- register: result
-
- - assert: *false
-
- - pause:
- seconds: 30
-
- - name: Re-config with more params
- nxos_vrrp: &reconfig
- interface: vlan10
- group: 100
- vip: 10.1.100.1
- preempt: False
- interval: 10
- priority: 130
- authentication: AUTHKEY
- register: result
-
- - assert: *true
-
- - name: "Reconfig Idempotence"
- nxos_vrrp: *reconfig
- register: result
-
- - assert: *false
-
- - name: Re-config with defaults
- nxos_vrrp: &reconfig_def
- interface: vlan10
- group: 100
- vip: default
- preempt: True
- interval: default
- priority: default
- authentication: default
- register: result
-
- - assert: *true
-
- - name: "Reconfig Idempotence"
- nxos_vrrp: *reconfig_def
- register: result
-
- - assert: *false
-
- always:
- - name: remove vrrp
- nxos_vrrp: *remove
- ignore_errors: yes
-
- - name: "Disable interface-vlan"
- nxos_config:
- commands:
- - no feature interface-vlan
- match: none
- ignore_errors: yes
-
- - name: "Disable vrrp"
- nxos_feature:
- feature: vrrp
- state: disabled
- ignore_errors: yes
-
-- debug: msg="END connection={{ ansible_connection }} nxos_vrrp sanity test"
diff --git a/test/integration/targets/nxos_vsan/defaults/main.yaml b/test/integration/targets/nxos_vsan/defaults/main.yaml
deleted file mode 100644
index 55a93fc23d..0000000000
--- a/test/integration/targets/nxos_vsan/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*" \ No newline at end of file
diff --git a/test/integration/targets/nxos_vsan/meta/main.yml b/test/integration/targets/nxos_vsan/meta/main.yml
deleted file mode 100644
index 42c635d6d2..0000000000
--- a/test/integration/targets/nxos_vsan/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-# dependencies:
-# - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_vsan/tasks/cli.yaml b/test/integration/targets/nxos_vsan/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_vsan/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vsan/tasks/main.yaml b/test/integration/targets/nxos_vsan/tasks/main.yaml
deleted file mode 100644
index eb3f9ca07c..0000000000
--- a/test/integration/targets/nxos_vsan/tasks/main.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-#---
-# Check platform type and skip if not MDS
----
-- name: Check platform type and skip if not MDS
- nxos_command:
- commands: show version | grep MDS
- register: result
-
-- set_fact: skip_test=False
-- set_fact: skip_test=True
- when: result.stdout[0] is not search('MDS')
-
-- include: cli.yaml
- tags: 'cli'
- when: not skip_test
- \ No newline at end of file
diff --git a/test/integration/targets/nxos_vsan/tests/common/sanity.yaml b/test/integration/targets/nxos_vsan/tests/common/sanity.yaml
deleted file mode 100644
index a4bd5e2df0..0000000000
--- a/test/integration/targets/nxos_vsan/tests/common/sanity.yaml
+++ /dev/null
@@ -1,50 +0,0 @@
----
-- debug: msg="START nxos_vsan sanity test with connection={{ ansible_connection }} "
-- debug: msg="Using vsans {{ vsan1 }}, {{ vsan2 }} for running this sanity test, please make sure these are not used in the setup, these will be deleted after the tests"
-
-
-- block:
- - name: Setup - Remove vsan if configured
- nxos_vsan: &remove
- vsan:
- - { id: "{{ vsan1 | int }}", remove: True}
- - { id: "{{ vsan2 | int }}", remove: True}
- ignore_errors: yes
-
- - name: Configure vsan
- nxos_vsan: &config
- vsan:
- - id: "{{ vsan1 | int }}"
- name: vsan-SAN-A
- suspend: True
- interface:
- - "{{intA1}}"
- remove: False
- - id: "{{ vsan2 | int }}"
- name: vsan-SAN-B
- interface:
- - "{{intB1}}"
- remove: False
- register: result
-
- - assert: &true
- that:
- - result.changed == true
- - assert:
- that:
- - result.commands == ["terminal dont-ask", "vsan database", "vsan 922", "vsan 922 name vsan-SAN-A", "vsan 922 suspend", "vsan 922 interface fc1/1", "vsan 923", "vsan 923 name vsan-SAN-B", "no vsan 923 suspend", "vsan 923 interface fc1/2", "no terminal dont-ask"]
-
- - name: Idempotence Check
- nxos_vsan: *config
- register: result
-
- - assert: &false
- that:
- - result.changed == false
- - assert:
- that:
- - result.commands == []
-
- always:
- - name: Remove vsan config
- nxos_vsan: *remove
diff --git a/test/integration/targets/nxos_vsan/vars/main.yml b/test/integration/targets/nxos_vsan/vars/main.yml
deleted file mode 100644
index 2e3bcbadef..0000000000
--- a/test/integration/targets/nxos_vsan/vars/main.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-vsan1: 922
-vsan2: 923
-intA1: fc1/1
-intB1: fc1/2
diff --git a/test/integration/targets/nxos_vtp_domain/defaults/main.yaml b/test/integration/targets/nxos_vtp_domain/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_vtp_domain/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_vtp_domain/meta/main.yml b/test/integration/targets/nxos_vtp_domain/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_vtp_domain/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_vtp_domain/tasks/cli.yaml b/test/integration/targets/nxos_vtp_domain/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_vtp_domain/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vtp_domain/tasks/main.yaml b/test/integration/targets/nxos_vtp_domain/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_vtp_domain/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_vtp_domain/tasks/nxapi.yaml b/test/integration/targets/nxos_vtp_domain/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_vtp_domain/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vtp_domain/tests/common/sanity.yaml b/test/integration/targets/nxos_vtp_domain/tests/common/sanity.yaml
deleted file mode 100644
index ebd821aa37..0000000000
--- a/test/integration/targets/nxos_vtp_domain/tests/common/sanity.yaml
+++ /dev/null
@@ -1,45 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_vtp_domain sanity test"
-
-- set_fact: vtp_run="true"
-- set_fact: vtp_run="false"
- when: platform is search('N3K-F|N9K-F')
-
-- block:
- - name: disable feature vtp
- nxos_feature:
- feature: vtp
- state: disabled
- ignore_errors: yes
-
- - name: enable feature vtp
- nxos_feature:
- feature: vtp
- state: enabled
-
- - name: configure vtp domain
- nxos_vtp_domain: &configure
- domain: ntc
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Conf Idempotence"
- nxos_vtp_domain: *configure
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- when: vtp_run
-
- always:
- - name: disable feature vtp
- nxos_feature:
- feature: vtp
- state: disabled
-
-- debug: msg="END connection={{ ansible_connection }} nxos_vtp_domain sanity test"
diff --git a/test/integration/targets/nxos_vtp_password/defaults/main.yaml b/test/integration/targets/nxos_vtp_password/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_vtp_password/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_vtp_password/meta/main.yml b/test/integration/targets/nxos_vtp_password/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_vtp_password/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_vtp_password/tasks/cli.yaml b/test/integration/targets/nxos_vtp_password/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_vtp_password/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vtp_password/tasks/main.yaml b/test/integration/targets/nxos_vtp_password/tasks/main.yaml
deleted file mode 100644
index fea9337c14..0000000000
--- a/test/integration/targets/nxos_vtp_password/tasks/main.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-# Use block to ensure that both cli and nxapi tests
-# will run even if there are failures or errors.
-- block:
- - { include: cli.yaml, tags: ['cli'] }
- always:
- - { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_vtp_password/tasks/nxapi.yaml b/test/integration/targets/nxos_vtp_password/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_vtp_password/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vtp_password/tests/common/sanity.yaml b/test/integration/targets/nxos_vtp_password/tests/common/sanity.yaml
deleted file mode 100644
index dacc586c19..0000000000
--- a/test/integration/targets/nxos_vtp_password/tests/common/sanity.yaml
+++ /dev/null
@@ -1,64 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_vtp_password sanity test"
-
-- set_fact: vtp_run="true"
-- set_fact: vtp_run="false"
- when: platform is search('N3K-F|N9K-F')
-
-- block:
- - name: disable feature vtp
- nxos_feature:
- feature: vtp
- state: disabled
- ignore_errors: yes
-
- - name: enable feature vtp
- nxos_feature:
- feature: vtp
- state: enabled
-
- - name: configure vtp domain
- nxos_vtp_domain:
- domain: testing
-
- - name: configure vtp password
- nxos_vtp_password: &configure
- vtp_password: ntc
- state: present
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Conf Idempotence"
- nxos_vtp_password: *configure
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: remove vtp password
- nxos_vtp_password: &remove
- vtp_password: ntc
- state: absent
- register: result
-
- - assert: *true
-
- - name: "Remove Idempotence"
- nxos_vtp_password: *remove
- register: result
-
- - assert: *false
-
- when: vtp_run
-
- always:
- - name: disable feature vtp
- nxos_feature:
- feature: vtp
- state: disabled
-
-- debug: msg="END connection={{ ansible_connection }} nxos_vtp_password sanity test"
diff --git a/test/integration/targets/nxos_vtp_version/defaults/main.yaml b/test/integration/targets/nxos_vtp_version/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_vtp_version/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_vtp_version/meta/main.yml b/test/integration/targets/nxos_vtp_version/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_vtp_version/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_vtp_version/tasks/cli.yaml b/test/integration/targets/nxos_vtp_version/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_vtp_version/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vtp_version/tasks/main.yaml b/test/integration/targets/nxos_vtp_version/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_vtp_version/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_vtp_version/tasks/nxapi.yaml b/test/integration/targets/nxos_vtp_version/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_vtp_version/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vtp_version/tests/common/sanity.yaml b/test/integration/targets/nxos_vtp_version/tests/common/sanity.yaml
deleted file mode 100644
index ef5c3231d3..0000000000
--- a/test/integration/targets/nxos_vtp_version/tests/common/sanity.yaml
+++ /dev/null
@@ -1,49 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_vtp_version sanity test"
-
-- set_fact: vtp_run="true"
-- set_fact: vtp_run="false"
- when: platform is search('N3K-F|N9K-F')
-
-- block:
- - name: disable feature vtp
- nxos_feature:
- feature: vtp
- state: disabled
- ignore_errors: yes
-
- - name: enable feature vtp
- nxos_feature:
- feature: vtp
- state: enabled
-
- - name: configure supporting vtp domain
- nxos_vtp_domain:
- domain: foo
-
- - name: configure vtp version
- nxos_vtp_version: &configure
- version: 2
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Conf Idempotence"
- nxos_vtp_version: *configure
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- when: vtp_run | bool
-
- always:
- - name: disable feature vtp
- nxos_feature:
- feature: vtp
- state: disabled
-
-- debug: msg="END connection={{ ansible_connection }} nxos_vtp_version sanity test"
diff --git a/test/integration/targets/nxos_vxlan_vtep/defaults/main.yaml b/test/integration/targets/nxos_vxlan_vtep/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_vxlan_vtep/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_vxlan_vtep/meta/main.yml b/test/integration/targets/nxos_vxlan_vtep/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_vxlan_vtep/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_vxlan_vtep/tasks/cli.yaml b/test/integration/targets/nxos_vxlan_vtep/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_vxlan_vtep/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vxlan_vtep/tasks/main.yaml b/test/integration/targets/nxos_vxlan_vtep/tasks/main.yaml
deleted file mode 100644
index 4b0f8c64d9..0000000000
--- a/test/integration/targets/nxos_vxlan_vtep/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_vxlan_vtep/tasks/nxapi.yaml b/test/integration/targets/nxos_vxlan_vtep/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_vxlan_vtep/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vxlan_vtep/tasks/platform/n7k/cleanup.yaml b/test/integration/targets/nxos_vxlan_vtep/tasks/platform/n7k/cleanup.yaml
deleted file mode 100644
index 5f0fe44949..0000000000
--- a/test/integration/targets/nxos_vxlan_vtep/tasks/platform/n7k/cleanup.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-- name: "Unconfigure VDC setting limit-resource module-type f3"
- nxos_config:
- commands:
- - 'terminal dont-ask ; vdc {{ vdcid }} ; no limit-resource module-type f3'
- match: none
- ignore_errors: yes
-
-- name: Previous command is asynchronous and can take a while. Allow time for it to complete
- pause:
- seconds: 45
-
-- name: "Configure VDC setting allocate interface unallocated-interfaces"
- nxos_config: &allocate
- commands:
- - 'terminal dont-ask ; vdc {{ vdcid }} ; allocate interface unallocated-interfaces'
- match: none
- ignore_errors: yes
-
-- name: Previous command is asynchronous can take a while. Allow time for it to complete
- pause:
- seconds: 45
diff --git a/test/integration/targets/nxos_vxlan_vtep/tasks/platform/n7k/setup.yaml b/test/integration/targets/nxos_vxlan_vtep/tasks/platform/n7k/setup.yaml
deleted file mode 100644
index 0501a90985..0000000000
--- a/test/integration/targets/nxos_vxlan_vtep/tasks/platform/n7k/setup.yaml
+++ /dev/null
@@ -1,29 +0,0 @@
----
-- name: "Get default vdc id"
- nxos_command:
- commands: ['show vdc current-vdc | json']
- register: vdcout
-
-- set_fact: vdcid="{{ vdcout.stdout_lines[0].name }}"
-
-- name: "Configure VDC setting limit-resource module-type f3"
- nxos_config:
- commands:
- - "terminal dont-ask ; vdc {{ vdcid }} ; limit-resource module-type f3"
- match: none
- ignore_errors: yes
-
-- name: Previous command is asynchronous and can take a while. Allow time for it to complete
- pause:
- seconds: 45
-
-- name: "Configure VDC setting allocate interface unallocated-interfaces"
- nxos_config: &allocate
- commands:
- - "terminal dont-ask ; vdc {{ vdcid }} ; allocate interface unallocated-interfaces"
- match: none
- ignore_errors: yes
-
-- name: Previous command is asynchronous and can take a while. Allow time for it to complete
- pause:
- seconds: 45
diff --git a/test/integration/targets/nxos_vxlan_vtep/tests/common/sanity.yaml b/test/integration/targets/nxos_vxlan_vtep/tests/common/sanity.yaml
deleted file mode 100644
index 69e54ec7a6..0000000000
--- a/test/integration/targets/nxos_vxlan_vtep/tests/common/sanity.yaml
+++ /dev/null
@@ -1,219 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_vxlan_vtep sanity test"
-
-- block:
- # N9K(v9.2+) specific attrs
- - set_fact: global_mcast_group_L2="225.1.1.2"
- - set_fact: def_global_mcast_group_L2="default"
-
- # Layer 3 Tenant Routed Multicast (TRM) dependency.
- # global_mcast_group_l3 / global_ingress_replication_bgp have a dependency on TRM.
- # TRM requires specific 92/93/95 chassis and -EX/-FX line cards.
- - block:
- - set_fact: global_mcast_group_L3="225.1.1.1"
- - set_fact: def_global_mcast_group_L3="default"
- - set_fact: global_ingress_replication_bgp="true"
- - set_fact: def_global_ingress_replication_bgp="false"
- when: false # Manually change this to true when correct h/w is present
-
- - name: "TCAM resource check for global_suppress_arp"
- # GSA requires tcam resources. Skip these attrs when arp-ether size is 0.
- # Note: TCAM changes require a switch reload.
- # Sample Input: "Ingress ARP-Ether ACL [arp-ether] size = 256"
- nxos_command:
- commands:
- - command: show hardware access-list tcam region | incl arp-ether | sed 's/.*size = *//'
- output: text
- connection: network_cli
- register: tcam_state
- - block:
- - set_fact: global_suppress_arp="true"
- - set_fact: def_global_suppress_arp="false"
- when: "tcam_state.stdout[0]|int > 0"
-
- when: platform is search('N9K') and (major_version is version('9.2', 'ge'))
-
-- block:
- - name: "Apply N7K specific setup config"
- include: targets/nxos_vxlan_vtep/tasks/platform/n7k/setup.yaml
- when: platform is match('N7K')
-
- - name: "Enable feature nv overlay"
- nxos_config:
- commands:
- - feature nv overlay
- - nv overlay evpn
- match: none
-
- - block:
- - name: "Enable feature ngmvpn"
- nxos_config:
- commands:
- - feature ngmvpn
- match: none
- when: global_mcast_group_L3 is defined
-
- - block:
- - name: configure vxlan_vtep
- nxos_vxlan_vtep: &configure9
- interface: nve1
- description: "abcd"
- host_reachability: true
- source_interface: Loopback0
- source_interface_hold_down_time: 30
- global_ingress_replication_bgp: "{{ global_ingress_replication_bgp|default(omit) }}"
- global_suppress_arp: "{{ global_suppress_arp|default(omit) }}"
- global_mcast_group_L3: "{{ global_mcast_group_L3|default(omit) }}"
- shutdown: false
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Conf Idempotence"
- nxos_vxlan_vtep: *configure9
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: reset vxlan_vtep
- nxos_vxlan_vtep: &def9
- interface: nve1
- description: default
- host_reachability: false
- source_interface_hold_down_time: default
- source_interface: default
- global_ingress_replication_bgp: "{{ def_global_ingress_replication_bgp|default(omit) }}"
- global_suppress_arp: "{{ def_global_suppress_arp|default(omit) }}"
- global_mcast_group_L3: "{{ def_global_mcast_group_L3|default(omit) }}"
- shutdown: true
- register: result
-
- - assert: *true
-
- - name: "reset Idempotence"
- nxos_vxlan_vtep: *def9
- register: result
-
- - assert: *false
-
- - name: configure global mcast L2
- nxos_vxlan_vtep: &gml2
- interface: nve1
- host_reachability: true
- global_mcast_group_L2: "{{ global_mcast_group_L2|default(omit) }}"
- register: result
-
- - assert: *true
-
- - name: "Conf Idempotence"
- nxos_vxlan_vtep: *gml2
- register: result
-
- - assert: *false
-
- - name: reset global mcast L2
- nxos_vxlan_vtep: &rgml2
- interface: nve1
- host_reachability: false
- global_mcast_group_L2: "{{ def_global_mcast_group_L2|default(omit) }}"
- register: result
-
- - assert: *true
-
- - name: "reset Idempotence"
- nxos_vxlan_vtep: *rgml2
- register: result
-
- - assert: *false
-
- when: (platform is search('N9K'))
-
- - block:
- - name: configure vxlan_vtep
- nxos_vxlan_vtep: &configure7
- interface: nve1
- description: default
- host_reachability: true
- source_interface: Loopback0
- shutdown: false
- register: result
-
- - assert:
- that:
- - "result.changed == true"
-
- - name: "Conf Idempotence"
- nxos_vxlan_vtep: *configure7
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- - name: reset vxlan_vtep
- nxos_vxlan_vtep: &def7
- interface: nve1
- description: default
- host_reachability: false
- source_interface: default
- shutdown: true
- register: result
-
- - assert: *true
-
- - name: "reset Idempotence"
- nxos_vxlan_vtep: *def7
- register: result
-
- - assert: *false
-
- when: (platform is search('N7K'))
-
- - name: remove vxlan_vtep
- nxos_vxlan_vtep: &remove
- interface: nve1
- description: default
- host_reachability: true
- source_interface: Loopback0
- source_interface_hold_down_time: 30
- shutdown: true
- state: absent
- register: result
-
- - assert:
- that:
- - "result.changed == true"
-
- - name: "Remove Idempotence"
- nxos_vxlan_vtep: *remove
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- when: (platform is search("N7K|N9K"))
-
- always:
- - name: "Apply N7K specific cleanup config"
- include: targets/nxos_vxlan_vtep/tasks/platform/n7k/cleanup.yaml
- when: platform is match('N7K')
-
- - name: "Disable nv overlay evpn"
- nxos_config:
- commands:
- - no nv overlay evpn
- match: none
- ignore_errors: yes
-
- - name: "Disable feature nv overlay"
- nxos_feature:
- feature: nve
- state: disabled
- ignore_errors: yes
-
-- debug: msg="END connection={{ ansible_connection }} nxos_vxlan_vtep sanity test"
diff --git a/test/integration/targets/nxos_vxlan_vtep_vni/defaults/main.yaml b/test/integration/targets/nxos_vxlan_vtep_vni/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/nxos_vxlan_vtep_vni/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/nxos_vxlan_vtep_vni/meta/main.yml b/test/integration/targets/nxos_vxlan_vtep_vni/meta/main.yml
deleted file mode 100644
index ae741cbdc7..0000000000
--- a/test/integration/targets/nxos_vxlan_vtep_vni/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_vxlan_vtep_vni/tasks/cli.yaml b/test/integration/targets/nxos_vxlan_vtep_vni/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_vxlan_vtep_vni/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vxlan_vtep_vni/tasks/main.yaml b/test/integration/targets/nxos_vxlan_vtep_vni/tasks/main.yaml
deleted file mode 100644
index fea9337c14..0000000000
--- a/test/integration/targets/nxos_vxlan_vtep_vni/tasks/main.yaml
+++ /dev/null
@@ -1,7 +0,0 @@
----
-# Use block to ensure that both cli and nxapi tests
-# will run even if there are failures or errors.
-- block:
- - { include: cli.yaml, tags: ['cli'] }
- always:
- - { include: nxapi.yaml, tags: ['nxapi'] }
diff --git a/test/integration/targets/nxos_vxlan_vtep_vni/tasks/nxapi.yaml b/test/integration/targets/nxos_vxlan_vtep_vni/tasks/nxapi.yaml
deleted file mode 100644
index cbf41b9294..0000000000
--- a/test/integration/targets/nxos_vxlan_vtep_vni/tasks/nxapi.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect nxapi test cases
- find:
- paths: "{{ role_path }}/tests/nxapi"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: nxapi_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ nxapi_cases.files }}"
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test cases (connection=httpapi)
- include: "{{ test_case_to_run }} ansible_connection=httpapi connection={{ nxapi }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_vxlan_vtep_vni/tests/common/sanity.yaml b/test/integration/targets/nxos_vxlan_vtep_vni/tests/common/sanity.yaml
deleted file mode 100644
index 4f68ea9c0c..0000000000
--- a/test/integration/targets/nxos_vxlan_vtep_vni/tests/common/sanity.yaml
+++ /dev/null
@@ -1,251 +0,0 @@
----
-- debug: msg="START connection={{ ansible_connection }} nxos_vxlan_vtep_vni sanity test"
-
-- block:
- - name: "Apply N7K specific setup config"
- include: targets/nxos_vxlan_vtep/tasks/platform/n7k/setup.yaml
- when: platform is match('N7K')
-
- - name: "Enable feature nv overlay"
- nxos_config:
- commands:
- - feature nv overlay
- match: none
-
- - name: configure vxlan_vtep
- nxos_vxlan_vtep:
- interface: nve1
- host_reachability: True
-
- - name: configure vxlan_vtep_vni assoc-vrf
- nxos_vxlan_vtep_vni: &conf1
- interface: nve1
- vni: 6000
- assoc_vrf: True
- register: result
-
- - assert: &true
- that:
- - "result.changed == true"
-
- - name: "Conf 1 Idempotence"
- nxos_vxlan_vtep_vni: *conf1
- register: result
-
- - assert: &false
- that:
- - "result.changed == false"
-
- - name: remove vxlan_vtep_vni
- nxos_vxlan_vtep_vni:
- interface: nve1
- vni: 6000
- assoc_vrf: True
- state: absent
-
- - name: configure vxlan_vtep_vni
- nxos_vxlan_vtep_vni: &conf2
- interface: nve1
- vni: 8000
- register: result
-
- - assert: *true
-
- - name: configure vxlan_vtep_vni mcast
- nxos_vxlan_vtep_vni: &conf3
- interface: nve1
- vni: 8000
- multicast_group: 224.1.1.1
- register: result
-
- - assert: *true
-
- - name: "Conf 3 Idempotence"
- nxos_vxlan_vtep_vni: *conf3
- register: result
-
- - assert: *false
-
- - name: configure vxlan_vtep_vni default mcast
- nxos_vxlan_vtep_vni: &conf4
- interface: nve1
- vni: 8000
- multicast_group: default
- register: result
-
- - assert: *true
-
- - name: "Conf 4 Idempotence"
- nxos_vxlan_vtep_vni: *conf4
- register: result
-
- - assert: *false
-
- - name: "remove config"
- nxos_vxlan_vtep_vni: &remove
- interface: nve1
- vni: 8000
- state: absent
-
- - name: configure vxlan_vtep
- nxos_vxlan_vtep:
- interface: nve1
- host_reachability: False
-
- - block:
- - name: configure vxlan_vtep_vni
- nxos_vxlan_vtep_vni: &conf5
- interface: nve1
- vni: 8000
- register: result
-
- - assert: *true
-
- - name: configure vxlan_vtep_vni ingress static
- nxos_vxlan_vtep_vni: &conf6
- interface: nve1
- vni: 8000
- ingress_replication: static
- register: result
-
- - assert: *true
-
- - name: check configure vxlan_vtep_vni ingress static idempotence check
- nxos_vxlan_vtep_vni: *conf6
- register: result
-
- - assert: *false
-
- - name: Remove and reconfigure vxlan_vtep
- nxos_vxlan_vtep: &remove_vtep
- interface: nve1
- state: absent
-
- - name: Configure vxlan_vtep with host reachability bgp
- nxos_vxlan_vtep:
- interface: nve1
- host_reachability: True
-
- - name: configure vxlan_vtep_vni
- nxos_vxlan_vtep_vni: &config_vni
- interface: nve1
- vni: 8000
-
- - name: configure vxlan_vtep_vni ingress bgp
- nxos_vxlan_vtep_vni: &conf7
- interface: nve1
- vni: 8000
- ingress_replication: bgp
- register: result
-
- - assert: *true
-
- - name: "Conf 7 Idempotence"
- nxos_vxlan_vtep_vni: *conf7
- register: result
-
- - assert: *false
-
- - name: remove ingress_repl
- nxos_vxlan_vtep_vni: &conf8
- interface: nve1
- vni: 8000
- ingress_replication: default
- register: result
-
- - assert: *true
-
- - name: "Conf 8 Idempotence"
- nxos_vxlan_vtep_vni: *conf8
- register: result
-
- - assert: *false
-
- - name: Remove and reconfigure vxlan_vtep
- nxos_vxlan_vtep: *remove_vtep
-
- - name: Configure vxlan_vtep with host reachability static
- nxos_vxlan_vtep:
- interface: nve1
- host_reachability: False
-
- - name: configure vxlan_vtep_vni
- nxos_vxlan_vtep_vni: *config_vni
-
- - name: configure vxlan_vtep_vni peer-list
- nxos_vxlan_vtep_vni: &conf9
- interface: nve1
- vni: 8000
- peer_list:
- - 192.0.2.1
- - 192.0.2.2
- - 192.0.2.3
- - 192.0.2.4
- ingress_replication: static
- register: result
-
- - assert: *true
-
- - name: "Conf 9 Idempotence"
- nxos_vxlan_vtep_vni: *conf9
- register: result
-
- - assert: *false
-
- - name: configure vxlan_vtep_vni default peer-list
- nxos_vxlan_vtep_vni: &conf10
- interface: nve1
- vni: 8000
- peer_list: default
- ingress_replication: static
- register: result
-
- - assert: *true
-
- - name: "Conf 10 Idempotence"
- nxos_vxlan_vtep_vni: *conf10
- register: result
-
- - assert: *false
-
- - name: "Conf 9 again"
- nxos_vxlan_vtep_vni: *conf9
- register: result
-
- - assert: *true
-
- - name: remove vxlan_vtep_vni
- nxos_vxlan_vtep_vni: *remove
- register: result
-
- - assert: *true
-
- - name: "remove Idempotence"
- nxos_vxlan_vtep_vni: *remove
- register: result
-
- - assert: *false
-
- when: (platform is search('N9K'))
-
- when: (platform is search("N7K|N9K"))
-
- always:
- - name: "Apply N7K specific cleanup config"
- include: targets/nxos_vxlan_vtep/tasks/platform/n7k/cleanup.yaml
- when: platform is match('N7K')
-
- - name: remove vxlan_vtep
- nxos_vxlan_vtep:
- interface: nve1
- shutdown: true
- state: absent
- ignore_errors: yes
-
- - name: "Disable feature nv overlay"
- nxos_feature:
- feature: nve
- state: disabled
- ignore_errors: yes
-
-- debug: msg="END connection={{ ansible_connection }} nxos_vxlan_vtep_vni sanity test"
diff --git a/test/integration/targets/nxos_zone_zoneset/defaults/main.yaml b/test/integration/targets/nxos_zone_zoneset/defaults/main.yaml
deleted file mode 100644
index 55a93fc23d..0000000000
--- a/test/integration/targets/nxos_zone_zoneset/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*" \ No newline at end of file
diff --git a/test/integration/targets/nxos_zone_zoneset/meta/main.yml b/test/integration/targets/nxos_zone_zoneset/meta/main.yml
deleted file mode 100644
index 42c635d6d2..0000000000
--- a/test/integration/targets/nxos_zone_zoneset/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-# dependencies:
-# - prepare_nxos_tests
diff --git a/test/integration/targets/nxos_zone_zoneset/tasks/cli.yaml b/test/integration/targets/nxos_zone_zoneset/tasks/cli.yaml
deleted file mode 100644
index 9b62eaba65..0000000000
--- a/test/integration/targets/nxos_zone_zoneset/tasks/cli.yaml
+++ /dev/null
@@ -1,27 +0,0 @@
----
-- name: collect common test cases
- find:
- paths: "{{ role_path }}/tests/common"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: test_cases
-
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- connection: local
- register: cli_cases
-
-- set_fact:
- test_cases:
- files: "{{ test_cases.files }} + {{ cli_cases.files }}"
-
-- 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 connection={{ cli }}"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/nxos_zone_zoneset/tasks/main.yaml b/test/integration/targets/nxos_zone_zoneset/tasks/main.yaml
deleted file mode 100644
index eb3f9ca07c..0000000000
--- a/test/integration/targets/nxos_zone_zoneset/tasks/main.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
-#---
-# Check platform type and skip if not MDS
----
-- name: Check platform type and skip if not MDS
- nxos_command:
- commands: show version | grep MDS
- register: result
-
-- set_fact: skip_test=False
-- set_fact: skip_test=True
- when: result.stdout[0] is not search('MDS')
-
-- include: cli.yaml
- tags: 'cli'
- when: not skip_test
- \ No newline at end of file
diff --git a/test/integration/targets/nxos_zone_zoneset/tests/common/sanity.yaml b/test/integration/targets/nxos_zone_zoneset/tests/common/sanity.yaml
deleted file mode 100644
index f08f3ec365..0000000000
--- a/test/integration/targets/nxos_zone_zoneset/tests/common/sanity.yaml
+++ /dev/null
@@ -1,145 +0,0 @@
----
-- debug: "msg=\"START nxos_zone_zoneset sanity test with connection={{ ansible_connection }} \""
-- debug: "msg=\"Using vsans {{ vsan1 }}, {{ vsan2 }} for running this sanity test, please make sure these are not used in the setup, these will be deleted after the tests\""
-- always:
- - name: "Remove vsan config"
- nxos_vsan:
- vsan:
- - id: "{{ vsan1 | int }}"
- remove: true
- - id: "{{ vsan2 | int }}"
- remove: true
- block:
- - ignore_errors: true
- name: "Setup - Remove vsan if configured"
- nxos_vsan:
- vsan:
- - id: "{{ vsan1 | int }}"
- remove: true
- - id: "{{ vsan2 | int }}"
- remove: true
- - name: "Configure vsan"
- nxos_vsan:
- vsan:
- - id: "{{ vsan1 | int }}"
- - id: "{{ vsan2 | int }}"
- - name: "Configure zone and zoneset"
- nxos_zone_zoneset: &zoneset
- zone_zoneset_details:
- - mode: enhanced
- vsan: "{{ vsan1 | int }}"
- zone:
- - members:
- - pwwn: "11:11:11:11:11:11:11:11"
- - device_alias: test123
- - pwwn: "61:61:62:62:12:12:12:12"
- remove: true
- name: zoneA
- - members:
- - pwwn: "10:11:11:11:11:11:11:11"
- - pwwn: "62:62:62:62:21:21:21:21"
- name: zoneB
- - name: zoneC
- remove: true
- zoneset:
- - action: activate
- members:
- - name: zoneA
- - name: zoneB
- - name: zoneC
- remove: true
- name: zsetname1
- - action: deactivate
- name: zsetTestExtra
- remove: true
- - mode: basic
- smart_zoning: true
- vsan: "{{ vsan2 | int }}"
- zone:
- - members:
- - devtype: both
- pwwn: "11:11:11:11:11:11:11:11"
- - pwwn: "62:62:62:62:12:12:12:12"
- - devtype: both
- pwwn: "92:62:62:62:12:12:1a:1a"
- remove: true
- name: zone21A
- - members:
- - pwwn: "10:11:11:11:11:11:11:11"
- - pwwn: "62:62:62:62:21:21:21:21"
- - device_alias: somedummyname
- - device_alias: anydummyname
- remove: true
- name: zone21B
- zoneset:
- - action: activate
- members:
- - name: zone21A
- - name: zone21B
- name: zsetname21
- register: result
- - assert:
- that:
- - result.changed == true
- - assert:
- that:
- - result.commands == ["terminal dont-ask", "zone mode enhanced vsan 922", "zone name zoneA vsan 922", "member pwwn 11:11:11:11:11:11:11:11", "member device-alias test123", "zone name zoneB vsan 922", "member pwwn 10:11:11:11:11:11:11:11", "member pwwn 62:62:62:62:21:21:21:21", "zoneset name zsetname1 vsan 922", "member zoneA", "member zoneB", "zoneset activate name zsetname1 vsan 922", "zone commit vsan 922", "zone smart-zoning enable vsan 923", "zone name zone21A vsan 923", "member pwwn 11:11:11:11:11:11:11:11 both", "member pwwn 62:62:62:62:12:12:12:12", "zone name zone21B vsan 923", "member pwwn 10:11:11:11:11:11:11:11", "member pwwn 62:62:62:62:21:21:21:21", "member device-alias somedummyname", "zoneset name zsetname21 vsan 923", "member zone21A", "member zone21B", "zoneset activate name zsetname21 vsan 923", "no terminal dont-ask"]
-
- - name: "Idempotence Check"
- nxos_zone_zoneset: *zoneset
- register: result
- - assert:
- that:
- - result.commands == []
- - assert:
- that:
- - result.changed == false
-
- - name: "Delete zone and zoneset that was configured"
- nxos_zone_zoneset: &zonesetdelete
- zone_zoneset_details:
- - mode: enhanced
- vsan: "{{ vsan1 | int }}"
- zone:
- - name: zoneA
- remove: true
- - name: zoneB
- remove: true
- - name: zoneC
- remove: true
- zoneset:
- - name: zsetname1
- remove: true
- - action: deactivate
- name: zsetTestExtra
- remove: true
- - mode: basic
- smart_zoning: true
- vsan: "{{ vsan2 | int }}"
- zone:
- - name: zone21A
- remove: true
- - name: zone21B
- remove: true
- zoneset:
- - name: zsetname21
- remove: true
- register: result
-
- - assert:
- that:
- - result.changed == true
- - assert:
- that:
- - result.commands == ["terminal dont-ask", "no zone name zoneA vsan 922", "no zone name zoneB vsan 922", "no zoneset name zsetname1 vsan 922", "zone commit vsan 922", "no zone name zone21A vsan 923", "no zone name zone21B vsan 923", "no zoneset name zsetname21 vsan 923", "no terminal dont-ask"]
-
- - name: "Idempotence Check for zone/zoneset removal"
- nxos_zone_zoneset: *zonesetdelete
- register: result
-
- - assert:
- that:
- - result.commands == []
- - assert:
- that:
- - result.changed == false
diff --git a/test/integration/targets/nxos_zone_zoneset/vars/main.yml b/test/integration/targets/nxos_zone_zoneset/vars/main.yml
deleted file mode 100644
index 2e3bcbadef..0000000000
--- a/test/integration/targets/nxos_zone_zoneset/vars/main.yml
+++ /dev/null
@@ -1,4 +0,0 @@
-vsan1: 922
-vsan2: 923
-intA1: fc1/1
-intB1: fc1/2
diff --git a/test/sanity/ignore.txt b/test/sanity/ignore.txt
index 4e163869ff..2ff18a9d6a 100644
--- a/test/sanity/ignore.txt
+++ b/test/sanity/ignore.txt
@@ -100,16 +100,6 @@ lib/ansible/module_utils/network/junos/facts/legacy/base.py future-import-boiler
lib/ansible/module_utils/network/junos/facts/legacy/base.py metaclass-boilerplate
lib/ansible/module_utils/network/junos/junos.py future-import-boilerplate
lib/ansible/module_utils/network/junos/junos.py metaclass-boilerplate
-lib/ansible/module_utils/network/nxos/argspec/facts/facts.py future-import-boilerplate
-lib/ansible/module_utils/network/nxos/argspec/facts/facts.py metaclass-boilerplate
-lib/ansible/module_utils/network/nxos/facts/facts.py future-import-boilerplate
-lib/ansible/module_utils/network/nxos/facts/facts.py metaclass-boilerplate
-lib/ansible/module_utils/network/nxos/facts/legacy/base.py future-import-boilerplate
-lib/ansible/module_utils/network/nxos/facts/legacy/base.py metaclass-boilerplate
-lib/ansible/module_utils/network/nxos/nxos.py future-import-boilerplate
-lib/ansible/module_utils/network/nxos/nxos.py metaclass-boilerplate
-lib/ansible/module_utils/network/nxos/utils/utils.py future-import-boilerplate
-lib/ansible/module_utils/network/nxos/utils/utils.py metaclass-boilerplate
lib/ansible/module_utils/network/skydive/api.py future-import-boilerplate
lib/ansible/module_utils/network/skydive/api.py metaclass-boilerplate
lib/ansible/module_utils/network/vyos/vyos.py future-import-boilerplate
@@ -1930,521 +1920,6 @@ lib/ansible/modules/network/junos/junos_vrf.py validate-modules:missing-suboptio
lib/ansible/modules/network/junos/junos_vrf.py validate-modules:parameter-list-no-elements
lib/ansible/modules/network/junos/junos_vrf.py validate-modules:parameter-type-not-in-doc
lib/ansible/modules/network/junos/junos_vrf.py validate-modules:undocumented-parameter
-lib/ansible/modules/network/nxos/_nxos_interface.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/nxos/_nxos_interface.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/_nxos_interface.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/_nxos_interface.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/network/nxos/_nxos_interface.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/_nxos_interface.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/_nxos_interface.py validate-modules:missing-suboption-docs
-lib/ansible/modules/network/nxos/_nxos_interface.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/_nxos_interface.py validate-modules:undocumented-parameter
-lib/ansible/modules/network/nxos/_nxos_l2_interface.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/nxos/_nxos_l2_interface.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/_nxos_l2_interface.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/_nxos_l2_interface.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/network/nxos/_nxos_l2_interface.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/_nxos_l2_interface.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/_nxos_l2_interface.py validate-modules:missing-suboption-docs
-lib/ansible/modules/network/nxos/_nxos_l2_interface.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/_nxos_l2_interface.py validate-modules:undocumented-parameter
-lib/ansible/modules/network/nxos/_nxos_l3_interface.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/nxos/_nxos_l3_interface.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/_nxos_l3_interface.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/_nxos_l3_interface.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/network/nxos/_nxos_l3_interface.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/_nxos_l3_interface.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/_nxos_l3_interface.py validate-modules:missing-suboption-docs
-lib/ansible/modules/network/nxos/_nxos_l3_interface.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/_nxos_l3_interface.py validate-modules:undocumented-parameter
-lib/ansible/modules/network/nxos/_nxos_linkagg.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/nxos/_nxos_linkagg.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/_nxos_linkagg.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/_nxos_linkagg.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/network/nxos/_nxos_linkagg.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/_nxos_linkagg.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/_nxos_linkagg.py validate-modules:missing-suboption-docs
-lib/ansible/modules/network/nxos/_nxos_linkagg.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/network/nxos/_nxos_linkagg.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/_nxos_linkagg.py validate-modules:undocumented-parameter
-lib/ansible/modules/network/nxos/_nxos_vlan.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/nxos/_nxos_vlan.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/_nxos_vlan.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/_nxos_vlan.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/network/nxos/_nxos_vlan.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/_nxos_vlan.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/_nxos_vlan.py validate-modules:missing-suboption-docs
-lib/ansible/modules/network/nxos/_nxos_vlan.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/network/nxos/_nxos_vlan.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/_nxos_vlan.py validate-modules:undocumented-parameter
-lib/ansible/modules/network/nxos/nxos_aaa_server.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_aaa_server.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_aaa_server.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/nxos/nxos_aaa_server.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_aaa_server.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_aaa_server.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_aaa_server.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_aaa_server.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_aaa_server_host.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_aaa_server_host.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_aaa_server_host.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_aaa_server_host.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_aaa_server_host.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_aaa_server_host.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_aaa_server_host.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_acl.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_acl.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_acl.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/nxos/nxos_acl.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_acl.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_acl.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_acl.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_acl.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_acl_interface.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_acl_interface.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_acl_interface.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_acl_interface.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_acl_interface.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_acl_interface.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_acl_interface.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_banner.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_banner.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_banner.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_banner.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_banner.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_banner.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_bfd_global.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_bfd_global.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_bfd_global.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_bfd_global.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_bfd_global.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_bgp.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_bgp.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_bgp.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/nxos/nxos_bgp.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_bgp.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_bgp.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_bgp.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_bgp.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/network/nxos/nxos_bgp.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_bgp_af.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_bgp_af.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_bgp_af.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_bgp_af.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_bgp_af.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_bgp_af.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_bgp_af.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/network/nxos/nxos_bgp_af.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_bgp_neighbor.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_bgp_neighbor.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_bgp_neighbor.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_bgp_neighbor.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_bgp_neighbor.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_bgp_neighbor.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_bgp_neighbor.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_bgp_neighbor_af.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_bgp_neighbor_af.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_bgp_neighbor_af.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/nxos/nxos_bgp_neighbor_af.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_bgp_neighbor_af.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_bgp_neighbor_af.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_bgp_neighbor_af.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_bgp_neighbor_af.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/network/nxos/nxos_bgp_neighbor_af.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_command.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/nxos/nxos_command.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_command.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_command.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_command.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_command.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/network/nxos/nxos_command.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_config.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_config.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_config.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_config.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_config.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_config.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_config.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/network/nxos/nxos_config.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_evpn_global.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_evpn_global.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_evpn_global.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_evpn_global.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_evpn_global.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_evpn_vni.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_evpn_vni.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_evpn_vni.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_evpn_vni.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_evpn_vni.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_evpn_vni.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_evpn_vni.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/network/nxos/nxos_evpn_vni.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_facts.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_facts.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_facts.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_facts.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_facts.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_facts.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/network/nxos/nxos_facts.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_feature.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_feature.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_feature.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_feature.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_feature.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_feature.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_feature.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_gir.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_gir.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_gir.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/nxos/nxos_gir.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_gir.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_gir.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_gir.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_gir.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_gir_profile_management.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_gir_profile_management.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_gir_profile_management.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_gir_profile_management.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_gir_profile_management.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_gir_profile_management.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_gir_profile_management.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/network/nxos/nxos_gir_profile_management.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_hsrp.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_hsrp.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_hsrp.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_hsrp.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_hsrp.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_hsrp.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_hsrp.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_igmp.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_igmp.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_igmp.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_igmp.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_igmp.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_igmp.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_igmp_interface.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_igmp_interface.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_igmp_interface.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/nxos/nxos_igmp_interface.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_igmp_interface.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_igmp_interface.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_igmp_interface.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_igmp_interface.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_igmp_snooping.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_igmp_snooping.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_igmp_snooping.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_igmp_snooping.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_igmp_snooping.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_igmp_snooping.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_igmp_snooping.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_install_os.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_install_os.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_install_os.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_install_os.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_install_os.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_install_os.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_interface_ospf.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_interface_ospf.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_interface_ospf.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_interface_ospf.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_interface_ospf.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_interface_ospf.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_interface_ospf.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_lag_interfaces.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/nxos/nxos_lag_interfaces.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/network/nxos/nxos_lldp.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/nxos/nxos_lldp.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_lldp.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_lldp.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_lldp.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_logging.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_logging.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_logging.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_logging.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_logging.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_logging.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_logging.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/network/nxos/nxos_logging.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_ntp.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_ntp.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_ntp.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_ntp.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_ntp.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_ntp_auth.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_ntp_auth.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_ntp_auth.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_ntp_auth.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_ntp_auth.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_ntp_auth.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_ntp_auth.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_ntp_options.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_ntp_options.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_ntp_options.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_ntp_options.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_ntp_options.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_ntp_options.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_ntp_options.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_nxapi.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_nxapi.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_nxapi.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/nxos/nxos_nxapi.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_nxapi.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_nxapi.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_nxapi.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_nxapi.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_ospf.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_ospf.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_ospf.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_ospf.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_ospf.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_ospf.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_ospf.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_ospf_vrf.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_ospf_vrf.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_ospf_vrf.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_ospf_vrf.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_ospf_vrf.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_ospf_vrf.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_ospf_vrf.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_overlay_global.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_overlay_global.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_overlay_global.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_overlay_global.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_overlay_global.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_overlay_global.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_pim.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_pim.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_pim.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_pim.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_pim.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_pim.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/network/nxos/nxos_pim.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_pim_interface.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_pim_interface.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_pim_interface.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/nxos/nxos_pim_interface.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_pim_interface.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_pim_interface.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_pim_rp_address.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_pim_rp_address.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_pim_rp_address.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/nxos/nxos_pim_rp_address.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_pim_rp_address.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_pim_rp_address.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_pim_rp_address.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_pim_rp_address.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_ping.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_ping.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_ping.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_ping.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_ping.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_ping.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_ping.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_reboot.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_reboot.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_reboot.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_reboot.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_reboot.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_rollback.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_rollback.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_rollback.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_rollback.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_rollback.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_rollback.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_rpm.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_rpm.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_rpm.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/nxos/nxos_rpm.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_rpm.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_rpm.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/network/nxos/nxos_rpm.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_rpm.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_rpm.py validate-modules:missing-suboption-docs
-lib/ansible/modules/network/nxos/nxos_rpm.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_rpm.py validate-modules:undocumented-parameter
-lib/ansible/modules/network/nxos/nxos_smu.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_smu.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_smu.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_smu.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_smu.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_smu.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_snapshot.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_snapshot.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_snapshot.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_snapshot.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_snapshot.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_snapshot.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_snapshot.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_snmp_community.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_snmp_community.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_snmp_community.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_snmp_community.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_snmp_community.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_snmp_community.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_snmp_community.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_snmp_contact.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_snmp_contact.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_snmp_contact.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_snmp_contact.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_snmp_contact.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_snmp_contact.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_snmp_contact.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_snmp_host.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_snmp_host.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_snmp_host.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_snmp_host.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_snmp_host.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_snmp_host.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_snmp_host.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_snmp_location.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_snmp_location.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_snmp_location.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_snmp_location.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_snmp_location.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_snmp_location.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_snmp_location.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_snmp_traps.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_snmp_traps.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_snmp_traps.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_snmp_traps.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_snmp_traps.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_snmp_traps.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_snmp_user.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_snmp_user.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_snmp_user.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_snmp_user.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_snmp_user.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_snmp_user.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_snmp_user.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_static_route.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_static_route.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_static_route.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/nxos/nxos_static_route.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_static_route.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_static_route.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/network/nxos/nxos_static_route.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_static_route.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_static_route.py validate-modules:missing-suboption-docs
-lib/ansible/modules/network/nxos/nxos_static_route.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_static_route.py validate-modules:undocumented-parameter
-lib/ansible/modules/network/nxos/nxos_system.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_system.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_system.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_system.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_system.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_system.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_system.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/network/nxos/nxos_system.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_telemetry.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/network/nxos/nxos_udld.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_udld.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_udld.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_udld.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_udld.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_udld.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_udld.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_udld_interface.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_udld_interface.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_udld_interface.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_udld_interface.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_udld_interface.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_udld_interface.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_udld_interface.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_user.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_user.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_user.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/nxos/nxos_user.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_user.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_user.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/network/nxos/nxos_user.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_user.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_user.py validate-modules:missing-suboption-docs
-lib/ansible/modules/network/nxos/nxos_user.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/network/nxos/nxos_user.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_user.py validate-modules:undocumented-parameter
-lib/ansible/modules/network/nxos/nxos_vlans.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/network/nxos/nxos_vpc.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_vpc.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_vpc.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_vpc.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_vpc.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_vpc.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_vpc.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_vpc_interface.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_vpc_interface.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_vpc_interface.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_vpc_interface.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_vpc_interface.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_vpc_interface.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_vpc_interface.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_vrf.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_vrf.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_vrf.py validate-modules:doc-choices-do-not-match-spec
-lib/ansible/modules/network/nxos/nxos_vrf.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_vrf.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_vrf.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/network/nxos/nxos_vrf.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_vrf.py validate-modules:missing-suboption-docs
-lib/ansible/modules/network/nxos/nxos_vrf.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/network/nxos/nxos_vrf.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_vrf.py validate-modules:undocumented-parameter
-lib/ansible/modules/network/nxos/nxos_vrf_af.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_vrf_af.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_vrf_af.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_vrf_af.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_vrf_af.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_vrf_af.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_vrf_interface.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_vrf_interface.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_vrf_interface.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_vrf_interface.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_vrf_interface.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_vrf_interface.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_vrf_interface.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_vrrp.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_vrrp.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_vrrp.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_vrrp.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_vrrp.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_vrrp.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_vrrp.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_vtp_domain.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_vtp_domain.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_vtp_domain.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_vtp_domain.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_vtp_domain.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_vtp_domain.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_vtp_password.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_vtp_password.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_vtp_password.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_vtp_password.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_vtp_password.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_vtp_password.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_vtp_password.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_vtp_version.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_vtp_version.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_vtp_version.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_vtp_version.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_vtp_version.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_vtp_version.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_vxlan_vtep.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_vxlan_vtep.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_vxlan_vtep.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_vxlan_vtep.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_vxlan_vtep.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_vxlan_vtep.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_vxlan_vtep.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/nxos_vxlan_vtep_vni.py future-import-boilerplate
-lib/ansible/modules/network/nxos/nxos_vxlan_vtep_vni.py metaclass-boilerplate
-lib/ansible/modules/network/nxos/nxos_vxlan_vtep_vni.py validate-modules:doc-default-does-not-match-spec
-lib/ansible/modules/network/nxos/nxos_vxlan_vtep_vni.py validate-modules:doc-default-incompatible-type
-lib/ansible/modules/network/nxos/nxos_vxlan_vtep_vni.py validate-modules:doc-missing-type
-lib/ansible/modules/network/nxos/nxos_vxlan_vtep_vni.py validate-modules:doc-required-mismatch
-lib/ansible/modules/network/nxos/nxos_vxlan_vtep_vni.py validate-modules:parameter-list-no-elements
-lib/ansible/modules/network/nxos/nxos_vxlan_vtep_vni.py validate-modules:parameter-type-not-in-doc
-lib/ansible/modules/network/nxos/storage/nxos_devicealias.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/network/nxos/storage/nxos_vsan.py validate-modules:doc-elements-mismatch
-lib/ansible/modules/network/nxos/storage/nxos_zone_zoneset.py validate-modules:doc-elements-mismatch
lib/ansible/modules/network/ovs/openvswitch_bridge.py validate-modules:doc-choices-do-not-match-spec
lib/ansible/modules/network/ovs/openvswitch_bridge.py validate-modules:doc-missing-type
lib/ansible/modules/network/ovs/openvswitch_bridge.py validate-modules:parameter-type-not-in-doc
@@ -2828,7 +2303,6 @@ lib/ansible/plugins/action/dellos6.py action-plugin-docs # base class for deprec
lib/ansible/plugins/action/dellos9.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
-lib/ansible/plugins/action/nxos.py action-plugin-docs # base class for deprecated network platform modules using `connection: local`
lib/ansible/plugins/action/vyos.py action-plugin-docs # base class for deprecated network platform modules using `connection: local`
lib/ansible/plugins/cache/base.py ansible-doc!skip # not a plugin, but a stub for backwards compatibility
lib/ansible/plugins/doc_fragments/azure.py future-import-boilerplate
@@ -2859,8 +2333,6 @@ 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/junos.py future-import-boilerplate
lib/ansible/plugins/doc_fragments/junos.py metaclass-boilerplate
-lib/ansible/plugins/doc_fragments/nxos.py future-import-boilerplate
-lib/ansible/plugins/doc_fragments/nxos.py metaclass-boilerplate
lib/ansible/plugins/doc_fragments/openstack.py future-import-boilerplate
lib/ansible/plugins/doc_fragments/openstack.py metaclass-boilerplate
lib/ansible/plugins/doc_fragments/ovirt.py future-import-boilerplate
@@ -3138,7 +2610,6 @@ test/units/modules/cloud/openstack/test_os_server.py metaclass-boilerplate
test/units/modules/conftest.py future-import-boilerplate
test/units/modules/conftest.py metaclass-boilerplate
test/units/modules/files/test_copy.py future-import-boilerplate
-test/units/modules/network/nxos/test_nxos_acl_interface.py metaclass-boilerplate
test/units/modules/packaging/language/test_pip.py future-import-boilerplate
test/units/modules/packaging/language/test_pip.py metaclass-boilerplate
test/units/modules/packaging/os/conftest.py future-import-boilerplate
diff --git a/test/units/modules/network/nxos/fixtures/_nxos_interface/show_interface b/test/units/modules/network/nxos/fixtures/_nxos_interface/show_interface
deleted file mode 100644
index f50b8f24e9..0000000000
--- a/test/units/modules/network/nxos/fixtures/_nxos_interface/show_interface
+++ /dev/null
@@ -1,129 +0,0 @@
-{
- "TABLE_interface": {
- "ROW_interface": [
- {
- "interface": "Ethernet2/1",
- "state": "up",
- "admin_state": "up",
- "share_state": "Dedicated",
- "eth_hw_desc": "Ethernet",
- "eth_hw_addr": "fa16.3e50.6647",
- "eth_bia_addr": "fa16.3e50.6619",
- "desc": "Test aggregation on first interface",
- "eth_mtu": "1500",
- "eth_bw": 1000000,
- "eth_dly": 10,
- "eth_reliability": "255",
- "eth_txload": "1",
- "eth_rxload": "1",
- "medium": "broadcast",
- "eth_mode": "routed",
- "eth_duplex": "full",
- "eth_speed": "1000 Mb/s",
- "eth_beacon": "off",
- "eth_autoneg": "off",
- "eth_in_flowctrl": "off",
- "eth_out_flowctrl": "off",
- "eth_mdix": "off",
- "eth_swt_monitor": "off",
- "eth_ethertype": "0x8100",
- "eth_eee_state": "n/a",
- "eth_link_flapped": "4d15h",
- "eth_clear_counters": "never",
- "eth_reset_cntr": 87,
- "eth_load_interval1_rx": 0,
- "eth_inrate1_bits": 0,
- "eth_inrate1_pkts": 0,
- "eth_load_interval1_tx": 0,
- "eth_outrate1_bits": 0,
- "eth_outrate1_pkts": 0,
- "eth_inrate1_summary_bits": "0 bps",
- "eth_inrate1_summary_pkts": "0 pps",
- "eth_outrate1_summary_bits": "0 bps",
- "eth_outrate1_summary_pkts": "0 pps",
- "eth_load_interval2_rx": 0,
- "eth_inrate2_bits": 0,
- "eth_inrate2_pkts": 0,
- "eth_load_interval2_tx": 0,
- "eth_outrate2_bits": 0,
- "eth_outrate2_pkts": 0,
- "eth_inrate2_summary_bits": "0 bps",
- "eth_inrate2_summary_pkts": "0 pps",
- "eth_outrate2_summary_bits": "0 bps",
- "eth_outrate2_summary_pkts": "0 pps",
- "eth_inucast": 0,
- "eth_inmcast": 0,
- "eth_inbcast": 0,
- "eth_inpkts": 0,
- "eth_inbytes": 0,
- "eth_jumbo_inpkts": 0,
- "eth_storm_supp": 0,
- "eth_runts": 0,
- "eth_giants": 0,
- "eth_crc": 0,
- "eth_nobuf": 0,
- "eth_inerr": 0,
- "eth_frame": 0,
- "eth_overrun": 0,
- "eth_underrun": 0,
- "eth_ignored": 0,
- "eth_watchdog": 0,
- "eth_bad_eth": 0,
- "eth_bad_proto": 0,
- "eth_in_ifdown_drops": 0,
- "eth_dribble": 0,
- "eth_indiscard": 0,
- "eth_inpause": 0,
- "eth_outucast": 0,
- "eth_outmcast": 0,
- "eth_outbcast": 0,
- "eth_outpkts": 0,
- "eth_outbytes": 0,
- "eth_jumbo_outpkts": 0,
- "eth_outerr": 0,
- "eth_coll": 0,
- "eth_deferred": 0,
- "eth_latecoll": 0,
- "eth_lostcarrier": 0,
- "eth_nocarrier": 0,
- "eth_babbles": 0,
- "eth_outdiscard": 0,
- "eth_outpause": 0
- },
- {
- "interface": "loopback0",
- "state": "up",
- "admin_state": "up",
- "eth_hw_desc": "Loopback",
- "desc": "Loopback",
- "eth_ip_addr": "192.168.255.1",
- "eth_ip_mask": 32,
- "eth_ip_prefix": "192.168.255.1",
- "eth_mtu": "1500",
- "eth_bw": 8000000,
- "eth_dly": 5000,
- "eth_reliability": "255",
- "eth_txload": "1",
- "eth_rxload": "1",
- "medium": "broadcast",
- "eth_mode": "routed",
- "eth_mdix": "off",
- "loop_in_pkts": 1451854,
- "loop_in_bytes": 75138128,
- "loop_in_mcast": 0,
- "loop_in_compressed": 0,
- "loop_in_errors": 0,
- "loop_in_frame": 0,
- "loop_in_overrun": 0,
- "loop_in_fifo": 0,
- "loop_out_pkts": 0,
- "loop_out_bytes": 0,
- "loop_out_underruns": 0,
- "loop_out_errors": 0,
- "loop_out_collisions": 0,
- "loop_out_fifo": 0,
- "loop_out_carriers": 0
- }
- ]
- }
-}
diff --git a/test/units/modules/network/nxos/fixtures/_nxos_interface/show_interface_Ethernet2_1 b/test/units/modules/network/nxos/fixtures/_nxos_interface/show_interface_Ethernet2_1
deleted file mode 100644
index f478350f0d..0000000000
--- a/test/units/modules/network/nxos/fixtures/_nxos_interface/show_interface_Ethernet2_1
+++ /dev/null
@@ -1,96 +0,0 @@
-{
- "TABLE_interface": {
- "ROW_interface": {
- "interface": "Ethernet2/1",
- "state": "up",
- "admin_state": "up",
- "share_state": "Dedicated",
- "eth_hw_desc": "Ethernet",
- "eth_hw_addr": "fa16.3e00.0001",
- "eth_bia_addr": "fa16.3e27.f279",
- "desc": "to nxos03",
- "eth_ip_addr": "10.0.0.45",
- "eth_ip_mask": 30,
- "eth_ip_prefix": "10.0.0.44",
- "eth_mtu": "1500",
- "eth_bw": 1000000,
- "eth_dly": 10,
- "eth_reliability": "255",
- "eth_txload": "1",
- "eth_rxload": "1",
- "medium": "broadcast",
- "eth_mode": "routed",
- "eth_duplex": "full",
- "eth_speed": "1000 Mb/s",
- "eth_beacon": "off",
- "eth_autoneg": "off",
- "eth_in_flowctrl": "off",
- "eth_out_flowctrl": "off",
- "eth_mdix": "off",
- "eth_swt_monitor": "off",
- "eth_ethertype": "0x8100",
- "eth_eee_state": "n/a",
- "eth_link_flapped": "14week(s) 0day(s)",
- "eth_clear_counters": "never",
- "eth_reset_cntr": 1,
- "eth_load_interval1_rx": 0,
- "eth_inrate1_bits": 0,
- "eth_inrate1_pkts": 0,
- "eth_load_interval1_tx": 0,
- "eth_outrate1_bits": 0,
- "eth_outrate1_pkts": 0,
- "eth_inrate1_summary_bits": "0 bps",
- "eth_inrate1_summary_pkts": "0 pps",
- "eth_outrate1_summary_bits": "0 bps",
- "eth_outrate1_summary_pkts": "0 pps",
- "eth_load_interval2_rx": 0,
- "eth_inrate2_bits": 0,
- "eth_inrate2_pkts": 0,
- "eth_load_interval2_tx": 0,
- "eth_outrate2_bits": 0,
- "eth_outrate2_pkts": 0,
- "eth_inrate2_summary_bits": "0 bps",
- "eth_inrate2_summary_pkts": "0 pps",
- "eth_outrate2_summary_bits": "0 bps",
- "eth_outrate2_summary_pkts": "0 pps",
- "eth_inucast": 0,
- "eth_inmcast": 0,
- "eth_inbcast": 0,
- "eth_inpkts": 0,
- "eth_inbytes": 0,
- "eth_jumbo_inpkts": 0,
- "eth_storm_supp": 0,
- "eth_runts": 0,
- "eth_giants": 0,
- "eth_crc": 0,
- "eth_nobuf": 0,
- "eth_inerr": 0,
- "eth_frame": 0,
- "eth_overrun": 0,
- "eth_underrun": 0,
- "eth_ignored": 0,
- "eth_watchdog": 0,
- "eth_bad_eth": 0,
- "eth_bad_proto": 0,
- "eth_in_ifdown_drops": 0,
- "eth_dribble": 0,
- "eth_indiscard": 0,
- "eth_inpause": 0,
- "eth_outucast": 0,
- "eth_outmcast": 0,
- "eth_outbcast": 0,
- "eth_outpkts": 0,
- "eth_outbytes": 0,
- "eth_jumbo_outpkts": 0,
- "eth_outerr": 0,
- "eth_coll": 0,
- "eth_deferred": 0,
- "eth_latecoll": 0,
- "eth_lostcarrier": 0,
- "eth_nocarrier": 0,
- "eth_babbles": 0,
- "eth_outdiscard": 0,
- "eth_outpause": 0
- }
- }
-}
diff --git a/test/units/modules/network/nxos/fixtures/_nxos_interface/show_interface_loopback0 b/test/units/modules/network/nxos/fixtures/_nxos_interface/show_interface_loopback0
deleted file mode 100644
index e69de29bb2..0000000000
--- a/test/units/modules/network/nxos/fixtures/_nxos_interface/show_interface_loopback0
+++ /dev/null
diff --git a/test/units/modules/network/nxos/fixtures/_nxos_interface/show_run_interface_Ethernet2_1 b/test/units/modules/network/nxos/fixtures/_nxos_interface/show_run_interface_Ethernet2_1
deleted file mode 100644
index e60c3b4c01..0000000000
--- a/test/units/modules/network/nxos/fixtures/_nxos_interface/show_run_interface_Ethernet2_1
+++ /dev/null
@@ -1,8 +0,0 @@
-interface Ethernet1/5
- description to csr02
- no switchport
- speed 1000
- mtu 1500
- mac-address fa16.3e00.000b
- ip address 172.31.0.66/30
- no shutdown
diff --git a/test/units/modules/network/nxos/fixtures/_nxos_interface/show_run_interface_loopback0 b/test/units/modules/network/nxos/fixtures/_nxos_interface/show_run_interface_loopback0
deleted file mode 100644
index e69de29bb2..0000000000
--- a/test/units/modules/network/nxos/fixtures/_nxos_interface/show_run_interface_loopback0
+++ /dev/null
diff --git a/test/units/modules/network/nxos/fixtures/_nxos_ip_interface.cfg b/test/units/modules/network/nxos/fixtures/_nxos_ip_interface.cfg
deleted file mode 100644
index 3ca37d78ee..0000000000
--- a/test/units/modules/network/nxos/fixtures/_nxos_ip_interface.cfg
+++ /dev/null
@@ -1,30 +0,0 @@
-IP Interface Status for VRF "default"(1)
-Ethernet2/4, Interface status: protocol-up/link-up/admin-up, iod: 39,
- IP address: 192.0.2.1, IP subnet: 1.1.1.0/8 route-preference: 0, tag: 0
- IP broadcast address: 255.255.255.255
- IP multicast groups locally joined: none
- IP MTU: 1500 bytes (using link MTU)
- IP primary address route-preference: 0, tag: 0
- IP proxy ARP : disabled
- IP Local Proxy ARP : disabled
- IP multicast routing: disabled
- IP icmp redirects: enabled
- IP directed-broadcast: disabled
- IP Forwarding: disabled
- IP icmp unreachables (except port): disabled
- IP icmp port-unreachable: enabled
- IP unicast reverse path forwarding: none
- IP load sharing: none
- IP interface statistics last reset: never
- IP interface software stats: (sent/received/forwarded/originated/consumed)
- Unicast packets : 0/0/0/0/0
- Unicast bytes : 0/0/0/0/0
- Multicast packets : 0/0/0/0/0
- Multicast bytes : 0/0/0/0/0
- Broadcast packets : 0/0/0/0/0
- Broadcast bytes : 0/0/0/0/0
- Labeled packets : 0/0/0/0/0
- Labeled bytes : 0/0/0/0/0
- WCCP Redirect outbound: disabled
- WCCP Redirect inbound: disabled
- WCCP Redirect exclude: disabled
diff --git a/test/units/modules/network/nxos/fixtures/_nxos_switchport/show_interface_ethernet b/test/units/modules/network/nxos/fixtures/_nxos_switchport/show_interface_ethernet
deleted file mode 100644
index 60e729b2c3..0000000000
--- a/test/units/modules/network/nxos/fixtures/_nxos_switchport/show_interface_ethernet
+++ /dev/null
@@ -1,97 +0,0 @@
-{
- "TABLE_interface": {
- "ROW_interface": {
- "interface": "Ethernet2/1",
- "state": "up",
- "admin_state": "up",
- "share_state": "Dedicated",
- "eth_hw_desc": "Ethernet",
- "eth_hw_addr": "fa16.3e00.0001",
- "eth_bia_addr": "fa16.3e27.f279",
- "desc": "to nxos03",
- "eth_ip_addr": "10.0.0.45",
- "eth_ip_mask": 30,
- "eth_ip_prefix": "10.0.0.44",
- "eth_mtu": "1500",
- "eth_bw": 1000000,
- "eth_dly": 10,
- "eth_reliability": "255",
- "eth_txload": "1",
- "eth_rxload": "1",
- "medium": "broadcast",
- "eth_mode": "access",
- "eth_bundle": 0,
- "eth_duplex": "full",
- "eth_speed": "1000 Mb/s",
- "eth_beacon": "off",
- "eth_autoneg": "off",
- "eth_in_flowctrl": "off",
- "eth_out_flowctrl": "off",
- "eth_mdix": "off",
- "eth_swt_monitor": "off",
- "eth_ethertype": "0x8100",
- "eth_eee_state": "n/a",
- "eth_link_flapped": "13week(s) 0day(s)",
- "eth_clear_counters": "never",
- "eth_reset_cntr": 1,
- "eth_load_interval1_rx": 0,
- "eth_inrate1_bits": 0,
- "eth_inrate1_pkts": 0,
- "eth_load_interval1_tx": 0,
- "eth_outrate1_bits": 0,
- "eth_outrate1_pkts": 0,
- "eth_inrate1_summary_bits": "0 bps",
- "eth_inrate1_summary_pkts": "0 pps",
- "eth_outrate1_summary_bits": "0 bps",
- "eth_outrate1_summary_pkts": "0 pps",
- "eth_load_interval2_rx": 0,
- "eth_inrate2_bits": 0,
- "eth_inrate2_pkts": 0,
- "eth_load_interval2_tx": 0,
- "eth_outrate2_bits": 0,
- "eth_outrate2_pkts": 0,
- "eth_inrate2_summary_bits": "0 bps",
- "eth_inrate2_summary_pkts": "0 pps",
- "eth_outrate2_summary_bits": "0 bps",
- "eth_outrate2_summary_pkts": "0 pps",
- "eth_inucast": 0,
- "eth_inmcast": 0,
- "eth_inbcast": 0,
- "eth_inpkts": 0,
- "eth_inbytes": 0,
- "eth_jumbo_inpkts": 0,
- "eth_storm_supp": 0,
- "eth_runts": 0,
- "eth_giants": 0,
- "eth_crc": 0,
- "eth_nobuf": 0,
- "eth_inerr": 0,
- "eth_frame": 0,
- "eth_overrun": 0,
- "eth_underrun": 0,
- "eth_ignored": 0,
- "eth_watchdog": 0,
- "eth_bad_eth": 0,
- "eth_bad_proto": 0,
- "eth_in_ifdown_drops": 0,
- "eth_dribble": 0,
- "eth_indiscard": 0,
- "eth_inpause": 0,
- "eth_outucast": 0,
- "eth_outmcast": 0,
- "eth_outbcast": 0,
- "eth_outpkts": 0,
- "eth_outbytes": 0,
- "eth_jumbo_outpkts": 0,
- "eth_outerr": 0,
- "eth_coll": 0,
- "eth_deferred": 0,
- "eth_latecoll": 0,
- "eth_lostcarrier": 0,
- "eth_nocarrier": 0,
- "eth_babbles": 0,
- "eth_outdiscard": 0,
- "eth_outpause": 0
- }
- }
-}
diff --git a/test/units/modules/network/nxos/fixtures/_nxos_switchport/show_interface_ethernet_switchport b/test/units/modules/network/nxos/fixtures/_nxos_switchport/show_interface_ethernet_switchport
deleted file mode 100644
index 352da5e7a3..0000000000
--- a/test/units/modules/network/nxos/fixtures/_nxos_switchport/show_interface_ethernet_switchport
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "TABLE_interface": {
- "ROW_interface": {
- "interface": "Ethernet2/1",
- "oper_mode": "access",
- "switchport": "Enabled",
- "access_vlan": 2,
- "access_vlan_name": "VLAN2",
- "native_vlan": 10,
- "native_vlan_name": "VLAN10",
- "trunk_vlans": "1-50"
- }
- }
-}
diff --git a/test/units/modules/network/nxos/fixtures/_nxos_switchport/show_vlan b/test/units/modules/network/nxos/fixtures/_nxos_switchport/show_vlan
deleted file mode 100644
index 407267bb00..0000000000
--- a/test/units/modules/network/nxos/fixtures/_nxos_switchport/show_vlan
+++ /dev/null
@@ -1,18 +0,0 @@
-{
- "TABLE_vlanbrief": {
- "ROW_vlanbrief": {
- "vlanshowbr-vlanid": 1,
- "vlanshowbr-vlanid-utf": 1,
- "vlanshowbr-vlanname": "VLAN1",
- "vlanshowbr-vlanstate": "active",
- "vlanshowbr-shutstate": "noshutdown"
- }
- },
- "TABLE_mtuinfo": {
- "ROW_mtuinfo": {
- "vlanshowinfo-vlanid": 1,
- "vlanshowinfo-media-type": "enet",
- "vlanshowinfo-vlanmode": "ce-vlan"
- }
- }
-}
diff --git a/test/units/modules/network/nxos/fixtures/nxos_acl/show_ip_access-list.txt b/test/units/modules/network/nxos/fixtures/nxos_acl/show_ip_access-list.txt
deleted file mode 100644
index 37be9f7d78..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_acl/show_ip_access-list.txt
+++ /dev/null
@@ -1,227 +0,0 @@
-{
- "TABLE_ip_ipv6_mac": {
- "ROW_ip_ipv6_mac": [
- {
- "op_ip_ipv6_mac": "ip",
- "acl_name": "copp-system-p-acl-bgp",
- "TABLE_seqno": {
- "ROW_seqno": [
- {
- "seqno": 10,
- "permitdeny": "permit",
- "proto_str": "tcp",
- "src_any": "any",
- "src_port_op": "gt",
- "src_port1_num": "1024",
- "dest_any": "any",
- "dest_port_op": "eq",
- "dest_port1_str": "bgp",
- "dest_port1_num": "179"
- },
- {
- "seqno": 20,
- "permitdeny": "permit",
- "proto_str": "tcp",
- "src_any": "any",
- "src_port_op": "eq",
- "src_port1_str": "bgp",
- "src_port1_num": "179",
- "dest_any": "any",
- "dest_port_op": "gt",
- "dest_port1_num": "1024"
- }
- ]
- }
- },
- {
- "op_ip_ipv6_mac": "ip",
- "acl_name": "copp-system-p-acl-cts",
- "TABLE_seqno": {
- "ROW_seqno": [
- {
- "seqno": 10,
- "permitdeny": "permit",
- "proto_str": "tcp",
- "src_any": "any",
- "dest_any": "any",
- "dest_port_op": "eq",
- "dest_port1_num": "64999"
- },
- {
- "seqno": 20,
- "permitdeny": "permit",
- "proto_str": "tcp",
- "src_any": "any",
- "src_port_op": "eq",
- "src_port1_num": "64999",
- "dest_any": "any"
- }
- ]
- }
- },
- {
- "op_ip_ipv6_mac": "ip",
- "acl_name": "copp-system-p-acl-dhcp",
- "TABLE_seqno": {
- "ROW_seqno": [
- {
- "seqno": 10,
- "permitdeny": "permit",
- "proto_str": "udp",
- "src_any": "any",
- "src_port_op": "eq",
- "src_port1_str": "bootpc",
- "src_port1_num": "68",
- "dest_any": "any"
- },
- {
- "seqno": 20,
- "permitdeny": "permit",
- "proto_str": "udp",
- "src_any": "any",
- "src_port_op": "neq",
- "src_port1_str": "bootps",
- "src_port1_num": "67",
- "dest_any": "any",
- "dest_port_op": "eq",
- "dest_port1_str": "bootps",
- "dest_port1_num": "67"
- }
- ]
- }
- },
- {
- "op_ip_ipv6_mac": "ip",
- "acl_name": "copp-system-p-acl-dhcp-relay-response",
- "TABLE_seqno": {
- "ROW_seqno": [
- {
- "seqno": 10,
- "permitdeny": "permit",
- "proto_str": "udp",
- "src_any": "any",
- "src_port_op": "eq",
- "src_port1_str": "bootps",
- "src_port1_num": "67",
- "dest_any": "any"
- },
- {
- "seqno": 20,
- "permitdeny": "permit",
- "proto_str": "udp",
- "src_any": "any",
- "dest_any": "any",
- "dest_port_op": "eq",
- "dest_port1_str": "bootpc",
- "dest_port1_num": "68"
- }
- ]
- }
- },
- {
- "op_ip_ipv6_mac": "ip",
- "acl_name": "copp-system-p-acl-eigrp",
- "TABLE_seqno": {
- "ROW_seqno": {
- "seqno": 10,
- "permitdeny": "permit",
- "proto_str": "eigrp",
- "src_any": "any",
- "dest_any": "any"
- }
- }
- },
- {
- "op_ip_ipv6_mac": "ip",
- "acl_name": "copp-system-p-acl-ftp",
- "TABLE_seqno": {
- "ROW_seqno": [
- {
- "seqno": 10,
- "permitdeny": "permit",
- "proto_str": "tcp",
- "src_any": "any",
- "dest_any": "any",
- "dest_port_op": "eq",
- "dest_port1_str": "ftp-data",
- "dest_port1_num": "20"
- },
- {
- "seqno": 20,
- "permitdeny": "permit",
- "proto_str": "tcp",
- "src_any": "any",
- "dest_any": "any",
- "dest_port_op": "eq",
- "dest_port1_str": "ftp",
- "dest_port1_num": "21"
- },
- {
- "seqno": 30,
- "permitdeny": "permit",
- "proto_str": "tcp",
- "src_any": "any",
- "src_port_op": "eq",
- "src_port1_str": "ftp-data",
- "src_port1_num": "20",
- "dest_any": "any"
- },
- {
- "seqno": 40,
- "permitdeny": "permit",
- "proto_str": "tcp",
- "src_any": "any",
- "src_port_op": "eq",
- "src_port1_str": "ftp",
- "src_port1_num": "21",
- "dest_any": "any"
- }
- ]
- }
- },
- {
- "op_ip_ipv6_mac": "ip",
- "acl_name": "copp-system-p-acl-glbp",
- "TABLE_seqno": {
- "ROW_seqno": {
- "seqno": 10,
- "permitdeny": "permit",
- "proto_str": "udp",
- "src_any": "any",
- "src_port_op": "eq",
- "src_port1_num": "3222",
- "dest_ip_prefix": "224.0.0.0/24",
- "dest_port_op": "eq",
- "dest_port1_num": "3222"
- }
- }
- },
- {
- "op_ip_ipv6_mac": "ip",
- "acl_name": "copp-system-p-acl-hsrp",
- "TABLE_seqno": {
- "ROW_seqno": [
- {
- "seqno": 10,
- "permitdeny": "permit",
- "proto_str": "udp",
- "src_any": "any",
- "dest_ip_prefix": "224.0.0.2/32",
- "dest_port_op": "eq",
- "dest_port1_num": "1985"
- },
- {
- "seqno": 20,
- "permitdeny": "permit",
- "proto_str": "udp",
- "src_any": "any",
- "dest_ip_prefix": "224.0.0.102/32",
- "dest_port_op": "eq",
- "dest_port1_num": "1985"
- }
- ]
- }
- }
- ]
- }
-}
diff --git a/test/units/modules/network/nxos/fixtures/nxos_acl_interface/show_running-config_aclmgr.txt b/test/units/modules/network/nxos/fixtures/nxos_acl_interface/show_running-config_aclmgr.txt
deleted file mode 100644
index ccf92c9913..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_acl_interface/show_running-config_aclmgr.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-ip access-list ANSIBLE_OUT
- 10 permit tcp 192.0.2.1/24 any
-interface Ethernet1/41
- ip access-group copp-system-p-acl-bgp out
diff --git a/test/units/modules/network/nxos/fixtures/nxos_acl_interfaces/nxos_acl_interfaces.cfg b/test/units/modules/network/nxos/fixtures/nxos_acl_interfaces/nxos_acl_interfaces.cfg
deleted file mode 100644
index 199244e784..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_acl_interfaces/nxos_acl_interfaces.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-interface Ethernet1/2
- ip access-group ACL1v4 out \ No newline at end of file
diff --git a/test/units/modules/network/nxos/fixtures/nxos_bfd_global/N7K.cfg b/test/units/modules/network/nxos/fixtures/nxos_bfd_global/N7K.cfg
deleted file mode 100644
index efe9626869..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_bfd_global/N7K.cfg
+++ /dev/null
@@ -1,16 +0,0 @@
-feature bfd
-
-bfd echo-interface loopback2
-bfd echo-rx-interval 56
-bfd interval 51 min_rx 52 multiplier 4
-bfd slow-timer 2001
-bfd startup-timer 6
-bfd ipv4 echo-rx-interval 54
-bfd ipv4 interval 54 min_rx 54 multiplier 4
-bfd ipv4 slow-timer 2004
-bfd ipv6 echo-rx-interval 56
-bfd ipv6 interval 56 min_rx 56 multiplier 6
-bfd ipv6 slow-timer 2006
-bfd fabricpath slow-timer 2008
-bfd fabricpath interval 58 min_rx 58 multiplier 8
-bfd fabricpath vlan 2
diff --git a/test/units/modules/network/nxos/fixtures/nxos_bfd_global/N9K.cfg b/test/units/modules/network/nxos/fixtures/nxos_bfd_global/N9K.cfg
deleted file mode 100644
index ab1d2d4a51..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_bfd_global/N9K.cfg
+++ /dev/null
@@ -1,13 +0,0 @@
-feature bfd
-
-bfd echo-interface loopback2
-bfd echo-rx-interval 56
-bfd interval 51 min_rx 52 multiplier 4
-bfd slow-timer 2001
-bfd startup-timer 6
-bfd ipv4 echo-rx-interval 54
-bfd ipv4 interval 54 min_rx 54 multiplier 4
-bfd ipv4 slow-timer 2004
-bfd ipv6 echo-rx-interval 56
-bfd ipv6 interval 56 min_rx 56 multiplier 6
-bfd ipv6 slow-timer 2006
diff --git a/test/units/modules/network/nxos/fixtures/nxos_bgp/config.cfg b/test/units/modules/network/nxos/fixtures/nxos_bgp/config.cfg
deleted file mode 100644
index 2ef5533e42..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_bgp/config.cfg
+++ /dev/null
@@ -1,17 +0,0 @@
-feature bgp
-
-router bgp 65535
- router-id 192.168.1.1
- event-history cli size medium
- event-history detail
- vrf test2
- address-family ipv4 unicast
- timers bgp 1 10
- neighbor 1.1.1.1
- neighbor 1.1.1.2
- bfd
- neighbor 3.3.3.4
- remove-private-as all
- neighbor 3.3.3.5
- address-family ipv4 unicast
- maximum-prefix 30 30
diff --git a/test/units/modules/network/nxos/fixtures/nxos_bgp/config_32_bits_as.cfg b/test/units/modules/network/nxos/fixtures/nxos_bgp/config_32_bits_as.cfg
deleted file mode 100644
index 03db9936fd..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_bgp/config_32_bits_as.cfg
+++ /dev/null
@@ -1,6 +0,0 @@
-feature bgp
-
-router bgp 65535.65535
- router-id 192.168.1.1
- vrf test
- address-family ipv4 unicast
diff --git a/test/units/modules/network/nxos/fixtures/nxos_command/show_version.txt b/test/units/modules/network/nxos/fixtures/nxos_command/show_version.txt
deleted file mode 100644
index ba9ae66515..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_command/show_version.txt
+++ /dev/null
@@ -1,68 +0,0 @@
-Cisco NX-OS Software
-Copyright (c) 2002-2016, Cisco Systems, Inc. All rights reserved.
-NX-OSv software ("NX-OSv Software") and related documentation,
-files or other reference materials ("Documentation") are
-the proprietary property and confidential information of Cisco
-Systems, Inc. ("Cisco") and are protected, without limitation,
-pursuant to United States and International copyright and trademark
-laws in the applicable jurisdiction which provide civil and criminal
-penalties for copying or distribution without Cisco's authorization.
-
-Any use or disclosure, in whole or in part, of the NX-OSv Software
-or Documentation to any third party for any purposes is expressly
-prohibited except as otherwise authorized by Cisco in writing.
-The copyrights to certain works contained herein are owned by other
-third parties and are used and distributed under license. Some parts
-of this software may be covered under the GNU Public License or the
-GNU Lesser General Public License. A copy of each such license is
-available at
-http://www.gnu.org/licenses/gpl.html and
-http://www.gnu.org/licenses/lgpl.html
-***************************************************************************
-* NX-OSv is strictly limited to use for evaluation, demonstration and *
-* NX-OS education. NX-OSv is provided as-is and is not supported by *
-* Cisco's Technical Advisory Center. Any use or disclosure, in whole or *
-* in part of the NX-OSv Software or Documentation to any third party for *
-* any purposes is expressly prohibited except as otherwise authorized by *
-* Cisco in writing. *
-***************************************************************************
-nxos01# show version
-Cisco Nexus Operating System (NX-OS) Software
-TAC support: http://www.cisco.com/tac
-Documents: http://www.cisco.com/en/US/products/ps9372/tsd_products_support_series_home.html
-Copyright (c) 2002-2016, Cisco Systems, Inc. All rights reserved.
-The copyrights to certain works contained herein are owned by
-other third parties and are used and distributed under license.
-Some parts of this software are covered under the GNU Public
-License. A copy of the license is available at
-http://www.gnu.org/licenses/gpl.html.
-
-NX-OSv is a demo version of the Nexus Operating System
-
-Software
- loader: version N/A
- kickstart: version 7.3(0)D1(1)
- system: version 7.3(0)D1(1)
- kickstart image file is: bootflash:///titanium-d1-kickstart.7.3.0.D1.1.bin
- kickstart compile time: 1/11/2016 16:00:00 [02/11/2016 10:30:12]
- system image file is: bootflash:///titanium-d1.7.3.0.D1.1.bin
- system compile time: 1/11/2016 16:00:00 [02/11/2016 13:08:11]
-
-
-Hardware
- cisco NX-OSv Chassis ("NX-OSv Supervisor Module")
- QEMU Virtual CPU version 2.0 with 3064860 kB of memory.
- Processor Board ID TM3E35B910B
-
- Device name: nxos01
- bootflash: 3184776 kB
-
-Kernel uptime is 7 day(s), 17 hour(s), 0 minute(s), 23 second(s)
-
-
-plugin
- Core Plugin, Ethernet Plugin
-
-Active Package(s)
-
-
diff --git a/test/units/modules/network/nxos/fixtures/nxos_config/candidate.cfg b/test/units/modules/network/nxos/fixtures/nxos_config/candidate.cfg
deleted file mode 100644
index b11bc93e25..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_config/candidate.cfg
+++ /dev/null
@@ -1,7 +0,0 @@
-hostname switch01
-!
-interface Ethernet1
- description test interface
- no shutdown
-!
-ip routing
diff --git a/test/units/modules/network/nxos/fixtures/nxos_config/config.cfg b/test/units/modules/network/nxos/fixtures/nxos_config/config.cfg
deleted file mode 100644
index 6a471371a5..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_config/config.cfg
+++ /dev/null
@@ -1,26 +0,0 @@
-!
-hostname localhost
-ip domain-name eng.ansible.com
-!
-vrf definition mgmt
-!
-vrf definition test
-!
-interface Management1
- ip address 192.168.1.1/24
-!
-interface Ethernet1
- shutdown
-!
-interface Ethernet2
- shutdown
-!
-interface Ethernet3
- shutdown
-!
-interface Ethernet4
- shutdown
-!
-interface Ethernet5
- shutdown
-!
diff --git a/test/units/modules/network/nxos/fixtures/nxos_devicealias/shdadatabse.cfg b/test/units/modules/network/nxos/fixtures/nxos_devicealias/shdadatabse.cfg
deleted file mode 100644
index cc526a7146..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_devicealias/shdadatabse.cfg
+++ /dev/null
@@ -1,5 +0,0 @@
-device-alias name test1_add pwwn 56:02:22:11:22:88:11:67
-device-alias name test2_add pwwn 65:22:22:11:22:22:11:0d
-device-alias name tieHost-1 pwwn 10:00:00:00:89:a1:01:01
-device-alias name tieHost-2 pwwn 10:00:00:00:89:a1:01:02
-
diff --git a/test/units/modules/network/nxos/fixtures/nxos_devicealias/shdastatus.cfg b/test/units/modules/network/nxos/fixtures/nxos_devicealias/shdastatus.cfg
deleted file mode 100644
index 7db8803456..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_devicealias/shdastatus.cfg
+++ /dev/null
@@ -1,4 +0,0 @@
-Fabric Distribution : Enabled
-Database:- Device Aliases 3831 Mode: Enhanced
- Checksum: 0xdc7b6c6c124abd8fe28cf6a1ab293c
-
diff --git a/test/units/modules/network/nxos/fixtures/nxos_devicealias/shdastatus_mansi.cfg b/test/units/modules/network/nxos/fixtures/nxos_devicealias/shdastatus_mansi.cfg
deleted file mode 100644
index aa399b6410..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_devicealias/shdastatus_mansi.cfg
+++ /dev/null
@@ -1,4 +0,0 @@
-Fabric Distribution : Disabled
-Database:- Device Aliases 3831 Mode: Basic
- Checksum: 0xdc7b6c6c124abd8fe28cf6a1ab293c
-
diff --git a/test/units/modules/network/nxos/fixtures/nxos_devicealias/shdastatuslock.cfg b/test/units/modules/network/nxos/fixtures/nxos_devicealias/shdastatuslock.cfg
deleted file mode 100644
index 65cb052f5f..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_devicealias/shdastatuslock.cfg
+++ /dev/null
@@ -1,6 +0,0 @@
-Fabric Distribution : Enabled
-Database:- Device Aliases 3831 Mode: Enhanced
- Checksum: 0xdc7b6c6c124abd8fe28cf6a1ab293c
-Locked By:- User "CLI/SNMPv3:admin" SWWN 20:00:54:7f:ee:1b:13:f0
-Pending Database:- Device Aliases 3831 Mode: Enhanced
-
diff --git a/test/units/modules/network/nxos/fixtures/nxos_evpn_global/configured.cfg b/test/units/modules/network/nxos/fixtures/nxos_evpn_global/configured.cfg
deleted file mode 100644
index 32504f6bfb..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_evpn_global/configured.cfg
+++ /dev/null
@@ -1,3 +0,0 @@
-hostname switch01
-nv overlay evpn
-
diff --git a/test/units/modules/network/nxos/fixtures/nxos_evpn_global/unconfigured.cfg b/test/units/modules/network/nxos/fixtures/nxos_evpn_global/unconfigured.cfg
deleted file mode 100644
index c555eaaf96..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_evpn_global/unconfigured.cfg
+++ /dev/null
@@ -1 +0,0 @@
-hostname switch01
diff --git a/test/units/modules/network/nxos/fixtures/nxos_evpn_vni_config.cfg b/test/units/modules/network/nxos/fixtures/nxos_evpn_vni_config.cfg
deleted file mode 100644
index b1c8352f58..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_evpn_vni_config.cfg
+++ /dev/null
@@ -1,8 +0,0 @@
-nv overlay evpn
-feature nv overlay
-
-evpn
- vni 6000 l2
- rd auto
- route-target import auto
- route-target export auto
diff --git a/test/units/modules/network/nxos/fixtures/nxos_feature/show_feature.txt b/test/units/modules/network/nxos/fixtures/nxos_feature/show_feature.txt
deleted file mode 100644
index cf6dbdbde8..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_feature/show_feature.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-Feature Name Instance State
--------------------- -------- -----
-nve 1 disabled
-ospf 1 enabled
diff --git a/test/units/modules/network/nxos/fixtures/nxos_interface_ospf/config.cfg b/test/units/modules/network/nxos/fixtures/nxos_interface_ospf/config.cfg
deleted file mode 100644
index 2061d4d71a..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_interface_ospf/config.cfg
+++ /dev/null
@@ -1,17 +0,0 @@
-interface Ethernet1/33
-interface Ethernet1/33.101
- ip router ospf 1 area 0.0.0.1
-interface Ethernet1/34
- ip router ospf 1 area 0.0.0.1
- ip ospf passive-interface
-interface Ethernet1/35
- ip router ospf 1 area 0.0.0.1
- no ip ospf passive-interface
-
-interface Ethernet1/36
- ip router ospf 1 area 0.0.0.1
- ip ospf bfd
-
-interface Ethernet1/37
- ip router ospf 1 area 0.0.0.1
- ip ospf bfd disable
diff --git a/test/units/modules/network/nxos/fixtures/nxos_l3_interface/ethernet_noshut b/test/units/modules/network/nxos/fixtures/nxos_l3_interface/ethernet_noshut
deleted file mode 100644
index b0407edc49..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_l3_interface/ethernet_noshut
+++ /dev/null
@@ -1,3 +0,0 @@
-interface Ethernet1/1
- description Configured by Ansible
- no shutdown
diff --git a/test/units/modules/network/nxos/fixtures/nxos_l3_interface/ethernet_noshut_ipv4_ipv6 b/test/units/modules/network/nxos/fixtures/nxos_l3_interface/ethernet_noshut_ipv4_ipv6
deleted file mode 100644
index 3e4f197876..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_l3_interface/ethernet_noshut_ipv4_ipv6
+++ /dev/null
@@ -1,5 +0,0 @@
-interface Ethernet1/1
- description Configured by Ansible
- ip address 192.168.0.1/24
- ipv6 address 2001:db8::1/124
- no shutdown
diff --git a/test/units/modules/network/nxos/fixtures/nxos_l3_interface/ethernet_noshut_multiple_ipv6 b/test/units/modules/network/nxos/fixtures/nxos_l3_interface/ethernet_noshut_multiple_ipv6
deleted file mode 100644
index 9013b1348e..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_l3_interface/ethernet_noshut_multiple_ipv6
+++ /dev/null
@@ -1,7 +0,0 @@
-interface Ethernet1/1
- description Configured by Ansible
- ip address 192.168.0.1/24
- ipv6 address 2001:db8:1::1/124
- ipv6 address 2001:db8:2::1/124
- ipv6 address 2001:db8::1/124
- no shutdown
diff --git a/test/units/modules/network/nxos/fixtures/nxos_nxapi/n3k/show_run_all b/test/units/modules/network/nxos/fixtures/nxos_nxapi/n3k/show_run_all
deleted file mode 100644
index da0dfaa79f..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_nxapi/n3k/show_run_all
+++ /dev/null
@@ -1,2 +0,0 @@
-feature nxapi
-nxapi http port 80
diff --git a/test/units/modules/network/nxos/fixtures/nxos_nxapi/n7k/show_run_all b/test/units/modules/network/nxos/fixtures/nxos_nxapi/n7k/show_run_all
deleted file mode 100644
index 0c4a3ea5a6..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_nxapi/n7k/show_run_all
+++ /dev/null
@@ -1,5 +0,0 @@
-feature nxapi
-nxapi http port 80
-no nxapi https
-no nxapi sandbox
-
diff --git a/test/units/modules/network/nxos/fixtures/nxos_overlay_global_config.cfg b/test/units/modules/network/nxos/fixtures/nxos_overlay_global_config.cfg
deleted file mode 100644
index 45a6ff99c7..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_overlay_global_config.cfg
+++ /dev/null
@@ -1 +0,0 @@
-fabric forwarding anycast-gateway-mac 000B.000B.000B
diff --git a/test/units/modules/network/nxos/fixtures/nxos_pim/config.cfg b/test/units/modules/network/nxos/fixtures/nxos_pim/config.cfg
deleted file mode 100644
index 9771622d6f..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_pim/config.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-ip pim bfd
-ip pim ssm range 127.0.0.0/31
diff --git a/test/units/modules/network/nxos/fixtures/nxos_pim_interface/config.cfg b/test/units/modules/network/nxos/fixtures/nxos_pim_interface/config.cfg
deleted file mode 100644
index 2120e607bf..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_pim_interface/config.cfg
+++ /dev/null
@@ -1,11 +0,0 @@
-!Command: show running-config interface Ethernet2/1
-!Time: Mon Aug 21 17:22:02 2017
-
-version 7.3(0)D1(1)
-
-interface Ethernet2/1
- description Configured by Ansible - Layer3
- no switchport
- mac-address fa16.3e00.0006
- ip address 10.0.0.69/30
- no shutdown
diff --git a/test/units/modules/network/nxos/fixtures/nxos_pim_interface/sh_run_interface_eth2_1_all b/test/units/modules/network/nxos/fixtures/nxos_pim_interface/sh_run_interface_eth2_1_all
deleted file mode 100644
index e69de29bb2..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_pim_interface/sh_run_interface_eth2_1_all
+++ /dev/null
diff --git a/test/units/modules/network/nxos/fixtures/nxos_pim_interface/show_interface_eth2_1 b/test/units/modules/network/nxos/fixtures/nxos_pim_interface/show_interface_eth2_1
deleted file mode 100644
index f478350f0d..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_pim_interface/show_interface_eth2_1
+++ /dev/null
@@ -1,96 +0,0 @@
-{
- "TABLE_interface": {
- "ROW_interface": {
- "interface": "Ethernet2/1",
- "state": "up",
- "admin_state": "up",
- "share_state": "Dedicated",
- "eth_hw_desc": "Ethernet",
- "eth_hw_addr": "fa16.3e00.0001",
- "eth_bia_addr": "fa16.3e27.f279",
- "desc": "to nxos03",
- "eth_ip_addr": "10.0.0.45",
- "eth_ip_mask": 30,
- "eth_ip_prefix": "10.0.0.44",
- "eth_mtu": "1500",
- "eth_bw": 1000000,
- "eth_dly": 10,
- "eth_reliability": "255",
- "eth_txload": "1",
- "eth_rxload": "1",
- "medium": "broadcast",
- "eth_mode": "routed",
- "eth_duplex": "full",
- "eth_speed": "1000 Mb/s",
- "eth_beacon": "off",
- "eth_autoneg": "off",
- "eth_in_flowctrl": "off",
- "eth_out_flowctrl": "off",
- "eth_mdix": "off",
- "eth_swt_monitor": "off",
- "eth_ethertype": "0x8100",
- "eth_eee_state": "n/a",
- "eth_link_flapped": "14week(s) 0day(s)",
- "eth_clear_counters": "never",
- "eth_reset_cntr": 1,
- "eth_load_interval1_rx": 0,
- "eth_inrate1_bits": 0,
- "eth_inrate1_pkts": 0,
- "eth_load_interval1_tx": 0,
- "eth_outrate1_bits": 0,
- "eth_outrate1_pkts": 0,
- "eth_inrate1_summary_bits": "0 bps",
- "eth_inrate1_summary_pkts": "0 pps",
- "eth_outrate1_summary_bits": "0 bps",
- "eth_outrate1_summary_pkts": "0 pps",
- "eth_load_interval2_rx": 0,
- "eth_inrate2_bits": 0,
- "eth_inrate2_pkts": 0,
- "eth_load_interval2_tx": 0,
- "eth_outrate2_bits": 0,
- "eth_outrate2_pkts": 0,
- "eth_inrate2_summary_bits": "0 bps",
- "eth_inrate2_summary_pkts": "0 pps",
- "eth_outrate2_summary_bits": "0 bps",
- "eth_outrate2_summary_pkts": "0 pps",
- "eth_inucast": 0,
- "eth_inmcast": 0,
- "eth_inbcast": 0,
- "eth_inpkts": 0,
- "eth_inbytes": 0,
- "eth_jumbo_inpkts": 0,
- "eth_storm_supp": 0,
- "eth_runts": 0,
- "eth_giants": 0,
- "eth_crc": 0,
- "eth_nobuf": 0,
- "eth_inerr": 0,
- "eth_frame": 0,
- "eth_overrun": 0,
- "eth_underrun": 0,
- "eth_ignored": 0,
- "eth_watchdog": 0,
- "eth_bad_eth": 0,
- "eth_bad_proto": 0,
- "eth_in_ifdown_drops": 0,
- "eth_dribble": 0,
- "eth_indiscard": 0,
- "eth_inpause": 0,
- "eth_outucast": 0,
- "eth_outmcast": 0,
- "eth_outbcast": 0,
- "eth_outpkts": 0,
- "eth_outbytes": 0,
- "eth_jumbo_outpkts": 0,
- "eth_outerr": 0,
- "eth_coll": 0,
- "eth_deferred": 0,
- "eth_latecoll": 0,
- "eth_lostcarrier": 0,
- "eth_nocarrier": 0,
- "eth_babbles": 0,
- "eth_outdiscard": 0,
- "eth_outpause": 0
- }
- }
-}
diff --git a/test/units/modules/network/nxos/fixtures/nxos_pim_interface/show_ip_pim_interface_eth2_1 b/test/units/modules/network/nxos/fixtures/nxos_pim_interface/show_ip_pim_interface_eth2_1
deleted file mode 100644
index e013423ba4..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_pim_interface/show_ip_pim_interface_eth2_1
+++ /dev/null
@@ -1,68 +0,0 @@
-{
- "TABLE_vrf": {
- "ROW_vrf": {
- "vrf-name": "default",
- "TABLE_iod": {
- "ROW_iod": {
- "if-name": "Ethernet2/1",
- "if-status": "protocol-up/link-up/admin-up",
- "if-addr-summary": "IP address: 10.0.0.45, IP subnet: 10.0.0.44/30",
- "pim-dr-address": "10.0.0.45",
- "dr-priority": 2,
- "nbr-cnt": 0,
- "hello-interval-sec": 35,
- "hello-timer": "PT3S",
- "holdtime-sec": 105,
- "if-conf-dr-priority": 1,
- "if-conf-delay": 3,
- "is-border": "true",
- "genid": "38c4b959",
- "isauth-config": "false",
- "nbr-policy-name": "none configured",
- "jp-interval": 1,
- "jp-next-send": 1,
- "pim-bfd-enabled": "no",
- "is-passive": "false",
- "is-pim-vpc-svi": "no",
- "is-auto-enabled": "no",
- "last-cleared": "PT0S",
- "hello-sent": 23,
- "hello-rcvd": 0,
- "hello-early-sent": 0,
- "jp-sent": 0,
- "jp-rcvd": 0,
- "assert-sent": 0,
- "assert-rcvd": 0,
- "graft-sent": 0,
- "graft-rcvd": 0,
- "graft-ack-sent": 0,
- "graft-ack-rcvd": 0,
- "df-offer-sent": 0,
- "df-offer-rcvd": 0,
- "df-winner-sent": 0,
- "df-winner-rcvd": 0,
- "df-backoff-sent": 0,
- "df-backoff-rcvd": 0,
- "pass-sent": 0,
- "pass-rcvd": 0,
- "cksum-errors": 0,
- "invalid-errors": 0,
- "invalid-df-errors": 0,
- "auth-failed": 0,
- "pak-len-errors": 0,
- "ver-errors": 0,
- "pkts-self": 0,
- "pkts-non-nbr": 0,
- "pkts-on-passive": 0,
- "jp-rcvd-on-rpf": 0,
- "jp-rcvd-no-rp": 0,
- "jp-rcvd-wrong-rp": 0,
- "jp-rcvd-for-ssm": 0,
- "jp-rcvd-for-bidir": 0,
- "jp-in-policy-filter": 0,
- "jp-out-policy-filter": 0
- }
- }
- }
- }
-}
diff --git a/test/units/modules/network/nxos/fixtures/nxos_pim_rp_address/config.cfg b/test/units/modules/network/nxos/fixtures/nxos_pim_rp_address/config.cfg
deleted file mode 100644
index ca9730ec7e..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_pim_rp_address/config.cfg
+++ /dev/null
@@ -1 +0,0 @@
-ip pim rp-address 1.2.3.4
diff --git a/test/units/modules/network/nxos/fixtures/nxos_static_route.cfg b/test/units/modules/network/nxos/fixtures/nxos_static_route.cfg
deleted file mode 100644
index 8b1a6fe863..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_static_route.cfg
+++ /dev/null
@@ -1,3 +0,0 @@
-ip route 10.10.30.0/24 1.2.4.8
-vrf context test
- ip route 10.8.0.0/14 15.16.17.18
diff --git a/test/units/modules/network/nxos/fixtures/nxos_system_config.cfg b/test/units/modules/network/nxos/fixtures/nxos_system_config.cfg
deleted file mode 100644
index 362b733215..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_system_config.cfg
+++ /dev/null
@@ -1,16 +0,0 @@
-hostname nxos01
-system jumbomtu 1500
-!
-no ip domain-lookup
-ip domain-name ansible.com
-ip domain-list ansible.com
-ip domain-list redhat.com
-ip name-server 8.8.8.8 172.26.1.1
-!
-vrf context management
- ip domain-name eng.ansible.com
- ip domain-list ansible.com
- ip domain-list redhat.com
- ip name-server 172.26.1.1 8.8.8.8
- ip route 172.26.0.0/16 172.26.4.1
-
diff --git a/test/units/modules/network/nxos/fixtures/nxos_telemetry/N9K.cfg b/test/units/modules/network/nxos/fixtures/nxos_telemetry/N9K.cfg
deleted file mode 100644
index 697c2c18bf..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_telemetry/N9K.cfg
+++ /dev/null
@@ -1,43 +0,0 @@
-feature telemetry
-
-telemetry
- certificate /bootflash/server.key localhost
- destination-profile
- use-vrf management
- use-compression gzip
- source-interface loopback55
- destination-group 2
- ip address 192.168.0.1 port 50001 protocol gRPC encoding GPB
- ip address 192.168.0.2 port 60001 protocol gRPC encoding GPB
- destination-group 10
- ip address 192.168.0.1 port 50001 protocol gRPC encoding GPB
- ip address 192.168.0.2 port 60001 protocol gRPC encoding GPB
- sensor-group 2
- data-source DME
- path boo depth 0
- path sys/ospf depth 0 query-condition qc filter-condition fc
- path interfaces depth 0
- path sys/bgp
- path sys/bgp/inst depth 0 query-condition foo filter-condition foo
- path sys/bgp/inst/dom-default/peer-[10.10.10.11]/ent-[10.10.10.11]
- path sys/bgp/inst/dom-default/peer-[20.20.20.11]/ent-[20.20.20.11]
- path too depth 0 filter-condition foo
- sensor-group 55
- sensor-group 56
- data-source DME
- path environment
- path interface
- path resources
- path vxlan
- subscription 3
- subscription 4
- dst-grp 2
- snsr-grp 2 sample-interval 1000
- subscription 5
- dst-grp 2
- snsr-grp 2 sample-interval 1000
- subscription 6
- dst-grp 10
- subscription 7
- dst-grp 10
- snsr-grp 2 sample-interval 1000
diff --git a/test/units/modules/network/nxos/fixtures/nxos_telemetry/N9K_SGs.cfg b/test/units/modules/network/nxos/fixtures/nxos_telemetry/N9K_SGs.cfg
deleted file mode 100644
index 1729ad813a..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_telemetry/N9K_SGs.cfg
+++ /dev/null
@@ -1,19 +0,0 @@
-feature telemetry
-
-telemetry
- sensor-group 1
- path sys/ch depth 4
- path sys/procsys depth 1
- sensor-group 2
- data-source NX-API
- path "show bgp l2vpn evpn summary"
- path "show isis adjacency"
- path "show mac address-table count" depth 2
- path "show bgp sessions"
- sensor-group 3
- data-source NX-API
- path "show interface ethernet1/1-52"
- sensor-group 4
- path sys/bd depth 2
- path sys/eps/epId-1/nws depth 2
- path sys/eps/epId-1/peers depth 2
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vlan/agg_show_vlan_brief.txt b/test/units/modules/network/nxos/fixtures/nxos_vlan/agg_show_vlan_brief.txt
deleted file mode 100644
index 4ba12553ed..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vlan/agg_show_vlan_brief.txt
+++ /dev/null
@@ -1,27 +0,0 @@
-{
- "TABLE_vlanbriefxbrief": {
- "ROW_vlanbriefxbrief": [
- {
- "vlanshowbr-vlanid": 1,
- "vlanshowbr-vlanid-utf": 1,
- "vlanshowbr-vlanname": "default",
- "vlanshowbr-vlanstate": "active",
- "vlanshowbr-shutstate": "noshutdown"
- },
- {
- "vlanshowbr-vlanid": 4,
- "vlanshowbr-vlanid-utf": 4,
- "vlanshowbr-vlanname": "_4_",
- "vlanshowbr-vlanstate": "active",
- "vlanshowbr-shutstate": "noshutdown"
- },
- {
- "vlanshowbr-vlanid": 5,
- "vlanshowbr-vlanid-utf": 5,
- "vlanshowbr-vlanname": "_5_",
- "vlanshowbr-vlanstate": "active",
- "vlanshowbr-shutstate": "noshutdown"
- }
- ]
- }
-}
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vlan/config.cfg b/test/units/modules/network/nxos/fixtures/nxos_vlan/config.cfg
deleted file mode 100644
index 905d309ff0..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vlan/config.cfg
+++ /dev/null
@@ -1,4 +0,0 @@
-vlan 1
- mode ce
- state active
- no shutdown
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vlan/show_vlan_brief.txt b/test/units/modules/network/nxos/fixtures/nxos_vlan/show_vlan_brief.txt
deleted file mode 100644
index ca90e5d494..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vlan/show_vlan_brief.txt
+++ /dev/null
@@ -1,11 +0,0 @@
-{
- "TABLE_vlanbriefxbrief": {
- "ROW_vlanbriefxbrief": {
- "vlanshowbr-vlanid": 16777216,
- "vlanshowbr-vlanid-utf": 1,
- "vlanshowbr-vlanname": "default",
- "vlanshowbr-vlanstate": "active",
- "vlanshowbr-shutstate": "noshutdown"
- }
- }
-}
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vlans/show_running-config b/test/units/modules/network/nxos/fixtures/nxos_vlans/show_running-config
deleted file mode 100644
index 51e64c9967..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vlans/show_running-config
+++ /dev/null
@@ -1,13 +0,0 @@
-vlan 1,3-5,8
-vlan 3
- name test-vlan3
-vlan 5
- shutdown
- name test-changeme
- mode fabricpath
- state suspend
- vn-segment 942
-vlan 8
- shutdown
- name test-changeme-not
- state suspend
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vlans/show_running-config_no_facts b/test/units/modules/network/nxos/fixtures/nxos_vlans/show_running-config_no_facts
deleted file mode 100644
index ef66a7fff4..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vlans/show_running-config_no_facts
+++ /dev/null
@@ -1 +0,0 @@
-! no data
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vlans/show_running-config_vlan_1 b/test/units/modules/network/nxos/fixtures/nxos_vlans/show_running-config_vlan_1
deleted file mode 100644
index 4343b9f294..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vlans/show_running-config_vlan_1
+++ /dev/null
@@ -1 +0,0 @@
-vlan 1
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vlans/show_vlan b/test/units/modules/network/nxos/fixtures/nxos_vlans/show_vlan
deleted file mode 100644
index 9d53309f3f..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vlans/show_vlan
+++ /dev/null
@@ -1,45 +0,0 @@
-{
- "TABLE_vlanbrief": {
- "ROW_vlanbrief": [
- { "vlanshowbr-vlanid": "1", "vlanshowbr-vlanid-utf": "1",
- "vlanshowbr-vlanname": "default",
- "vlanshowbr-vlanstate": "active",
- "vlanshowbr-shutstate": "noshutdown"
- },
- { "vlanshowbr-vlanid": "3", "vlanshowbr-vlanid-utf": "3",
- "vlanshowbr-vlanname": "test-vlan3",
- "vlanshowbr-vlanstate": "active",
- "vlanshowbr-shutstate": "noshutdown"
- },
- { "vlanshowbr-vlanid": "4", "vlanshowbr-vlanid-utf": "4",
- "vlanshowbr-vlanname": "VLAN0004",
- "vlanshowbr-vlanstate": "active",
- "vlanshowbr-shutstate": "noshutdown"
- },
- { "vlanshowbr-vlanid": "5", "vlanshowbr-vlanid-utf": "5",
- "vlanshowbr-vlanname": "test-changeme",
- "vlanshowbr-vlanstate": "suspend",
- "vlanshowbr-shutstate": "shutdown"
- },
- { "vlanshowbr-vlanid": "8", "vlanshowbr-vlanid-utf": "8",
- "vlanshowbr-vlanname": "test-changeme-not",
- "vlanshowbr-vlanstate": "suspend",
- "vlanshowbr-shutstate": "shutdown"
- }
- ]
- },
- "TABLE_mtuinfo": {
- "ROW_mtuinfo": [
- { "vlanshowinfo-vlanid": "1", "vlanshowinfo-media-type": "enet",
- "vlanshowinfo-vlanmode": "ce-vlan" },
- { "vlanshowinfo-vlanid": "3", "vlanshowinfo-media-type": "enet",
- "vlanshowinfo-vlanmode": "ce-vlan" },
- { "vlanshowinfo-vlanid": "4", "vlanshowinfo-media-type": "enet",
- "vlanshowinfo-vlanmode": "ce-vlan" },
- { "vlanshowinfo-vlanid": "5", "vlanshowinfo-media-type": "enet",
- "vlanshowinfo-vlanmode": "fabricpath-vlan" },
- { "vlanshowinfo-vlanid": "8", "vlanshowinfo-media-type": "enet",
- "vlanshowinfo-vlanmode": "ce-vlan" }
- ]
- }
-}
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vlans/show_vlan_no_facts b/test/units/modules/network/nxos/fixtures/nxos_vlans/show_vlan_no_facts
deleted file mode 100644
index 0967ef424b..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vlans/show_vlan_no_facts
+++ /dev/null
@@ -1 +0,0 @@
-{}
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vlans/show_vlan_vlan_1 b/test/units/modules/network/nxos/fixtures/nxos_vlans/show_vlan_vlan_1
deleted file mode 100644
index 630ebbc34b..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vlans/show_vlan_vlan_1
+++ /dev/null
@@ -1,16 +0,0 @@
-{
- "TABLE_vlanbrief": {
- "ROW_vlanbrief": {
- "vlanshowbr-vlanid": "1", "vlanshowbr-vlanid-utf": "1",
- "vlanshowbr-vlanname": "default",
- "vlanshowbr-vlanstate": "active",
- "vlanshowbr-shutstate": "noshutdown"
- },
- },
- "TABLE_mtuinfo": {
- "ROW_mtuinfo": {
- "vlanshowinfo-vlanid": "1", "vlanshowinfo-media-type": "enet",
- "vlanshowinfo-vlanmode": "ce-vlan"
- },
- }
-}
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vpc/show_vpc b/test/units/modules/network/nxos/fixtures/nxos_vpc/show_vpc
deleted file mode 100644
index 7d2c2eaeee..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vpc/show_vpc
+++ /dev/null
@@ -1,20 +0,0 @@
-{
- "vpc-domain-id": "not configured",
- "vpc-peer-status": "peer-not-configured",
- "vpc-peer-status-reason": "SUCCESS",
- "vpc-peer-keepalive-status": "disabled",
- "vpc-peer-consistency": "inconsistent",
- "vpc-peer-consistency-status": "SYSERR_MCECM_MCT_DOES_NOT_EXISTS",
- "vpc-per-vlan-peer-consistency": "inconsistent",
- "vpc-type-2-consistency": "inconsistent",
- "vpc-type-2-consistency-status": "SYSERR_MCECM_MCT_DOES_NOT_EXISTS",
- "vpc-role": "none-established",
- "num-of-vpcs": "0",
- "peer-gateway": "disabled",
- "dual-active-excluded-vlans": "-",
- "vpc-graceful-consistency-check-status": "enabled",
- "vpc-auto-recovery-status": "Enabled (timeout = 240 seconds)",
- "operational-l3-peer": "disabled",
- "vpc-isolation-status": "disabled-user",
- "vpc-check-consist-note": "disabled"
-}
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vpc/show_vrf_all b/test/units/modules/network/nxos/fixtures/nxos_vpc/show_vrf_all
deleted file mode 100644
index 838190fb71..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vpc/show_vrf_all
+++ /dev/null
@@ -1,30 +0,0 @@
-{
- "TABLE_vrf": {
- "ROW_vrf": [
- {
- "vrf_name": "coke",
- "vrf_id": 4,
- "vrf_state": "Up",
- "vrf_reason": "--"
- },
- {
- "vrf_name": "default",
- "vrf_id": 1,
- "vrf_state": "Up",
- "vrf_reason": "--"
- },
- {
- "vrf_name": "management",
- "vrf_id": 2,
- "vrf_state": "Up",
- "vrf_reason": "--"
- },
- {
- "vrf_name": "test-vrf",
- "vrf_id": 3,
- "vrf_state": "Up",
- "vrf_reason": "--"
- }
- ]
- }
-}
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_hardware b/test/units/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_hardware
deleted file mode 100644
index 612a6b3da0..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_hardware
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "kickstart_ver_str": "7.0(3)I5(3)"
-}
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_inventory b/test/units/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_inventory
deleted file mode 100644
index c1a149ddb2..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_inventory
+++ /dev/null
@@ -1,13 +0,0 @@
-{
- "TABLE_inv": {
- "ROW_inv": [
- {
- "name": "Chassis",
- "desc": "Nexus9000 C9504 (4 Slot) Chassis",
- "productid": "N9K-C9504",
- "vendorid": "V01",
- "serialnum": "BR-549"
- }
- ]
- }
-}
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_vpc b/test/units/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_vpc
deleted file mode 100644
index f86daa6bda..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_vpc
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "vpc-domain-id": "100"
-}
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_vrf_all b/test/units/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_vrf_all
deleted file mode 100644
index 3f56f8adbb..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vpc/vrf_test_show_vrf_all
+++ /dev/null
@@ -1,36 +0,0 @@
-{
- "TABLE_vrf": {
- "ROW_vrf": [
- {
- "vrf_name": "my_vrf",
- "vrf_id": 4,
- "vrf_state": "Up",
- "vrf_reason": "--"
- },
- {
- "vrf_name": "default",
- "vrf_id": 1,
- "vrf_state": "Up",
- "vrf_reason": "--"
- },
- {
- "vrf_name": "management",
- "vrf_id": 2,
- "vrf_state": "Up",
- "vrf_reason": "--"
- },
- {
- "vrf_name": "test-vrf",
- "vrf_id": 3,
- "vrf_state": "Up",
- "vrf_reason": "--"
- },
- {
- "vrf_name": "obviously-different-vrf",
- "vrf_id": 4,
- "vrf_state": "Up",
- "vrf_reason": "--"
- }
- ]
- }
-}
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vpc/vrf_test_vpc_config b/test/units/modules/network/nxos/fixtures/nxos_vpc/vrf_test_vpc_config
deleted file mode 100644
index e7258296fd..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vpc/vrf_test_vpc_config
+++ /dev/null
@@ -1,2 +0,0 @@
-vpc domain 100
- peer-keepalive destination 192.168.1.1 source 10.1.1.1 vrf my_vrf
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vpc_interface/show_port-channel_summary b/test/units/modules/network/nxos/fixtures/nxos_vpc_interface/show_port-channel_summary
deleted file mode 100644
index d62bea661a..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vpc_interface/show_port-channel_summary
+++ /dev/null
@@ -1,22 +0,0 @@
-{
- "TABLE_channel": {
- "ROW_channel": [
- {
- "group": "10",
- "port-channel": "port-channel10",
- "layer": "R",
- "status": "D",
- "type": "Eth",
- "prtcl": "NONE"
- },
- {
- "group": "20",
- "port-channel": "port-channel20",
- "layer": "R",
- "status": "D",
- "type": "Eth",
- "prtcl": "NONE"
- }
- ]
- }
-}
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vpc_interface/show_vpc_brief b/test/units/modules/network/nxos/fixtures/nxos_vpc_interface/show_vpc_brief
deleted file mode 100644
index 2206eca096..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vpc_interface/show_vpc_brief
+++ /dev/null
@@ -1,14 +0,0 @@
-{
- "TABLE_vpc": {
- "ROW_vpc": [
- {
- "vpc-id": 100,
- "vpc-ifindex": "Po10",
- "vpc-port-state": "Up",
- "vpc-thru-peerlink": 19,
- "vpc-consistency": "consistent",
- "vpc-consistency-status": "SUCCESS"
- }
- ]
- }
-}
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vrf/show_run_all b/test/units/modules/network/nxos/fixtures/nxos_vrf/show_run_all
deleted file mode 100644
index 06fe9f91d9..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vrf/show_run_all
+++ /dev/null
@@ -1,4 +0,0 @@
-vrf context coke
-vrf context management
- ip route 172.26.0.0/16 172.26.4.1
-vrf context test-vrf
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vrf/show_vrf_default b/test/units/modules/network/nxos/fixtures/nxos_vrf/show_vrf_default
deleted file mode 100644
index e69de29bb2..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vrf/show_vrf_default
+++ /dev/null
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vrf/show_vrf_default_interface b/test/units/modules/network/nxos/fixtures/nxos_vrf/show_vrf_default_interface
deleted file mode 100644
index e69de29bb2..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vrf/show_vrf_default_interface
+++ /dev/null
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vrf/show_vrf_management b/test/units/modules/network/nxos/fixtures/nxos_vrf/show_vrf_management
deleted file mode 100644
index 2b6e9b5212..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vrf/show_vrf_management
+++ /dev/null
@@ -1,10 +0,0 @@
-{
- "TABLE_vrf": {
- "ROW_vrf": {
- "vrf_name": "management",
- "vrf_id": 2,
- "vrf_state": "Up",
- "vrf_reason": "--"
- }
- }
-}
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vrf/show_vrf_management_interface b/test/units/modules/network/nxos/fixtures/nxos_vrf/show_vrf_management_interface
deleted file mode 100644
index e69de29bb2..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vrf/show_vrf_management_interface
+++ /dev/null
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vrf/show_vrf_ntc b/test/units/modules/network/nxos/fixtures/nxos_vrf/show_vrf_ntc
deleted file mode 100644
index e69de29bb2..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vrf/show_vrf_ntc
+++ /dev/null
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vrf/show_vrf_ntc_interface b/test/units/modules/network/nxos/fixtures/nxos_vrf/show_vrf_ntc_interface
deleted file mode 100644
index e69de29bb2..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vrf/show_vrf_ntc_interface
+++ /dev/null
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vrf_af/config.cfg b/test/units/modules/network/nxos/fixtures/nxos_vrf_af/config.cfg
deleted file mode 100644
index 1ac093f71f..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vrf_af/config.cfg
+++ /dev/null
@@ -1,22 +0,0 @@
-vrf context vrf1
- address-family ipv4 unicast
-
-vrf context vrf11
- address-family ipv4 unicast
- route-target both auto evpn
-
-vrf context vrf21
- address-family ipv4 unicast
- route-target import 65000:1000
- route-target import 65001:1000
- route-target import 65002:1000
- route-target export 65000:1000
- route-target export 65001:1000
- route-target export 65002:1000
-
-vrf context vrf31
- address-family ipv4 unicast
- route-target import 65000:1000
- route-target export 65001:1000
- route-target import 65002:1000
- route-target export 65003:1000 \ No newline at end of file
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vsan/shvsan.cfg b/test/units/modules/network/nxos/fixtures/nxos_vsan/shvsan.cfg
deleted file mode 100644
index 035351a9f6..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vsan/shvsan.cfg
+++ /dev/null
@@ -1,35 +0,0 @@
-vsan 1 information
- name:VSAN0001 state:active
- interoperability mode:default
- loadbalancing:src-id/dst-id/oxid
- operational state:up
-
-vsan 10 information
- name:VsanAll state:suspended
- interoperability mode:default
- loadbalancing:src-id/dst-id/oxid
- operational state:down
-
-vsan 221 information
- name:VSAN0221 state:active
- interoperability mode:default
- loadbalancing:src-id/dst-id/oxid
- operational state:up
-
-vsan 922 information
- name:vsan-SAN-A state:active
- interoperability mode:default
- loadbalancing:src-id/dst-id/oxid
- operational state:down
-
-vsan 923 information
- name:vsan-SAN-B state:active
- interoperability mode:default
- loadbalancing:src-id/dst-id/oxid
- operational state:up
-
-vsan 4079:evfp_isolated_vsan
-
-vsan 4094:isolated_vsan
-
-
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vsan/shvsanmem.cfg b/test/units/modules/network/nxos/fixtures/nxos_vsan/shvsanmem.cfg
deleted file mode 100644
index c57c72a2f0..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vsan/shvsanmem.cfg
+++ /dev/null
@@ -1,30 +0,0 @@
-vsan 1 interfaces:
- fc1/4 fc1/5 fc1/6 fc1/7
- fc1/8 fc1/9 fc1/10 fc1/12
- fc1/13 fc1/14 fc1/15 fc1/16
- fc1/17 fc1/18 fc1/19 fc1/20
- fc1/22 fc1/23 fc1/24 fc1/25
- fc1/26 fc1/27 fc1/28 fc1/29
- fc1/30 fc1/31 fc1/32 fc1/33
- fc1/34 fc1/35 fc1/36 fc1/37
- fc1/38 fc1/39 fc1/40
-
-vsan 10 interfaces:
-
-
-vsan 221 interfaces:
-
-
-vsan 922 interfaces:
- fc1/1 fc1/2 fc1/3 port-channel55
-
-vsan 923 interfaces:
- fc1/11 fc1/21 port-channel56
-
-vsan 4079(evfp_isolated_vsan) interfaces:
-
-
-vsan 4094(isolated_vsan) interfaces:
- port-channel145
-
-
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vxlan_vtep/config.cfg b/test/units/modules/network/nxos/fixtures/nxos_vxlan_vtep/config.cfg
deleted file mode 100644
index 88e2f0ba9a..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vxlan_vtep/config.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-interface nve1
- member vni 6000
diff --git a/test/units/modules/network/nxos/fixtures/nxos_vxlan_vtep_vni/config.cfg b/test/units/modules/network/nxos/fixtures/nxos_vxlan_vtep_vni/config.cfg
deleted file mode 100644
index 88e2f0ba9a..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_vxlan_vtep_vni/config.cfg
+++ /dev/null
@@ -1,2 +0,0 @@
-interface nve1
- member vni 6000
diff --git a/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzone_0.cfg b/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzone_0.cfg
deleted file mode 100644
index 14b431b9b0..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzone_0.cfg
+++ /dev/null
@@ -1,8 +0,0 @@
-zone name zoneA vsan 923
- pwwn 11:11:11:11:11:11:11:11
- device-alias test123
-
-zone name zoneB vsan 923
- pwwn 10:11:11:11:11:11:11:11
- pwwn 62:62:62:62:21:21:21:21
-
diff --git a/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzone_1.cfg b/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzone_1.cfg
deleted file mode 100644
index 73d58c51e8..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzone_1.cfg
+++ /dev/null
@@ -1,8 +0,0 @@
-zone name zoneA vsan 922
- pwwn 11:11:11:11:11:11:11:11
- device-alias test123 both
-
-zone name zoneB vsan 922
- pwwn 10:11:11:11:11:11:11:11
- pwwn 62:62:62:62:21:21:21:21
-
diff --git a/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzone_2.cfg b/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzone_2.cfg
deleted file mode 100644
index 530266d4ca..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzone_2.cfg
+++ /dev/null
@@ -1,6 +0,0 @@
-zone name zv221 vsan 221
- pwwn 21:01:00:1b:32:a1:c0:a8 [h181-dell-linux-top-p2]
- pwwn 10:00:00:90:fa:c7:da:42 [h172-32ghost-p2]
- pwwn 21:01:00:1b:32:aa:50:4b [h190-dell-linux-top-p2]
- pwwn 50:06:01:6a:47:e4:6e:59 [VNX_UNITY_235_SPB-1-2]
- pwwn 21:01:00:1b:32:aa:ff:4a [h189-dell-windows-bottom-p2]
diff --git a/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzoneset_0.cfg b/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzoneset_0.cfg
deleted file mode 100644
index c1b560053d..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzoneset_0.cfg
+++ /dev/null
@@ -1,10 +0,0 @@
-zoneset name zsetname21 vsan 922
- zone name zone21A vsan 922
- pwwn 11:11:11:11:11:11:11:11 both
- pwwn 62:62:62:62:12:12:12:12
-
- zone name zone21B vsan 922
- pwwn 10:11:11:11:11:11:11:11
- pwwn 62:62:62:62:21:21:21:21
- device-alias somedummyname
-
diff --git a/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzoneset_1.cfg b/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzoneset_1.cfg
deleted file mode 100644
index 77d296229c..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzoneset_1.cfg
+++ /dev/null
@@ -1,9 +0,0 @@
-zoneset name zsetname1 vsan 923
- zone name zoneA vsan 923
- pwwn 11:11:11:11:11:11:11:11
- device-alias test123
-
- zone name zoneB vsan 923
- pwwn 10:11:11:11:11:11:11:11
- pwwn 62:62:62:62:21:21:21:21
-
diff --git a/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzoneset_2.cfg b/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzoneset_2.cfg
deleted file mode 100644
index 923f54e4b6..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzoneset_2.cfg
+++ /dev/null
@@ -1,7 +0,0 @@
-zoneset name zsv221 vsan 221
- zone name zv221 vsan 221
- pwwn 21:01:00:1b:32:a1:c0:a8 [h181-dell-linux-top-p2]
- pwwn 10:00:00:90:fa:c7:da:42 [h172-32ghost-p2]
- pwwn 21:01:00:1b:32:aa:50:4b [h190-dell-linux-top-p2]
- pwwn 50:06:01:6a:47:e4:6e:59 [VNX_UNITY_235_SPB-1-2]
- pwwn 21:01:00:1b:32:aa:ff:4a [h189-dell-windows-bottom-p2]
diff --git a/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonesetactive_0.cfg b/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonesetactive_0.cfg
deleted file mode 100644
index 1180410a1a..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonesetactive_0.cfg
+++ /dev/null
@@ -1,8 +0,0 @@
-zoneset name zsv221 vsan 221
- zone name zv221 vsan 221
- * fcid 0x2f0000 [pwwn 21:01:00:1b:32:a1:c0:a8] [h181-dell-linux-top-p2]
- * fcid 0xa90000 [pwwn 10:00:00:90:fa:c7:da:42] [h172-32ghost-p2]
- * fcid 0xd50000 [pwwn 21:01:00:1b:32:aa:50:4b] [h190-dell-linux-top-p2]
- * fcid 0xde0000 [pwwn 50:06:01:6a:47:e4:6e:59] [VNX_UNITY_235_SPB-1-2]
- pwwn 21:01:00:1b:32:aa:ff:4a [h189-dell-windows-bottom-p2]
-
diff --git a/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_0.cfg b/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_0.cfg
deleted file mode 100644
index 0bfced832b..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_0.cfg
+++ /dev/null
@@ -1,23 +0,0 @@
-VSAN: 922 default-zone: deny distribute: active only Interop: default
- mode: basic merge-control: allow
- session: none
- hard-zoning: enabled broadcast: unsupported
- smart-zoning: enabled
- rscn-format: fabric-address
- activation overwrite control: disabled
-Default zone:
- qos: none broadcast: unsupported ronly: unsupported
-Full Zoning Database :
- DB size: 358 bytes
- Zonesets: 1 Zones: 2 Aliases: 0
-Active Zoning Database :
- DB Size: 125 bytes
- Name: zsetname21 Zonesets: 1 Zones: 2
-Current Total Zone DB Usage: 483 / 2097152 bytes (0 % used)
-Pending (Session) DB size:
- Full DB Copy size: n/a
- Active DB Copy size: n/a
-SFC size: 483 / 2097152 bytes (0 % used)
-Status: Activation completed at 23:50:35 IST Jul 3 2019
-
-
diff --git a/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_1.cfg b/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_1.cfg
deleted file mode 100644
index bf7a4615fb..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_1.cfg
+++ /dev/null
@@ -1,23 +0,0 @@
-VSAN: 922 default-zone: deny distribute: full Interop: default
- mode: enhanced merge-control: allow
- session: none
- hard-zoning: enabled broadcast: unsupported
- smart-zoning: disabled
- rscn-format: fabric-address
- activation overwrite control: disabled
-Default zone:
- qos: none broadcast: unsupported ronly: unsupported
-Full Zoning Database :
- DB size: 376 bytes
- Zonesets: 1 Zones: 2 Aliases: 0 Attribute-groups: 1
-Active Zoning Database :
- DB Size: 156 bytes
- Name: zsetname21 Zonesets: 1 Zones: 2
-Current Total Zone DB Usage: 532 / 2097152 bytes (0 % used)
-Pending (Session) DB size:
- Full DB Copy size: 0 bytes
- Active DB Copy size: 0 bytes
-SFC size: 0 / 2097152 bytes (0 % used)
-Status: Set zoning mode complete at 10:19:02 IST Jul 5 2019
-
-
diff --git a/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_2.cfg b/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_2.cfg
deleted file mode 100644
index eb0db28eb9..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_2.cfg
+++ /dev/null
@@ -1,24 +0,0 @@
-VSAN: 923 default-zone: permit distribute: full Interop: default
- mode: enhanced merge-control: allow
- session: none
- hard-zoning: enabled broadcast: unsupported
- smart-zoning: disabled
- rscn-format: fabric-address
- activation overwrite control: disabled
-Default zone:
- qos: none broadcast: unsupported ronly: unsupported
-Full Zoning Database :
- DB size: 356 bytes
- Zonesets: 1 Zones: 2 Aliases: 0 Attribute-groups: 1
-Active Zoning Database :
- DB Size: 136 bytes
- Name: zsetname1 Zonesets: 1 Zones: 2
-Current Total Zone DB Usage: 492 / 2097152 bytes (0 % used)
-Pending (Session) DB size:
- Full DB Copy size: 0 bytes
- Active DB Copy size: 0 bytes
-SFC size: 0 / 2097152 bytes (0 % used)
-Status: Operation failed: [Error: WARNING: Specified zoneset already active and unchanged]:
- at 11:06:21 IST Jul 5 2019
-
-
diff --git a/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_3.cfg b/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_3.cfg
deleted file mode 100644
index c5c32db0b4..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_3.cfg
+++ /dev/null
@@ -1,24 +0,0 @@
-VSAN: 923 default-zone: permit distribute: full Interop: default
- mode: basic merge-control: allow
- session: none
- hard-zoning: enabled broadcast: unsupported
- smart-zoning: disabled
- rscn-format: fabric-address
- activation overwrite control: disabled
-Default zone:
- qos: none broadcast: unsupported ronly: unsupported
-Full Zoning Database :
- DB size: 356 bytes
- Zonesets: 1 Zones: 2 Aliases: 0 Attribute-groups: 1
-Active Zoning Database :
- DB Size: 136 bytes
- Name: zsetname1 Zonesets: 1 Zones: 2
-Current Total Zone DB Usage: 492 / 2097152 bytes (0 % used)
-Pending (Session) DB size:
- Full DB Copy size: 0 bytes
- Active DB Copy size: 0 bytes
-SFC size: 0 / 2097152 bytes (0 % used)
-Status: Operation failed: [Error: WARNING: Specified zoneset already active and unchanged]:
- at 11:06:21 IST Jul 5 2019
-
-
diff --git a/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_4.cfg b/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_4.cfg
deleted file mode 100644
index 97c3a7156c..0000000000
--- a/test/units/modules/network/nxos/fixtures/nxos_zone_zoneset/shzonestatus_4.cfg
+++ /dev/null
@@ -1,23 +0,0 @@
-VSAN: 221 default-zone: deny distribute: full Interop: default
- mode: enhanced merge-control: allow
- session: none
- hard-zoning: enabled broadcast: unsupported
- smart-zoning: disabled
- rscn-format: fabric-address
- activation overwrite control: disabled
-Default zone:
- qos: none broadcast: unsupported ronly: unsupported
-Full Zoning Database :
- DB size: 300 bytes
- Zonesets: 1 Zones: 1 Aliases: 0 Attribute-groups: 1
-Active Zoning Database :
- DB Size: 112 bytes
- Name: zsv221 Zonesets: 1 Zones: 1
-Current Total Zone DB Usage: 412 / 2097152 bytes (0 % used)
-Pending (Session) DB size:
- Full DB Copy size: 0 bytes
- Active DB Copy size: 0 bytes
-SFC size: 0 / 2097152 bytes (0 % used)
-Status:
-
-
diff --git a/test/units/modules/network/nxos/nxos_module.py b/test/units/modules/network/nxos/nxos_module.py
deleted file mode 100644
index 07670a282c..0000000000
--- a/test/units/modules/network/nxos/nxos_module.py
+++ /dev/null
@@ -1,117 +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
-from units.modules.utils import set_module_args as _set_module_args
-
-
-def set_module_args(args, ignore_provider=None):
- if 'provider' not in args and not ignore_provider:
- args['provider'] = {'transport': args.get('transport') or 'cli'}
-
- return _set_module_args(args)
-
-
-fixture_path = os.path.join(os.path.dirname(__file__), 'fixtures')
-fixture_data = {}
-
-
-def load_fixture(module_name, name, device=''):
- path = os.path.join(fixture_path, module_name, device, name)
- if not os.path.exists(path):
- path = os.path.join(fixture_path, module_name, 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 TestNxosModule(ModuleTestCase):
-
- def execute_module_devices(self, failed=False, changed=False, commands=None, sort=True, defaults=False):
- module_name = self.module.__name__.rsplit('.', 1)[1]
- local_fixture_path = os.path.join(fixture_path, module_name)
-
- models = []
- for path in os.listdir(local_fixture_path):
- path = os.path.join(local_fixture_path, path)
- if os.path.isdir(path):
- models.append(os.path.basename(path))
- if not models:
- models = ['']
-
- retvals = {}
- for model in models:
- retvals[model] = self.execute_module(
- failed, changed, commands, sort, device=model)
-
- return retvals
-
- def execute_module(self, failed=False, changed=False, commands=None, sort=True, device=''):
-
- self.load_fixtures(commands, device=device)
-
- 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 and len(commands) > 0:
- 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, device=''):
- pass
diff --git a/test/units/modules/network/nxos/storage/test_nxos_devicealias.py b/test/units/modules/network/nxos/storage/test_nxos_devicealias.py
deleted file mode 100644
index 68080afef2..0000000000
--- a/test/units/modules/network/nxos/storage/test_nxos_devicealias.py
+++ /dev/null
@@ -1,229 +0,0 @@
-#!/usr/bin/env python
-# Copyright: Ansible Project
-# 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 pytest
-
-from units.compat.mock import patch
-from units.modules.utils import AnsibleFailJson
-from ansible.modules.network.nxos.storage import nxos_devicealias
-from ansible.modules.network.nxos.storage.nxos_devicealias import showDeviceAliasStatus
-from ansible.modules.network.nxos.storage.nxos_devicealias import showDeviceAliasDatabase
-
-from ..nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosDeviceAliasModule(TestNxosModule):
- module = nxos_devicealias
-
- def setUp(self):
- super(TestNxosDeviceAliasModule, self).setUp()
- module_path = 'ansible.modules.network.nxos.storage.nxos_devicealias.'
-
- self.mock_run_commands = patch(module_path + 'run_commands')
- self.run_commands = self.mock_run_commands.start()
-
- self.mock_execute_show_cmd = patch(module_path + 'showDeviceAliasStatus.execute_show_cmd')
- self.execute_show_cmd = self.mock_execute_show_cmd.start()
-
- self.mock_execute_show_cmd_1 = patch(module_path + 'showDeviceAliasDatabase.execute_show_cmd')
- self.execute_show_cmd_1 = self.mock_execute_show_cmd_1.start()
-
- self.mock_load_config = patch(module_path + 'load_config')
- self.load_config = self.mock_load_config.start()
-
- def tearDown(self):
- super(TestNxosDeviceAliasModule, self).tearDown()
- self.mock_run_commands.stop()
- self.mock_execute_show_cmd.stop()
- self.mock_execute_show_cmd_1.stop()
- self.mock_load_config.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.load_config.return_value = None
-
- def test_da_mode_1(self):
- # Playbook mode is basic
- # Switch has mode as enahnced
- set_module_args(dict(mode='basic'), True)
- self.execute_show_cmd.return_value = load_fixture('nxos_devicealias', 'shdastatus.cfg')
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['terminal dont-ask', 'no device-alias mode enhanced',
- 'device-alias commit', 'no terminal dont-ask'])
-
- def test_da_mode_2(self):
- # Playbook mode is enhanced
- # Switch has mode as enahnced
- set_module_args(dict(mode='enhanced'), True)
- self.execute_show_cmd.return_value = load_fixture('nxos_devicealias', 'shdastatus.cfg')
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
-
- def test_da_distribute_1(self):
- # Playbook mode is enhanced , distrbute = True
- # Switch has mode as enahnced, distrbute = True
- set_module_args(dict(distribute=True, mode='enhanced'), True)
- self.execute_show_cmd.return_value = load_fixture('nxos_devicealias', 'shdastatus.cfg')
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
-
- def test_da_distribute_2(self):
- # Playbook mode is enhanced , distrbute = False
- # Switch has mode as enhanced, distrbute = True
- set_module_args(dict(distribute=False, mode='enhanced'), True)
- self.execute_show_cmd.return_value = load_fixture('nxos_devicealias', 'shdastatus.cfg')
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['no device-alias distribute'])
-
- def test_da_distribute_3(self):
- # Playbook mode is basic , distrbute = False
- # Switch has mode as enahnced, distrbute = True
- set_module_args(dict(distribute=False, mode='basic'), True)
- self.execute_show_cmd.return_value = load_fixture('nxos_devicealias', 'shdastatus.cfg')
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['no device-alias distribute', 'no device-alias mode enhanced'])
-
- def test_da_add_1(self):
- # Playbook mode is enhanced , distrbute = true , some new da being added
- # Switch has mode as enahnced, distrbute = True, switch doesnt have the new da being added
- set_module_args(dict(distribute=True, mode='enhanced',
- da=[dict(name='somename', pwwn='10:00:00:00:89:a1:01:03'),
- dict(name='somename1', pwwn='10:00:00:00:89:a1:02:03')]),
- True)
- self.execute_show_cmd.return_value = load_fixture('nxos_devicealias', 'shdastatus.cfg')
- self.execute_show_cmd_1.return_value = load_fixture('nxos_devicealias', 'shdadatabse.cfg')
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['terminal dont-ask', 'device-alias database',
- 'device-alias name somename pwwn 10:00:00:00:89:a1:01:03',
- 'device-alias name somename1 pwwn 10:00:00:00:89:a1:02:03',
- 'device-alias commit', 'no terminal dont-ask'])
-
- def test_da_add_2(self):
- # Playbook mode is enhanced , distrbute = true , some new da being added
- # Switch has mode as enahnced, distrbute = True, switch already has the pwwn:name
- set_module_args(dict(distribute=True, mode='enhanced',
- da=[dict(name='tieHost-2', pwwn='10:00:00:00:89:a1:01:02')]),
- True)
- self.execute_show_cmd.return_value = load_fixture('nxos_devicealias', 'shdastatus.cfg')
- self.execute_show_cmd_1.return_value = load_fixture('nxos_devicealias', 'shdadatabse.cfg')
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
-
- def test_da_add_3(self):
- # Playbook mode is enhanced , distrbute = true , some new da being added
- # Switch has mode as enahnced, distrbute = True, switch same name present with different pwwn
- set_module_args(dict(distribute=True, mode='enhanced',
- da=[dict(name='tieHost-2', pwwn='10:00:00:00:89:a1:01:ff')]),
- True)
- self.execute_show_cmd.return_value = load_fixture('nxos_devicealias', 'shdastatus.cfg')
- self.execute_show_cmd_1.return_value = load_fixture('nxos_devicealias', 'shdadatabse.cfg')
- result = self.execute_module(changed=False, failed=True)
-
- def test_da_add_4(self):
- # Playbook mode is enhanced , distrbute = true , some new da being added
- # Switch has mode as enahnced, distrbute = True, switch same pwwn present with different name
- set_module_args(dict(distribute=True, mode='enhanced',
- da=[dict(name='tieHost-2222', pwwn='10:00:00:00:89:a1:01:02')]),
- True)
- self.execute_show_cmd.return_value = load_fixture('nxos_devicealias', 'shdastatus.cfg')
- self.execute_show_cmd_1.return_value = load_fixture('nxos_devicealias', 'shdadatabse.cfg')
- result = self.execute_module(changed=False, failed=True)
-
- def test_da_remove_1(self):
- # Playbook mode is enhanced , distrbute = true , some da being removed
- # Switch has mode as enahnced, distrbute = True, switch has the da that needs to be removed
- set_module_args(dict(distribute=True, mode='enhanced',
- da=[dict(name='tieHost-2', pwwn='10:00:00:00:89:a1:01:02', remove=True)]),
- True)
- self.execute_show_cmd.return_value = load_fixture('nxos_devicealias', 'shdastatus.cfg')
- self.execute_show_cmd_1.return_value = load_fixture('nxos_devicealias', 'shdadatabse.cfg')
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['terminal dont-ask', 'device-alias database',
- 'no device-alias name tieHost-2',
- 'device-alias commit', 'no terminal dont-ask'])
-
- def test_da_remove_2(self):
- # Playbook mode is enhanced , distrbute = true , some da being removed
- # Switch has mode as enahnced, distrbute = True, switch does NOT have the da that needs to be removed
- set_module_args(dict(distribute=True, mode='enhanced',
- da=[dict(name='somename', pwwn='10:00:00:00:89:a1:01:02', remove=True)]),
- True)
- self.execute_show_cmd.return_value = load_fixture('nxos_devicealias', 'shdastatus.cfg')
- self.execute_show_cmd_1.return_value = load_fixture('nxos_devicealias', 'shdadatabse.cfg')
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
-
- def test_da_lock(self):
- # Playbook mode with some data, but switch has cfs lock acq
- set_module_args(dict(distribute=True, mode='enhanced',
- da=[dict(name='somename', pwwn='10:00:00:00:89:a1:01:02', remove=True)]),
- True)
- self.execute_show_cmd.return_value = load_fixture('nxos_devicealias', 'shdastatuslock.cfg')
- self.execute_module(failed=True)
-
- def test_da_paramete_not_supported(self):
- # Playbook mode with some data, but switch has cfs lock acq
- # the below one instead of 'mode' we are passing 'mod', kind of typo in playbook
- set_module_args(dict(distribute=True, mod='enhanced',
- da=[dict(name='somename', pwwn='10:00:00:00:89:a1:01:02', remove=True)]),
- True)
- self.execute_show_cmd.return_value = load_fixture('nxos_devicealias', 'shdastatus.cfg')
- self.execute_show_cmd_1.return_value = load_fixture('nxos_devicealias', 'shdadatabse.cfg')
- with pytest.raises(AnsibleFailJson) as errinfo:
- self.execute_module()
- testdata = errinfo.value.args[0]
- assert 'Unsupported parameters' in str(testdata['msg'])
- assert testdata['failed']
-
- def test_da_name_parameter_missing(self):
- # Lets say you are trying to add a device alias but forgot to put 'name' in the 'da' parameter
- set_module_args(dict(distribute=True, mode='enhanced',
- da=[dict(pwwn='10:00:00:00:89:a1:01:02')]),
- True)
- self.execute_show_cmd.return_value = load_fixture('nxos_devicealias', 'shdastatus.cfg')
- self.execute_show_cmd_1.return_value = load_fixture('nxos_devicealias', 'shdadatabse.cfg')
- with pytest.raises(AnsibleFailJson) as errinfo:
- self.execute_module()
- testdata = errinfo.value.args[0]
- assert 'missing required arguments' in str(testdata['msg'])
- assert testdata['failed']
-
- def test_da_rename_1(self):
- # rename works
- set_module_args(dict(rename=[dict(old_name='test1_add', new_name='test234'),
- dict(old_name='tieHost-1', new_name='tieTarget-1')]), True)
- self.execute_show_cmd.return_value = load_fixture('nxos_devicealias', 'shdastatus.cfg')
- self.execute_show_cmd_1.return_value = load_fixture('nxos_devicealias', 'shdadatabse.cfg')
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['terminal dont-ask', 'device-alias database',
- 'device-alias rename test1_add test234',
- 'device-alias rename tieHost-1 tieTarget-1',
- 'device-alias commit', 'no terminal dont-ask'])
-
- def test_da_rename_2(self):
- # rename : oldname not present
- set_module_args(dict(rename=[dict(old_name='test1', new_name='test234'),
- dict(old_name='tie', new_name='tieTarget-1')]), True)
- self.execute_show_cmd.return_value = load_fixture('nxos_devicealias', 'shdastatus.cfg')
- self.execute_show_cmd_1.return_value = load_fixture('nxos_devicealias', 'shdadatabse.cfg')
- result = self.execute_module(changed=False, failed=True)
- self.assertEqual(result['commands'], [])
-
- def test_da_mansi(self):
- set_module_args(
- {
- "distribute": True,
- "mode": "enhanced",
- },
- True
- )
- self.execute_show_cmd.return_value = load_fixture('nxos_devicealias', 'shdastatus_mansi.cfg')
- self.execute_show_cmd_1.return_value = load_fixture('nxos_devicealias', 'shdadatabse.cfg')
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['device-alias distribute', 'terminal dont-ask',
- 'device-alias mode enhanced',
- 'device-alias commit', 'no terminal dont-ask'])
diff --git a/test/units/modules/network/nxos/storage/test_nxos_vsan.py b/test/units/modules/network/nxos/storage/test_nxos_vsan.py
deleted file mode 100644
index 5e94601d72..0000000000
--- a/test/units/modules/network/nxos/storage/test_nxos_vsan.py
+++ /dev/null
@@ -1,237 +0,0 @@
-#!/usr/bin/env python
-# Copyright: Ansible Project
-# 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 pytest
-
-from units.compat.mock import patch
-from units.modules.utils import AnsibleFailJson
-from ansible.modules.network.nxos.storage import nxos_vsan
-from ansible.modules.network.nxos.storage.nxos_vsan import GetVsanInfoFromSwitch
-
-from ..nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosVsanModule(TestNxosModule):
- module = nxos_vsan
-
- def setUp(self):
- super(TestNxosVsanModule, self).setUp()
- module_path = 'ansible.modules.network.nxos.storage.nxos_vsan.'
-
- self.mock_run_commands = patch(module_path + 'run_commands')
- self.run_commands = self.mock_run_commands.start()
-
- self.mock_execute_show_vsan_cmd = patch(module_path + 'GetVsanInfoFromSwitch.execute_show_vsan_cmd')
- self.execute_show_vsan_cmd = self.mock_execute_show_vsan_cmd.start()
-
- self.mock_execute_show_vsanmemcmd = patch(module_path + 'GetVsanInfoFromSwitch.execute_show_vsan_mem_cmd')
- self.execute_show_vsanmem_cmd = self.mock_execute_show_vsanmemcmd.start()
-
- self.mock_load_config = patch(module_path + 'load_config')
- self.load_config = self.mock_load_config.start()
-
- self.maxDiff = None
-
- def tearDown(self):
- super(TestNxosVsanModule, self).tearDown()
- self.mock_run_commands.stop()
- self.execute_show_vsan_cmd.stop()
- self.execute_show_vsanmem_cmd.stop()
- self.mock_load_config.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.load_config.return_value = None
-
- def test_vsan_add_remove_but_present_in_switch(self):
- margs = {
- "vsan": [
- {
- "interface": [
- "fc1/1",
- "port-channel 55"
- ],
- "id": 922,
- "remove": False,
- "name": "vsan-SAN-A"
- },
- {
- "interface": [
- "fc1/11",
- "fc1/21",
- "port-channel 56"
- ],
- "id": 923,
- "remove": False,
- "name": "vsan-SAN-B"
- },
- {
- "id": 1923,
- "remove": True,
- "name": "vsan-SAN-Old"
- }
- ]
- }
- set_module_args(margs, True)
- self.execute_show_vsan_cmd.return_value = load_fixture('nxos_vsan', 'shvsan.cfg')
- self.execute_show_vsanmem_cmd.return_value = load_fixture('nxos_vsan', 'shvsanmem.cfg')
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
-
- def test_vsan_remove(self):
- margs = {
- "vsan": [
- {
- "id": 922,
- "remove": True
- },
- {
- "id": 923,
- "remove": True
- }
- ]
- }
- set_module_args(margs, True)
- self.execute_show_vsan_cmd.return_value = load_fixture('nxos_vsan', 'shvsan.cfg')
- self.execute_show_vsanmem_cmd.return_value = load_fixture('nxos_vsan', 'shvsanmem.cfg')
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ["terminal dont-ask"] + ["vsan database"] +
- ["no vsan 922", "no vsan 923"] + ["no terminal dont-ask"])
-
- def test_vsan_add(self):
- margs = {
- "vsan": [
- {
- "interface": [
- "fc1/1",
- "port-channel 55"
- ],
- "id": 924,
- "name": "vsan-SAN-924"
- },
- {
- "interface": [
- "fc1/11",
- "fc1/21",
- "port-channel 56"
- ],
- "id": 925,
- "name": "vsan-SAN-925"
- }
- ]
- }
- set_module_args(margs, True)
- self.execute_show_vsan_cmd.return_value = load_fixture('nxos_vsan', 'shvsan.cfg')
- self.execute_show_vsanmem_cmd.return_value = load_fixture('nxos_vsan', 'shvsanmem.cfg')
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ["terminal dont-ask"] + ["vsan database"] +
- ["vsan 924", "vsan 924 name vsan-SAN-924", "no vsan 924 suspend",
- "vsan 924 interface fc1/1", "vsan 924 interface port-channel 55"] +
- ["vsan 925", "vsan 925 name vsan-SAN-925", "no vsan 925 suspend", "vsan 925 interface fc1/11",
- "vsan 925 interface fc1/21", "vsan 925 interface port-channel 56"] +
- ["no terminal dont-ask"])
-
- def test_vsan_suspend(self):
- margs = {
- "vsan": [
- {
- "interface": [
- "fc1/1",
- "port-channel 55"
- ],
- "id": 924,
- "name": "vsan-SAN-924"
- },
- {
- "id": 925,
- "name": "vsan-SAN-925",
- "suspend": True
- }
- ]
- }
- set_module_args(margs, True)
- self.execute_show_vsan_cmd.return_value = load_fixture('nxos_vsan', 'shvsan.cfg')
- self.execute_show_vsanmem_cmd.return_value = load_fixture('nxos_vsan', 'shvsanmem.cfg')
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ["terminal dont-ask"] + ["vsan database"] +
- ["vsan 924", "vsan 924 name vsan-SAN-924", "no vsan 924 suspend",
- "vsan 924 interface fc1/1", "vsan 924 interface port-channel 55"] +
- ["vsan 925", "vsan 925 name vsan-SAN-925", "vsan 925 suspend"] +
- ["no terminal dont-ask"])
-
- def test_vsan_invalid_vsan(self):
- margs = {
- "vsan": [
- {
- "id": 4096,
- "name": "vsan-SAN-925",
- "suspend": True
- }
- ]
- }
- set_module_args(margs, True)
- self.execute_show_vsan_cmd.return_value = load_fixture('nxos_vsan', 'shvsan.cfg')
- self.execute_show_vsanmem_cmd.return_value = load_fixture('nxos_vsan', 'shvsanmem.cfg')
- with pytest.raises(AnsibleFailJson) as errinfo:
- self.execute_module()
- testdata = errinfo.value.args[0]
- assert 'invalid vsan' in str(testdata['msg'])
- assert testdata['failed']
-
- def test_vsan_change_reserved_vsan(self):
- margs = {
- "vsan": [
- {
- "id": 4094,
- "name": "vsan-SAN-925",
- "suspend": True
- }
- ]
- }
- set_module_args(margs, True)
- self.execute_show_vsan_cmd.return_value = load_fixture('nxos_vsan', 'shvsan.cfg')
- self.execute_show_vsanmem_cmd.return_value = load_fixture('nxos_vsan', 'shvsanmem.cfg')
- result = self.execute_module(changed=False)
- assert 'reserved vsan' in str(result['messages'])
- self.assertEqual(result['commands'], [])
-
- def test_vsan_add_int_existing_vsan(self):
- margs = {
- "vsan": [
- {
- "interface": [
- "fc1/1",
- "fc1/40",
- "port-channel 155"
- ],
- "id": 922,
- },
- ]
- }
- set_module_args(margs, True)
- self.execute_show_vsan_cmd.return_value = load_fixture('nxos_vsan', 'shvsan.cfg')
- self.execute_show_vsanmem_cmd.return_value = load_fixture('nxos_vsan', 'shvsanmem.cfg')
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ["terminal dont-ask"] + ["vsan database"] +
- ["vsan 922 interface fc1/40", "vsan 922 interface port-channel 155"] +
- ["no terminal dont-ask"])
-
- def test_vsan_remove_non_existing_vsan(self):
- margs = {
- "vsan": [
- {
- "id": 1111,
- "remove": True
- },
- ]
- }
- set_module_args(margs, True)
- self.execute_show_vsan_cmd.return_value = load_fixture('nxos_vsan', 'shvsan.cfg')
- self.execute_show_vsanmem_cmd.return_value = load_fixture('nxos_vsan', 'shvsanmem.cfg')
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
- assert 'no vsan' in str(result['messages'])
diff --git a/test/units/modules/network/nxos/storage/test_nxos_zone_zoneset.py b/test/units/modules/network/nxos/storage/test_nxos_zone_zoneset.py
deleted file mode 100644
index ec85dec41f..0000000000
--- a/test/units/modules/network/nxos/storage/test_nxos_zone_zoneset.py
+++ /dev/null
@@ -1,496 +0,0 @@
-#!/usr/bin/env python
-# Copyright: Ansible Project
-# 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 pytest
-
-from units.compat.mock import patch
-from units.modules.utils import AnsibleFailJson, AnsibleExitJson
-from ansible.modules.network.nxos.storage import nxos_zone_zoneset
-from ansible.modules.network.nxos.storage.nxos_zone_zoneset import ShowZonesetActive
-from ansible.modules.network.nxos.storage.nxos_zone_zoneset import ShowZoneset
-from ansible.modules.network.nxos.storage.nxos_zone_zoneset import ShowZone
-from ansible.modules.network.nxos.storage.nxos_zone_zoneset import ShowZoneStatus
-
-from ..nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosZoneZonesetModule(TestNxosModule):
- module = nxos_zone_zoneset
-
- def setUp(self):
- super(TestNxosZoneZonesetModule, self).setUp()
- module_path = 'ansible.modules.network.nxos.storage.nxos_zone_zoneset.'
-
- self.mock_run_commands = patch(module_path + 'run_commands')
- self.run_commands = self.mock_run_commands.start()
-
- self.mock_execute_show_cmd_zoneset_active = patch(
- module_path + 'ShowZonesetActive.execute_show_zoneset_active_cmd')
- self.execute_show_cmd_zoneset_active = self.mock_execute_show_cmd_zoneset_active.start()
-
- self.mock_execute_show_cmd_zoneset = patch(module_path + 'ShowZoneset.execute_show_zoneset_cmd')
- self.execute_show_cmd_zoneset = self.mock_execute_show_cmd_zoneset.start()
-
- self.mock_execute_show_cmd_zone = patch(module_path + 'ShowZone.execute_show_zone_vsan_cmd')
- self.execute_show_cmd_zone = self.mock_execute_show_cmd_zone.start()
-
- self.mock_execute_show_cmd_zone_status = patch(module_path + 'ShowZoneStatus.execute_show_zone_status_cmd')
- self.execute_show_cmd_zone_status = self.mock_execute_show_cmd_zone_status.start()
-
- self.mock_load_config = patch(module_path + 'load_config')
- self.load_config = self.mock_load_config.start()
-
- def tearDown(self):
- super(TestNxosZoneZonesetModule, self).tearDown()
- self.mock_run_commands.stop()
-
- self.execute_show_cmd_zoneset_active.stop()
- self.execute_show_cmd_zoneset.stop()
- self.execute_show_cmd_zone.stop()
- self.execute_show_cmd_zone_status.stop()
-
- self.mock_load_config.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.load_config.return_value = None
-
- # Test def zone from deny to permit and vice versa
- def test_zone_defzone_deny_to_permit(self):
- # switch has def-zone deny and mode basic
- a = dict(zone_zoneset_details=[dict(vsan=922, default_zone='permit')])
- set_module_args(a, True)
- self.execute_show_cmd_zone_status.return_value = load_fixture('nxos_zone_zoneset', 'shzonestatus_0.cfg')
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['terminal dont-ask',
- 'zone default-zone permit vsan 922',
- 'no terminal dont-ask'])
-
- def test_zone_defzone_deny_to_permit_1(self):
- # switch has def-zone deny and mode enhanced
- a = dict(zone_zoneset_details=[dict(vsan=922, default_zone='permit')])
- set_module_args(a, True)
- self.execute_show_cmd_zone_status.return_value = load_fixture('nxos_zone_zoneset', 'shzonestatus_1.cfg')
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['terminal dont-ask',
- 'zone default-zone permit vsan 922',
- 'zone commit vsan 922',
- 'no terminal dont-ask'])
-
- def test_zone_defzone_permit_to_deny_1(self):
- # switch has def-zone deny and mode enhanced
- a = dict(zone_zoneset_details=[dict(vsan=923, default_zone='deny')])
- set_module_args(a, True)
- self.execute_show_cmd_zone_status.return_value = load_fixture('nxos_zone_zoneset', 'shzonestatus_2.cfg')
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['terminal dont-ask',
- 'no zone default-zone permit vsan 923',
- 'zone commit vsan 923',
- 'no terminal dont-ask'])
-
- def test_zone_defzone_permit_to_deny_2(self):
- # switch has def-zone deny and mode enhanced
- a = dict(zone_zoneset_details=[dict(vsan=923, default_zone='deny')])
- set_module_args(a, True)
- self.execute_show_cmd_zone_status.return_value = load_fixture('nxos_zone_zoneset', 'shzonestatus_3.cfg')
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['terminal dont-ask',
- 'no zone default-zone permit vsan 923',
- 'no terminal dont-ask'])
-
- # Test zone mode from basic to enhanced and vice versa
- def test_zone_mode_basic_to_enh(self):
- # switch has def-zone deny and mode basic
- a = dict(zone_zoneset_details=[dict(vsan=922, mode='enhanced')])
- set_module_args(a, True)
- self.execute_show_cmd_zone_status.return_value = load_fixture('nxos_zone_zoneset', 'shzonestatus_0.cfg')
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['terminal dont-ask',
- 'zone mode enhanced vsan 922',
- 'zone commit vsan 922',
- 'no terminal dont-ask'])
-
- # Test zone mode from basic to enhanced and vice versa
- def test_zone_mode_basic_to_enh_1(self):
- # switch has def-zone deny and mode basic
- a = dict(zone_zoneset_details=[dict(vsan=922, mode='basic')])
- set_module_args(a, True)
- self.execute_show_cmd_zone_status.return_value = load_fixture('nxos_zone_zoneset', 'shzonestatus_1.cfg')
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['terminal dont-ask',
- 'no zone mode enhanced vsan 922',
- 'no terminal dont-ask'])
-
- # Test zone smart-zone from enabled to disabled and vice versa
- def test_zone_smart_zone(self):
- # switch has def-zone deny and mode basic
- a = dict(zone_zoneset_details=[dict(vsan=922, smart_zoning=False)])
- set_module_args(a, True)
- self.execute_show_cmd_zone_status.return_value = load_fixture('nxos_zone_zoneset', 'shzonestatus_0.cfg')
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['terminal dont-ask',
- 'no zone smart-zoning enable vsan 922',
- 'no terminal dont-ask'])
-
- def test_zone_smart_zone_1(self):
- # switch has def-zone deny and mode basic
- a = dict(zone_zoneset_details=[dict(vsan=923, smart_zoning=True)])
- set_module_args(a, True)
- self.execute_show_cmd_zone_status.return_value = load_fixture('nxos_zone_zoneset', 'shzonestatus_1.cfg')
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['terminal dont-ask',
- 'zone smart-zoning enable vsan 923',
- 'zone commit vsan 923',
- 'no terminal dont-ask'])
-
- # Test zone add/removal
- def test_zone_add_rem(self):
- a = dict(zone_zoneset_details=[dict(
- vsan=923,
- zone=[
- dict(
- name='zoneB',
- remove=True)
- ])
- ])
- set_module_args(a, True)
- self.execute_show_cmd_zone_status.return_value = load_fixture('nxos_zone_zoneset', 'shzonestatus_1.cfg')
- self.execute_show_cmd_zone.return_value = load_fixture('nxos_zone_zoneset', 'shzone_0.cfg')
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'],
- ['terminal dont-ask', 'no zone name zoneB vsan 923', 'zone commit vsan 923',
- 'no terminal dont-ask'])
-
- def test_zone_add_rem_1(self):
- a = dict(zone_zoneset_details=[dict(
- vsan=923,
- zone=[
- dict(
- name='zoneC',
- remove=True)
- ])
- ])
- set_module_args(a, True)
- self.execute_show_cmd_zone_status.return_value = load_fixture('nxos_zone_zoneset', 'shzonestatus_1.cfg')
- self.execute_show_cmd_zone.return_value = load_fixture('nxos_zone_zoneset', 'shzone_0.cfg')
- result = self.execute_module(changed=False, failed=False)
- m = "zone 'zoneC' is not present in vsan 923"
- assert m in str(result['messages'])
- self.assertEqual(result['commands'], [])
-
- def test_zone_add_rem_2(self):
- a = dict(zone_zoneset_details=[dict(
- vsan=923,
- zone=[
- dict(
- name='zoneBNew')
- ])
- ])
- set_module_args(a, True)
- self.execute_show_cmd_zone_status.return_value = load_fixture('nxos_zone_zoneset', 'shzonestatus_1.cfg')
- self.execute_show_cmd_zone.return_value = load_fixture('nxos_zone_zoneset', 'shzone_0.cfg')
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['terminal dont-ask',
- 'zone name zoneBNew vsan 923',
- 'zone commit vsan 923',
- 'no terminal dont-ask'])
-
- def test_zone_add_rem_3(self):
- a = dict(zone_zoneset_details=[dict(
- vsan=923,
- zone=[
- dict(
- name='zoneB')
- ])
- ])
- set_module_args(a, True)
- self.execute_show_cmd_zone_status.return_value = load_fixture('nxos_zone_zoneset', 'shzonestatus_1.cfg')
- self.execute_show_cmd_zone.return_value = load_fixture('nxos_zone_zoneset', 'shzone_0.cfg')
- result = self.execute_module(changed=False, failed=False)
- m = "zone 'zoneB' is already present in vsan 923"
- assert m in str(result['messages'])
- self.assertEqual(result['commands'], [])
-
- # Test zone mem add/removal
- def test_zonemem_add_rem(self):
- mem1 = {'pwwn': '10:00:10:94:00:00:00:01'}
- mem2 = {'device_alias': 'somename'}
- a = dict(zone_zoneset_details=[dict(
- vsan=923,
- zone=[
- dict(
- name='zoneBNew',
- members=[mem1, mem2])
- ])
- ])
- set_module_args(a, True)
- self.execute_show_cmd_zone_status.return_value = load_fixture('nxos_zone_zoneset', 'shzonestatus_1.cfg')
- self.execute_show_cmd_zone.return_value = load_fixture('nxos_zone_zoneset', 'shzone_0.cfg')
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['terminal dont-ask',
- 'zone name zoneBNew vsan 923',
- 'member pwwn 10:00:10:94:00:00:00:01',
- 'member device-alias somename',
- 'zone commit vsan 923',
- 'no terminal dont-ask'])
-
- # Test zone mem add/removal
- def test_zonemem_add_rem_1(self):
- mem1 = {'pwwn': '11:11:11:11:11:11:11:11', 'remove': True}
- mem2 = {'device_alias': 'test123', 'remove': True}
- a = dict(zone_zoneset_details=[dict(
- vsan=923,
- zone=[
- dict(
- name='zoneA',
- members=[mem1, mem2])
- ])
- ])
- set_module_args(a, True)
- self.execute_show_cmd_zone_status.return_value = load_fixture('nxos_zone_zoneset', 'shzonestatus_1.cfg')
- self.execute_show_cmd_zone.return_value = load_fixture('nxos_zone_zoneset', 'shzone_0.cfg')
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['terminal dont-ask',
- 'zone name zoneA vsan 923',
- 'no member pwwn 11:11:11:11:11:11:11:11',
- 'no member device-alias test123',
- 'zone commit vsan 923',
- 'no terminal dont-ask'])
-
- # Test zone mem add/removal
- def test_zonemem_add_rem_2(self):
- mem1 = {'pwwn': '11:11:11:11:11:11:11:11', 'remove': True}
- mem2 = {'device_alias': 'test123', 'remove': True}
- a = dict(zone_zoneset_details=[dict(
- vsan=923,
- zone=[
- dict(
- name='zoneA1',
- members=[mem1, mem2])
- ])
- ])
- set_module_args(a, True)
- self.execute_show_cmd_zone_status.return_value = load_fixture('nxos_zone_zoneset', 'shzonestatus_1.cfg')
- self.execute_show_cmd_zone.return_value = load_fixture('nxos_zone_zoneset', 'shzone_0.cfg')
- result = self.execute_module(changed=False, failed=False)
- m = "zone 'zoneA1' is not present in vsan 923 , hence cannot remove the members"
- assert m in str(result['messages'])
- self.assertEqual(result['commands'], [])
-
- def test_zonemem_add_rem_3(self):
- mem1 = {'pwwn': '10:00:10:94:00:00:00:01', 'devtype': 'initiator'}
- mem2 = {'device_alias': 'somename', 'devtype': 'target'}
- mem3 = {'device_alias': 'somenameWithBoth', 'devtype': 'both'}
-
- a = dict(zone_zoneset_details=[dict(
- vsan=922,
- zone=[
- dict(
- name='zoneBNew',
- members=[mem1, mem2, mem3])
- ])
- ])
- set_module_args(a, True)
- self.execute_show_cmd_zone_status.return_value = load_fixture('nxos_zone_zoneset', 'shzonestatus_0.cfg')
- self.execute_show_cmd_zone.return_value = load_fixture('nxos_zone_zoneset', 'shzone_1.cfg')
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'],
- ['terminal dont-ask', 'zone name zoneBNew vsan 922',
- 'member pwwn 10:00:10:94:00:00:00:01 initiator',
- 'member device-alias somename target',
- 'member device-alias somenameWithBoth both',
- 'no terminal dont-ask'])
-
- # Test zone mem add/removal with devtype
- def test_zonemem_add_rem_4(self):
- mem2 = {'device_alias': 'test123', 'devtype': 'both', 'remove': True}
-
- a = dict(zone_zoneset_details=[dict(
- vsan=922,
- zone=[
- dict(
- name='zoneA',
- members=[mem2])
- ])
- ])
- set_module_args(a, True)
- self.execute_show_cmd_zone_status.return_value = load_fixture('nxos_zone_zoneset', 'shzonestatus_0.cfg')
- self.execute_show_cmd_zone.return_value = load_fixture('nxos_zone_zoneset', 'shzone_1.cfg')
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'],
- ['terminal dont-ask', 'zone name zoneA vsan 922',
- 'no member device-alias test123 both',
- 'no terminal dont-ask'])
-
- # Test zoneset add/removal
- def test_zoneset_add_rem(self):
- a = dict(zone_zoneset_details=[
- dict(vsan=922,
- zoneset=[
- dict(name='zsetname21', remove=True)
- ])
- ])
- set_module_args(a, True)
- self.execute_show_cmd_zone_status.return_value = load_fixture('nxos_zone_zoneset', 'shzonestatus_0.cfg')
- self.execute_show_cmd_zoneset.return_value = load_fixture('nxos_zone_zoneset', 'shzoneset_0.cfg')
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'],
- ['terminal dont-ask', 'no zoneset name zsetname21 vsan 922', 'no terminal dont-ask']
- )
-
- def test_zoneset_add_rem_1(self):
- a = dict(zone_zoneset_details=[
- dict(vsan=922,
- zoneset=[
- dict(name='zsetname21New')
- ])
- ])
- set_module_args(a, True)
- self.execute_show_cmd_zone_status.return_value = load_fixture('nxos_zone_zoneset', 'shzonestatus_0.cfg')
- self.execute_show_cmd_zoneset.return_value = load_fixture('nxos_zone_zoneset', 'shzoneset_0.cfg')
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'],
- ['terminal dont-ask', 'zoneset name zsetname21New vsan 922', 'no terminal dont-ask']
- )
-
- def test_zoneset_add_rem_2(self):
- a = dict(zone_zoneset_details=[
- dict(vsan=922,
- zoneset=[
- dict(name='zsetname21')
- ])
- ])
- set_module_args(a, True)
- self.execute_show_cmd_zone_status.return_value = load_fixture('nxos_zone_zoneset', 'shzonestatus_0.cfg')
- self.execute_show_cmd_zoneset.return_value = load_fixture('nxos_zone_zoneset', 'shzoneset_0.cfg')
- result = self.execute_module(changed=False, failed=False)
- m = "zoneset 'zsetname21' is already present in vsan 922"
- self.assertEqual(result['commands'], [])
- self.assertEqual(result['messages'], [m])
-
- def test_zoneset_add_rem_3(self):
- a = dict(zone_zoneset_details=[
- dict(vsan=922,
- zoneset=[
- dict(name='zsetname21New', remove=True)
- ])
- ])
- set_module_args(a, True)
- self.execute_show_cmd_zone_status.return_value = load_fixture('nxos_zone_zoneset', 'shzonestatus_0.cfg')
- self.execute_show_cmd_zoneset.return_value = load_fixture('nxos_zone_zoneset', 'shzoneset_0.cfg')
- result = self.execute_module(changed=False, failed=False)
- m = "zoneset 'zsetname21New' is not present in vsan 922 ,hence there is nothing to remove"
- self.assertEqual(result['commands'], [])
- self.assertEqual(result['messages'], [m])
-
- # Test zoneset mem add/removal
- def test_zoneset_mem_add_rem(self):
- mem1 = {'name': 'newZoneV100'}
-
- a = dict(zone_zoneset_details=[
- dict(vsan=922,
- zoneset=[
- dict(name='zsetname21', members=[mem1])
- ])
- ])
- set_module_args(a, True)
- self.execute_show_cmd_zone_status.return_value = load_fixture('nxos_zone_zoneset', 'shzonestatus_0.cfg')
- self.execute_show_cmd_zoneset.return_value = load_fixture('nxos_zone_zoneset', 'shzoneset_0.cfg')
- result = self.execute_module(changed=True, failed=False)
- self.assertEqual(result['commands'],
- ['terminal dont-ask', 'zoneset name zsetname21 vsan 922', 'member newZoneV100',
- 'no terminal dont-ask']
- )
-
- # Test zoneset mem add/removal
- def test_zoneset_mem_add_rem_1(self):
- mem1 = {'name': 'zone21A', 'remove': True}
-
- a = dict(zone_zoneset_details=[
- dict(vsan=922,
- zoneset=[
- dict(name='zsetname21', members=[mem1])
- ])
- ])
- set_module_args(a, True)
- self.execute_show_cmd_zone_status.return_value = load_fixture('nxos_zone_zoneset', 'shzonestatus_0.cfg')
- self.execute_show_cmd_zoneset.return_value = load_fixture('nxos_zone_zoneset', 'shzoneset_0.cfg')
- result = self.execute_module(changed=True, failed=False)
- self.assertEqual(result['commands'],
- ['terminal dont-ask', 'zoneset name zsetname21 vsan 922', 'no member zone21A',
- 'no terminal dont-ask']
- )
-
- # Test zoneset mem add/removal
- def test_zoneset_mem_add_rem_2(self):
- mem1 = {'name': 'zone21', 'remove': True}
-
- a = dict(zone_zoneset_details=[
- dict(vsan=922,
- zoneset=[
- dict(name='zsetname21', members=[mem1])
- ])
- ])
- set_module_args(a, True)
- self.execute_show_cmd_zone_status.return_value = load_fixture('nxos_zone_zoneset', 'shzonestatus_0.cfg')
- self.execute_show_cmd_zoneset.return_value = load_fixture('nxos_zone_zoneset', 'shzoneset_0.cfg')
- result = self.execute_module(changed=False, failed=False)
- m = "zoneset member 'zone21' is not present in zoneset 'zsetname21' in vsan 922 ,hence there is nothing to remove"
- self.assertEqual(result['commands'], [])
- self.assertEqual(result['messages'], [m])
-
- # Test zoneset activate/deactivate
- def test_zoneset_activate_deactivate(self):
- a = dict(zone_zoneset_details=[
- dict(vsan=221,
- zoneset=[
- dict(name='zsv221', action='activate')
- ])
- ])
- set_module_args(a, True)
- self.execute_show_cmd_zone_status.return_value = load_fixture('nxos_zone_zoneset', 'shzonestatus_4.cfg')
- self.execute_show_cmd_zoneset.return_value = load_fixture('nxos_zone_zoneset', 'shzoneset_2.cfg')
- self.execute_show_cmd_zoneset_active.return_value = load_fixture('nxos_zone_zoneset', 'shzonesetactive_0.cfg')
- result = self.execute_module(changed=False, failed=False)
- m = "zoneset 'zsv221' is already present in vsan 221"
- m1 = "zoneset 'zsv221' in vsan 221 is already activated"
- self.assertEqual(result['commands'], [])
- self.assertEqual(result['messages'], [m, m1])
-
- def test_zoneset_activate_deactivate_1(self):
- a = dict(zone_zoneset_details=[
- dict(vsan=221,
- zoneset=[
- dict(name='zsv221', action='deactivate')
- ])
- ])
- set_module_args(a, True)
- self.execute_show_cmd_zone_status.return_value = load_fixture('nxos_zone_zoneset', 'shzonestatus_4.cfg')
- self.execute_show_cmd_zoneset.return_value = load_fixture('nxos_zone_zoneset', 'shzoneset_2.cfg')
- self.execute_show_cmd_zoneset_active.return_value = load_fixture('nxos_zone_zoneset', 'shzonesetactive_0.cfg')
- result = self.execute_module(changed=True, failed=False)
- self.assertEqual(result['commands'], ['terminal dont-ask',
- 'no zoneset activate name zsv221 vsan 221',
- 'zone commit vsan 221',
- 'no terminal dont-ask'])
-
- def test_zoneset_activate_deactivate_2(self):
- a = dict(zone_zoneset_details=[
- dict(vsan=221,
- zoneset=[
- dict(name='zsv221New', action='activate')
- ])
- ])
- set_module_args(a, True)
- self.execute_show_cmd_zone_status.return_value = load_fixture('nxos_zone_zoneset', 'shzonestatus_4.cfg')
- self.execute_show_cmd_zoneset.return_value = load_fixture('nxos_zone_zoneset', 'shzoneset_2.cfg')
- self.execute_show_cmd_zoneset_active.return_value = load_fixture('nxos_zone_zoneset', 'shzonesetactive_0.cfg')
- result = self.execute_module(changed=True, failed=False)
- self.assertEqual(result['commands'], ['terminal dont-ask', 'zoneset name zsv221New vsan 221',
- 'zoneset activate name zsv221New vsan 221',
- 'zone commit vsan 221',
- 'no terminal dont-ask'])
diff --git a/test/units/modules/network/nxos/test_nxos_acl.py b/test/units/modules/network/nxos/test_nxos_acl.py
deleted file mode 100644
index 39fb0b0486..0000000000
--- a/test/units/modules/network/nxos/test_nxos_acl.py
+++ /dev/null
@@ -1,79 +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.nxos import nxos_acl
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosAclModule(TestNxosModule):
-
- module = nxos_acl
-
- def setUp(self):
- super(TestNxosAclModule, self).setUp()
-
- self.mock_run_commands = patch('ansible.modules.network.nxos.nxos_acl.run_commands')
- self.run_commands = self.mock_run_commands.start()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_acl.load_config')
- self.load_config = self.mock_load_config.start()
-
- def tearDown(self):
- super(TestNxosAclModule, self).tearDown()
- self.mock_run_commands.stop()
- self.mock_load_config.stop()
-
- def load_fixtures(self, commands=None, device=''):
- def load_from_file(*args, **kwargs):
- module, commands = args
- output = list()
-
- for item in commands:
- try:
- obj = json.loads(item)
- command = obj['command']
- except ValueError:
- command = item
- filename = '%s.txt' % str(command).split(' | ')[0].replace(' ', '_')
- output.append(load_fixture('nxos_acl', filename))
- return output
-
- self.run_commands.side_effect = load_from_file
- self.load_config.return_value = None
-
- def test_nxos_acl(self):
- set_module_args(dict(name='ANSIBLE', seq=10, action='permit',
- proto='tcp', src='192.0.2.1/24', dest='any'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['ip access-list ANSIBLE', '10 permit tcp 192.0.2.1/24 any'])
-
- def test_nxos_acl_remove(self):
- set_module_args(dict(name='copp-system-p-acl-bgp', seq=10, state='absent'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['ip access-list copp-system-p-acl-bgp', 'no 10'])
-
- def test_nxos_acl_delete_acl(self):
- set_module_args(dict(name='copp-system-p-acl-bgp', state='delete_acl'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['no ip access-list copp-system-p-acl-bgp'])
diff --git a/test/units/modules/network/nxos/test_nxos_acl_interface.py b/test/units/modules/network/nxos/test_nxos_acl_interface.py
deleted file mode 100644
index bfcab65a94..0000000000
--- a/test/units/modules/network/nxos/test_nxos_acl_interface.py
+++ /dev/null
@@ -1,71 +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)
-__metacl_interfaceass__ = type
-
-from units.compat.mock import patch
-from ansible.modules.network.nxos import nxos_acl_interface
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosAclInterfaceModule(TestNxosModule):
-
- module = nxos_acl_interface
-
- def setUp(self):
- super(TestNxosAclInterfaceModule, self).setUp()
-
- self.mock_run_commands = patch('ansible.modules.network.nxos.nxos_acl_interface.run_commands')
- self.run_commands = self.mock_run_commands.start()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_acl_interface.load_config')
- self.load_config = self.mock_load_config.start()
-
- def tearDown(self):
- super(TestNxosAclInterfaceModule, self).tearDown()
- self.mock_run_commands.stop()
- self.mock_load_config.stop()
-
- def load_fixtures(self, commands=None, device=''):
- def load_from_file(*args, **kwargs):
- module, commands = args
- output = list()
-
- for item in commands:
- try:
- command = item['command']
- except ValueError:
- command = item
- filename = '%s.txt' % str(command).split(' | ')[0].replace(' ', '_')
- output.append(load_fixture('nxos_acl_interface', filename))
- return output
-
- self.run_commands.side_effect = load_from_file
- self.load_config.return_value = None
-
- def test_nxos_acl_interface(self):
- set_module_args(dict(name='ANSIBLE', interface='ethernet1/41', direction='egress'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['interface ethernet1/41', 'ip access-group ANSIBLE out'])
-
- def test_nxos_acl_interface_remove(self):
- set_module_args(dict(name='copp-system-p-acl-bgp', interface='ethernet1/41',
- direction='egress', state='absent'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['interface ethernet1/41', 'no ip access-group copp-system-p-acl-bgp out'])
diff --git a/test/units/modules/network/nxos/test_nxos_acl_interfaces.py b/test/units/modules/network/nxos/test_nxos_acl_interfaces.py
deleted file mode 100644
index 8c55cd9480..0000000000
--- a/test/units/modules/network/nxos/test_nxos_acl_interfaces.py
+++ /dev/null
@@ -1,303 +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.modules.network.nxos import nxos_acl_interfaces
-from units.compat.mock import patch, MagicMock
-from units.modules.utils import set_module_args
-from .nxos_module import TestNxosModule, load_fixture
-
-
-class TestNxosAclInterfacesModule(TestNxosModule):
-
- module = nxos_acl_interfaces
-
- def setUp(self):
- super(TestNxosAclInterfacesModule, 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.nxos.config.acl_interfaces.acl_interfaces.Acl_interfaces.edit_config'
- )
- self.edit_config = self.mock_edit_config.start()
-
- self.mock_execute_show_command = patch(
- 'ansible.module_utils.network.nxos.facts.acl_interfaces.acl_interfaces.Acl_interfacesFacts.get_device_data'
- )
- self.execute_show_command = self.mock_execute_show_command.start()
-
- def tearDown(self):
- super(TestNxosAclInterfacesModule, 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, device=''):
- def load_from_file(*args, **kwargs):
- output = '''interface Ethernet1/2\n ip access-group ACL1v4 out\n interface Ethernet1/4\n ipv6 port traffic-filter ACL2v6 in\n'''
- return output
-
- self.execute_show_command.side_effect = load_from_file
-
- def test_nxos_acl_interfaces_merged(self):
- set_module_args(
- dict(config=[
- dict(name="Ethernet1/3",
- access_groups=[
- dict(afi="ipv4",
- acls=[
- dict(
- name="ACL1v4",
- direction="in",
- )
- ]
- )
- ]
- )
- ], state="merged"))
- commands = ['interface Ethernet1/3',
- 'ip access-group ACL1v4 in']
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_acl_interfaces_merged_idempotent(self):
- set_module_args(
- dict(config=[
- dict(name="Ethernet1/2",
- access_groups=[
- dict(afi="ipv4",
- acls=[
- dict(
- name="ACL1v4",
- direction="out",
- )
- ]
- )
- ]
- ),
- dict(name="Ethernet1/4",
- access_groups=[
- dict(afi="ipv6",
- acls=[
- dict(
- name="ACL2v6",
- direction="in",
- port=True
- )
- ]
- )
- ]
- ),
-
- ], state="merged"))
- self.execute_module(changed=False, commands=[])
-
- def test_nxos_acl_interfaces_replaced(self):
- set_module_args(
- dict(config=[
- dict(name="Ethernet1/2",
- access_groups=[
- dict(afi="ipv6",
- acls=[
- dict(
- name="ACL1v6",
- direction="in",
- port=True
- )
- ]
- )
- ]
- ),
- dict(name="Ethernet1/5",
- access_groups=[
- dict(afi="ipv4",
- acls=[
- dict(
- name="ACL2v4",
- direction="in",
- port=True
- )
- ]
- )
- ]
- )
- ], state="replaced"))
- commands = ['interface Ethernet1/2', 'no ip access-group ACL1v4 out',
- 'ipv6 port traffic-filter ACL1v6 in', 'interface Ethernet1/5', 'ip port access-group ACL2v4 in']
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_acl_interfaces_replaced_idempotent(self):
- set_module_args(
- dict(config=[
- dict(name="Ethernet1/2",
- access_groups=[
- dict(afi="ipv4",
- acls=[
- dict(
- name="ACL1v4",
- direction="out",
- )
- ]
- )
- ]
- )], state="replaced"))
- self.execute_module(changed=False, commands=[])
-
- def test_nxos_acl_interfaces_overridden(self):
- set_module_args(
- dict(config=[
- dict(name="Ethernet1/3",
- access_groups=[
- dict(afi="ipv4",
- acls=[
- dict(
- name="ACL2v4",
- direction="out"
- ),
- dict(
- name="PortACL",
- direction="in",
- port=True
- ),
- ]
- )
- ]
- )], state="overridden"))
- commands = ['interface Ethernet1/2', 'no ip access-group ACL1v4 out', 'interface Ethernet1/4',
- 'no ipv6 port traffic-filter ACL2v6 in', 'interface Ethernet1/3', 'ip access-group ACL2v4 out', 'ip port access-group PortACL in']
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_acl_interfaces_overridden_idempotent(self):
- set_module_args(
- dict(config=[
- dict(name="Ethernet1/2",
- access_groups=[
- dict(afi="ipv4",
- acls=[
- dict(
- name="ACL1v4",
- direction="out",
- )
- ]
- )
- ]
- ),
- dict(name="Ethernet1/4",
- access_groups=[
- dict(afi="ipv6",
- acls=[
- dict(
- name="ACL2v6",
- direction="in",
- port=True
- )
- ]
- )
- ]
- ),
- ], state="overridden"))
- self.execute_module(changed=False, commands=[])
-
- def test_nxos_acl_interfaces_deletedname(self):
- set_module_args(
- dict(config=[dict(name="Ethernet1/2")], state="deleted"))
- commands = ['interface Ethernet1/2', 'no ip access-group ACL1v4 out']
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_acl_interfaces_deletedafi(self):
- set_module_args(
- dict(config=[dict(name="Ethernet1/2", access_groups=[
- dict(afi="ipv4")
- ])], state="deleted"))
- commands = ['interface Ethernet1/2', 'no ip access-group ACL1v4 out']
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_acl_interfaces_deletedacl(self):
- set_module_args(
- dict(config=[dict(name="Ethernet1/2", access_groups=[
- dict(afi="ipv4", acls=[
- dict(
- name="ACL1v4",
- direction="out"
- )
- ])
- ])], state="deleted"))
- commands = ['interface Ethernet1/2', 'no ip access-group ACL1v4 out']
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_acl_interfaces_rendered(self):
- set_module_args(
- dict(config=[
- dict(name="Ethernet1/2",
- access_groups=[
- dict(afi="ipv4",
- acls=[
- dict(
- name="ACL1v4",
- direction="out",
- )
- ]
- )
- ]
- ),
- dict(name="Ethernet1/4",
- access_groups=[
- dict(afi="ipv6",
- acls=[
- dict(
- name="ACL2v6",
- direction="in",
- port=True
- )
- ]
- )
- ]
- ),
- ], state="rendered"))
- commands = ['interface Ethernet1/2', 'ip access-group ACL1v4 out',
- 'interface Ethernet1/4', 'ipv6 port traffic-filter ACL2v6 in']
- result = self.execute_module(changed=False)
- self.assertEqual(sorted(result['rendered']), sorted(
- commands), result['rendered'])
-
- def test_nxos_acl_interfaces_parsed(self):
- set_module_args(dict(running_config='''interface Ethernet1/2\n ip access-group ACL1v4 out\n interface Ethernet1/4\n \
- ipv6 port traffic-filter ACL2v6 in''',
- state="parsed"))
- result = self.execute_module(changed=False)
- compare_list = [{'access_groups': [{'acls': [{'direction': 'out', 'name': 'ACL1v4'}], 'afi': 'ipv4'}], 'name': 'Ethernet1/2'},
- {'access_groups': [{'acls': [{'direction': 'in', 'name': 'ACL2v6', 'port': True}], 'afi': 'ipv6'}], 'name': 'Ethernet1/4'}]
- self.assertEqual(result['parsed'],
- compare_list, result['parsed'])
-
- def test_nxos_acl_interfaces_gathered(self):
- set_module_args(dict(config=[], state="gathered"))
- result = self.execute_module(changed=False)
- compare_list = [{'access_groups': [{'acls': [{'direction': 'out', 'name': 'ACL1v4'}], 'afi': 'ipv4'}], 'name': 'Ethernet1/2'},
- {'access_groups': [{'acls': [{'direction': 'in', 'name': 'ACL2v6', 'port': True}], 'afi': 'ipv6'}], 'name': 'Ethernet1/4'}]
- self.assertEqual(result['gathered'],
- compare_list, result['gathered'])
diff --git a/test/units/modules/network/nxos/test_nxos_acls.py b/test/units/modules/network/nxos/test_nxos_acls.py
deleted file mode 100644
index 32cfbdc168..0000000000
--- a/test/units/modules/network/nxos/test_nxos_acls.py
+++ /dev/null
@@ -1,370 +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.modules.network.nxos import nxos_acls
-from units.compat.mock import patch, MagicMock
-from units.modules.utils import set_module_args
-from .nxos_module import TestNxosModule, load_fixture
-
-
-class TestNxosAclsModule(TestNxosModule):
-
- module = nxos_acls
-
- def setUp(self):
- super(TestNxosAclsModule, 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.nxos.config.acls.acls.Acls.edit_config'
- )
- self.edit_config = self.mock_edit_config.start()
-
- self.mock_execute_show_command = patch(
- 'ansible.module_utils.network.nxos.facts.acls.acls.AclsFacts.get_device_data'
- )
- self.execute_show_command = self.mock_execute_show_command.start()
-
- def tearDown(self):
- super(TestNxosAclsModule, 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, device=''):
- def load_from_file(*args, **kwargs):
- v4 = '''\nip access-list ACL1v4\n 10 permit ip any any\n 20 deny udp any any'''
- v6 = '''\nipv6 access-list ACL1v6\n 10 permit sctp any any'''
- return v4 + v6
-
- self.execute_show_command.side_effect = load_from_file
-
- def test_nxos_acls_merged(self):
- set_module_args(
- dict(config=[
- dict(afi="ipv4",
- acls=[
- dict(name="ACL2v4",
- aces=[
- dict(
- grant="deny",
- destination=dict(any=True),
- source=dict(any=True),
- fragments=True,
- sequence=20,
- protocol="tcp",
- protocol_options=dict(
- tcp=dict(ack=True))
- )
- ]
- )
- ]
- ),
- dict(afi="ipv6",
- acls=[
- dict(name="ACL2v6")
- ])
- ], state="merged"))
- commands = ['ip access-list ACL2v4',
- '20 deny tcp any any ack fragments',
- 'ipv6 access-list ACL2v6']
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_acls_merged_idempotent(self):
- set_module_args(
- dict(config=[
- dict(afi="ipv4",
- acls=[
- dict(name="ACL1v4",
- aces=[
- dict(
- grant="permit",
- destination=dict(any=True),
- source=dict(any=True),
- sequence=10,
- protocol="ip"
- ),
- dict(
- grant="deny",
- destination=dict(any=True),
- source=dict(any=True),
- sequence=20,
- protocol="udp")
- ]
- ),
- ]
- ),
- dict(afi="ipv6",
- acls=[
- dict(name="ACL1v6",
- aces=[
- dict(
- grant="permit",
- destination=dict(any=True),
- source=dict(any=True),
- sequence=10,
- protocol="sctp",
- )
- ])
- ])
- ], state="merged"))
- self.execute_module(changed=False, commands=[])
-
- def test_nxos_acls_replaced(self):
- set_module_args(
- dict(config=[
- dict(afi="ipv4",
- acls=[
- dict(name="ACL1v4",
- aces=[
- dict(
- grant="permit",
- destination=dict(host="192.0.2.28"),
- source=dict(any=True),
- log=True,
- sequence=50,
- protocol="icmp",
- protocol_options=dict(
- icmp=dict(administratively_prohibited=True))
- )
- ]
- )
- ]
- )
- ], state="replaced"))
- commands = ['ip access-list ACL1v4', 'no 20 deny udp any any',
- 'no 10 permit ip any any',
- '50 permit icmp any host 192.0.2.28 administratively-prohibited log']
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_acls_replaced_idempotent(self):
- set_module_args(
- dict(config=[
- dict(afi="ipv4",
- acls=[
- dict(name="ACL1v4",
- aces=[
- dict(
- grant="permit",
- destination=dict(any=True),
- source=dict(any=True),
- sequence=10,
- protocol="ip",
- ),
- dict(
- grant="deny",
- destination=dict(any=True),
- source=dict(any=True),
- sequence=20,
- protocol="udp")
- ]
- ),
- ]
- ),
- dict(afi="ipv6",
- acls=[
- dict(name="ACL1v6",
- aces=[
- dict(
- grant="permit",
- destination=dict(any=True),
- source=dict(any=True),
- sequence=10,
- protocol="sctp",
- )
- ])
- ])
- ], state="replaced"))
- self.execute_module(changed=False, commands=[])
-
- def test_nxos_acls_overridden(self):
- set_module_args(
- dict(config=[
- dict(afi="ipv4",
- acls=[
- dict(name="ACL2v4",
- aces=[
- dict(
- grant="permit",
- destination=dict(host="192.0.2.28"),
- source=dict(any=True),
- log=True,
- sequence=50,
- protocol="icmp",
- protocol_options=dict(
- icmp=dict(administratively_prohibited=True))
- ),
- dict(
- remark="Overridden ACL"
- )
- ]
- )
- ]
- )
- ], state="overridden"))
- commands = ['no ip access-list ACL1v4', 'no ipv6 access-list ACL1v6', 'ip access-list ACL2v4',
- '50 permit icmp any host 192.0.2.28 administratively-prohibited log', 'remark Overridden ACL']
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_acls_overridden_idempotent(self):
- set_module_args(
- dict(config=[
- dict(afi="ipv4",
- acls=[
- dict(name="ACL1v4",
- aces=[
- dict(
- grant="permit",
- destination=dict(any=True),
- source=dict(any=True),
- sequence=10,
- protocol="ip",
- ),
- dict(
- grant="deny",
- destination=dict(any=True),
- source=dict(any=True),
- sequence=20,
- protocol="udp")
- ]
- ),
- ]
- ),
- dict(afi="ipv6",
- acls=[
- dict(name="ACL1v6",
- aces=[
- dict(
- grant="permit",
- destination=dict(any=True),
- source=dict(any=True),
- sequence=10,
- protocol="sctp",
- )
- ])
- ])
- ], state="overridden"))
- self.execute_module(changed=False, commands=[])
-
- def test_nxos_acls_deletedafi(self):
- set_module_args(
- dict(config=[dict(afi="ipv4")], state="deleted"))
- commands = ['no ip access-list ACL1v4']
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_acls_deletedace(self):
- set_module_args(
- dict(config=[dict(afi="ipv6",
- acls=[
- dict(name="ACL1v6",
- aces=[
- dict(
- grant="permit",
- destination=dict(any=True),
- source=dict(any=True),
- sequence=10,
- protocol="sctp",
- )
- ])
- ])], state="deleted"))
- commands = ['ipv6 access-list ACL1v6', 'no 10 permit sctp any any']
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_acls_deletedall(self):
- set_module_args(dict(config=[], state='deleted'))
- commands = ['no ipv6 access-list ACL1v6', 'no ip access-list ACL1v4']
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_acls_rendered(self):
- set_module_args(
- dict(config=[
- dict(afi="ipv4",
- acls=[
- dict(name="ACL1v4",
- aces=[
- dict(
- grant="permit",
- destination=dict(any=True),
- source=dict(any=True),
- sequence=10,
- protocol="ip",
- ),
- dict(
- grant="deny",
- destination=dict(any=True),
- source=dict(any=True),
- sequence=20,
- protocol="udp")
- ]
- ),
- ]
- ),
- dict(afi="ipv6",
- acls=[
- dict(name="ACL1v6",
- aces=[
- dict(
- grant="permit",
- destination=dict(any=True),
- source=dict(any=True),
- sequence=10,
- protocol="sctp",
- )
- ])
- ])
- ], state="rendered"))
- commands = ['ip access-list ACL1v4', '10 permit ip any any', '20 deny udp any any',
- 'ipv6 access-list ACL1v6', '10 permit sctp any any']
- result = self.execute_module(changed=False)
- self.assertEqual(sorted(result['rendered']), sorted(
- commands), result['rendered'])
-
- def test_nxos_acls_parsed(self):
- set_module_args(dict(running_config='''\nip access-list ACL1v4\n 10 permit ip any any\n 20 deny udp any any dscp AF23 precedence critical''',
- state="parsed"))
- result = self.execute_module(changed=False)
- compare_list = [{'afi': 'ipv4', 'acls': [{'name': 'ACL1v4',
- 'aces': [{'grant': 'permit', 'sequence': 10, 'protocol': 'ip', 'source': {'any': True},
- 'destination': {'any': True}}, {'grant': 'deny', 'sequence': 20,
- 'protocol': 'udp', 'source': {'any': True},
- 'destination': {'any': True},
- 'dscp': 'AF23', 'precedence': 'critical'}]}]}]
- self.assertEqual(result['parsed'], compare_list, result['parsed'])
-
- def test_nxos_acls_gathered(self):
- set_module_args(dict(config=[], state="gathered"))
- result = self.execute_module(changed=False)
- compare_list = [{'acls': [{'aces': [{'destination': {'any': True}, 'sequence': 10, 'protocol': 'sctp', 'source': {'any': True}, 'grant': 'permit'}],
- 'name': 'ACL1v6'}], 'afi': 'ipv6'}, {'acls': [{'aces': [{'destination': {'any': True}, 'sequence': 10, 'protocol': 'ip',
- 'source': {'any': True}, 'grant': 'permit'},
- {'destination': {'any': True}, 'sequence': 20, 'protocol': 'udp',
- 'source': {'any': True}, 'grant': 'deny'}], 'name': 'ACL1v4'}],
- 'afi': 'ipv4'}]
- self.assertEqual(result['gathered'],
- compare_list, result['gathered'])
diff --git a/test/units/modules/network/nxos/test_nxos_banner.py b/test/units/modules/network/nxos/test_nxos_banner.py
deleted file mode 100644
index 326f9a3088..0000000000
--- a/test/units/modules/network/nxos/test_nxos_banner.py
+++ /dev/null
@@ -1,83 +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.nxos import nxos_banner
-from .nxos_module import TestNxosModule, set_module_args
-
-
-class TestNxosBannerModule(TestNxosModule):
-
- module = nxos_banner
-
- def setUp(self):
- super(TestNxosBannerModule, self).setUp()
- self.mock_run_commands = patch('ansible.modules.network.nxos.nxos_banner.run_commands')
- self.run_commands = self.mock_run_commands.start()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_banner.load_config')
- self.load_config = self.mock_load_config.start()
-
- def tearDown(self):
- super(TestNxosBannerModule, self).tearDown()
- self.mock_run_commands.stop()
- self.mock_load_config.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.load_config.return_value = dict(diff=None, session='session')
-
- def test_nxos_banner_exec_create(self):
- set_module_args(dict(banner='exec', text='test\nbanner\nstring'))
- commands = ['banner exec @\ntest\nbanner\nstring\n@']
- self.run_commands.return_value = commands
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_banner_exec_remove(self):
- set_module_args(dict(banner='exec', state='absent'))
- commands = ['no banner exec']
- self.run_commands.return_value = commands
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_banner_exec_fail_create(self):
- set_module_args(dict(banner='exec', text='test\nbanner\nstring'))
- commands = ['banner exec @\ntest\nbanner\nstring\n@']
- err_rsp = ['Invalid command']
- self.run_commands.return_value = err_rsp
- result = self.execute_module(failed=True, changed=True)
- self.assertEqual(result['msg'], 'banner: exec may not be supported on this platform. Possible values are : exec | motd')
-
- def test_nxos_banner_exec_fail_remove(self):
- set_module_args(dict(banner='exec', state='absent'))
- commands = ['no banner exec']
- err_rsp = ['Invalid command']
- self.run_commands.return_value = err_rsp
- result = self.execute_module(failed=True, changed=True)
- self.assertEqual(result['msg'], 'banner: exec may not be supported on this platform. Possible values are : exec | motd')
-
- def test_nxos_banner_motd_create(self):
- set_module_args(dict(banner='motd', text='test\nbanner\nstring'))
- commands = ['banner motd @\ntest\nbanner\nstring\n@']
- self.run_commands.return_value = commands
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_banner_motd_remove(self):
- set_module_args(dict(banner='motd', state='absent'))
- commands = ['no banner motd']
- self.run_commands.return_value = commands
- self.execute_module(changed=True, commands=commands)
diff --git a/test/units/modules/network/nxos/test_nxos_bfd_global.py b/test/units/modules/network/nxos/test_nxos_bfd_global.py
deleted file mode 100644
index 67891d0fc6..0000000000
--- a/test/units/modules/network/nxos/test_nxos_bfd_global.py
+++ /dev/null
@@ -1,284 +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/>.
-
-# 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.nxos import nxos_bfd_global
-from ansible.module_utils.network.nxos.nxos import NxosCmdRef
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-# TBD: These imports / import checks are only needed as a workaround for
-# shippable, which fails this test due to import yaml & import ordereddict.
-import pytest
-from ansible.module_utils.network.nxos.nxos import nxosCmdRef_import_check
-msg = nxosCmdRef_import_check()
-@pytest.mark.skipif(len(msg), reason=msg)
-class TestNxosBfdGlobalModule(TestNxosModule):
-
- module = nxos_bfd_global
-
- def setUp(self):
- super(TestNxosBfdGlobalModule, self).setUp()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_bfd_global.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_execute_show_command = patch('ansible.module_utils.network.nxos.nxos.NxosCmdRef.execute_show_command')
- self.execute_show_command = self.mock_execute_show_command.start()
-
- self.mock_get_platform_shortname = patch('ansible.module_utils.network.nxos.nxos.NxosCmdRef.get_platform_shortname')
- self.get_platform_shortname = self.mock_get_platform_shortname.start()
-
- def tearDown(self):
- super(TestNxosBfdGlobalModule, self).tearDown()
- self.mock_load_config.stop()
- self.execute_show_command.stop()
- self.get_platform_shortname.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.load_config.return_value = None
-
- def test_bfd_defaults_n9k(self):
- # feature bfd is enabled, no non-defaults are set.
- self.execute_show_command.return_value = "feature bfd"
- self.get_platform_shortname.return_value = 'N9K'
- set_module_args(dict(
- echo_interface='deleted',
- echo_rx_interval=50,
- interval={'tx': 50, 'min_rx': 50, 'multiplier': 3},
- slow_timer=2000,
- startup_timer=5,
- ipv4_echo_rx_interval=50,
- ipv4_interval={'tx': 50, 'min_rx': 50, 'multiplier': 3},
- ipv4_slow_timer=2000,
- ipv6_echo_rx_interval=50,
- ipv6_interval={'tx': 50, 'min_rx': 50, 'multiplier': 3},
- ipv6_slow_timer=2000
- ))
- self.execute_module(changed=False)
-
- def test_bfd_non_defaults_n9k(self):
- # feature bfd is enabled, apply all non-default values.
- # This testcase also tests reordering of echo_interface to make sure
- # it gets applied last.
- self.execute_show_command.return_value = "feature bfd"
- self.get_platform_shortname.return_value = 'N9K'
- set_module_args(dict(
- echo_interface='loopback1',
- echo_rx_interval=51,
- interval={'tx': 51, 'min_rx': 51, 'multiplier': 4},
- slow_timer=2001,
- startup_timer=6,
- ipv4_echo_rx_interval=51,
- ipv4_interval={'tx': 51, 'min_rx': 51, 'multiplier': 4},
- ipv4_slow_timer=2001,
- ipv6_echo_rx_interval=51,
- ipv6_interval={'tx': 51, 'min_rx': 51, 'multiplier': 4},
- ipv6_slow_timer=2001
- ))
- self.execute_module(changed=True, commands=[
- 'bfd interval 51 min_rx 51 multiplier 4',
- 'bfd ipv4 echo-rx-interval 51',
- 'bfd ipv4 interval 51 min_rx 51 multiplier 4',
- 'bfd ipv4 slow-timer 2001',
- 'bfd ipv6 echo-rx-interval 51',
- 'bfd ipv6 interval 51 min_rx 51 multiplier 4',
- 'bfd ipv6 slow-timer 2001',
- 'bfd slow-timer 2001',
- 'bfd startup-timer 6',
- 'bfd echo-interface loopback1',
- 'bfd echo-rx-interval 51'
- ])
-
- def test_bfd_defaults_n3k(self):
- # feature bfd is enabled, no non-defaults are set.
- self.execute_show_command.return_value = "feature bfd"
- self.get_platform_shortname.return_value = 'N3K'
- set_module_args(dict(
- echo_interface='deleted',
- echo_rx_interval=250,
- interval={'tx': 250, 'min_rx': 250, 'multiplier': 3},
- slow_timer=2000,
- startup_timer=5,
- ipv4_echo_rx_interval=250,
- ipv4_interval={'tx': 250, 'min_rx': 250, 'multiplier': 3},
- ipv4_slow_timer=2000,
- ipv6_echo_rx_interval=250,
- ipv6_interval={'tx': 250, 'min_rx': 250, 'multiplier': 3},
- ipv6_slow_timer=2000
- ))
- self.execute_module(changed=False)
-
- def test_bfd_defaults_n35(self):
- # feature bfd is enabled, no non-defaults are set.
- self.execute_show_command.return_value = "feature bfd"
- self.get_platform_shortname.return_value = 'N35'
- set_module_args(dict(
- echo_interface='deleted',
- echo_rx_interval=50,
- interval={'tx': 50, 'min_rx': 50, 'multiplier': 3},
- slow_timer=2000,
- startup_timer=5,
- ipv4_echo_rx_interval=50,
- ipv4_interval={'tx': 50, 'min_rx': 50, 'multiplier': 3},
- ipv4_slow_timer=2000,
- ))
- self.execute_module(changed=False)
-
- def test_bfd_defaults_n6k(self):
- # feature bfd is enabled, no non-defaults are set.
- self.execute_show_command.return_value = "feature bfd"
- self.get_platform_shortname.return_value = 'N6K'
- set_module_args(dict(
- echo_interface='deleted',
- interval={'tx': 50, 'min_rx': 50, 'multiplier': 3},
- slow_timer=2000,
- fabricpath_interval={'tx': 50, 'min_rx': 50, 'multiplier': 3},
- fabricpath_slow_timer=2000,
- fabricpath_vlan=1
- ))
- self.execute_module(changed=False)
-
- def test_bfd_defaults_n7k(self):
- # feature bfd is enabled, no non-defaults are set.
- self.execute_show_command.return_value = "feature bfd"
- self.get_platform_shortname.return_value = 'N7K'
- set_module_args(dict(
- echo_interface='deleted',
- echo_rx_interval=50,
- interval={'tx': 50, 'min_rx': 50, 'multiplier': 3},
- slow_timer=2000,
- ipv4_echo_rx_interval=50,
- ipv4_interval={'tx': 50, 'min_rx': 50, 'multiplier': 3},
- ipv4_slow_timer=2000,
- ipv6_echo_rx_interval=50,
- ipv6_interval={'tx': 50, 'min_rx': 50, 'multiplier': 3},
- ipv6_slow_timer=2000,
- fabricpath_interval={'tx': 50, 'min_rx': 50, 'multiplier': 3},
- fabricpath_slow_timer=2000,
- fabricpath_vlan=1
- ))
- self.execute_module(changed=False)
-
- def test_bfd_existing_n9k(self):
- module_name = self.module.__name__.rsplit('.', 1)[1]
- self.execute_show_command.return_value = load_fixture(module_name, 'N9K.cfg')
- self.get_platform_shortname.return_value = 'N9K'
- set_module_args(dict(
- echo_interface='deleted',
- echo_rx_interval=51,
- interval={'tx': 51, 'min_rx': 51, 'multiplier': 3},
- slow_timer=2000,
- startup_timer=5,
- ipv4_echo_rx_interval=50,
- ipv4_interval={'tx': 51, 'min_rx': 51, 'multiplier': 3},
- ipv4_slow_timer=2000,
- ipv6_echo_rx_interval=50,
- ipv6_interval={'tx': 51, 'min_rx': 51, 'multiplier': 3},
- ipv6_slow_timer=2000
- ))
- self.execute_module(changed=True, commands=[
- 'no bfd echo-interface loopback2',
- 'bfd echo-rx-interval 51',
- 'bfd interval 51 min_rx 51 multiplier 3',
- 'bfd slow-timer 2000',
- 'bfd startup-timer 5',
- 'bfd ipv4 echo-rx-interval 50',
- 'bfd ipv4 interval 51 min_rx 51 multiplier 3',
- 'bfd ipv4 slow-timer 2000',
- 'bfd ipv6 echo-rx-interval 50',
- 'bfd ipv6 interval 51 min_rx 51 multiplier 3',
- 'bfd ipv6 slow-timer 2000',
- ])
-
- def test_bfd_idempotence_n9k(self):
- module_name = self.module.__name__.rsplit('.', 1)[1]
- self.execute_show_command.return_value = load_fixture(module_name, 'N9K.cfg')
- self.get_platform_shortname.return_value = 'N9K'
- set_module_args(dict(
- echo_interface='loopback2',
- echo_rx_interval=56,
- interval={'tx': 51, 'min_rx': 52, 'multiplier': 4},
- slow_timer=2001,
- startup_timer=6,
- ipv4_echo_rx_interval=54,
- ipv4_interval={'tx': 54, 'min_rx': 54, 'multiplier': 4},
- ipv4_slow_timer=2004,
- ipv6_echo_rx_interval=56,
- ipv6_interval={'tx': 56, 'min_rx': 56, 'multiplier': 6},
- ipv6_slow_timer=2006
- ))
- self.execute_module(changed=False)
-
- def test_bfd_existing_n7k(self):
- module_name = self.module.__name__.rsplit('.', 1)[1]
- self.execute_show_command.return_value = load_fixture(module_name, 'N7K.cfg')
- self.get_platform_shortname.return_value = 'N7K'
- set_module_args(dict(
- echo_interface='deleted',
- echo_rx_interval=51,
- interval={'tx': 51, 'min_rx': 51, 'multiplier': 3},
- slow_timer=2002,
- ipv4_echo_rx_interval=51,
- ipv4_interval={'tx': 51, 'min_rx': 51, 'multiplier': 3},
- ipv4_slow_timer=2002,
- ipv6_echo_rx_interval=51,
- ipv6_interval={'tx': 51, 'min_rx': 51, 'multiplier': 3},
- ipv6_slow_timer=2002,
- fabricpath_interval={'tx': 51, 'min_rx': 51, 'multiplier': 3},
- fabricpath_slow_timer=2003,
- fabricpath_vlan=3,
- ))
- self.execute_module(changed=True, commands=[
- 'no bfd echo-interface loopback2',
- 'bfd echo-rx-interval 51',
- 'bfd interval 51 min_rx 51 multiplier 3',
- 'bfd slow-timer 2002',
- 'bfd ipv4 echo-rx-interval 51',
- 'bfd ipv4 interval 51 min_rx 51 multiplier 3',
- 'bfd ipv4 slow-timer 2002',
- 'bfd ipv6 echo-rx-interval 51',
- 'bfd ipv6 interval 51 min_rx 51 multiplier 3',
- 'bfd ipv6 slow-timer 2002',
- 'bfd fabricpath interval 51 min_rx 51 multiplier 3',
- 'bfd fabricpath slow-timer 2003',
- 'bfd fabricpath vlan 3',
- ])
-
- def test_bfd_idempotence_n7k(self):
- module_name = self.module.__name__.rsplit('.', 1)[1]
- self.execute_show_command.return_value = load_fixture(module_name, 'N7K.cfg')
- self.get_platform_shortname.return_value = 'N7K'
- set_module_args(dict(
- echo_interface='loopback2',
- echo_rx_interval=56,
- interval={'tx': 51, 'min_rx': 52, 'multiplier': 4},
- slow_timer=2001,
- ipv4_echo_rx_interval=54,
- ipv4_interval={'tx': 54, 'min_rx': 54, 'multiplier': 4},
- ipv4_slow_timer=2004,
- ipv6_echo_rx_interval=56,
- ipv6_interval={'tx': 56, 'min_rx': 56, 'multiplier': 6},
- ipv6_slow_timer=2006,
- fabricpath_interval={'tx': 58, 'min_rx': 58, 'multiplier': 8},
- fabricpath_slow_timer=2008,
- fabricpath_vlan=2,
- ))
- self.execute_module(changed=False)
diff --git a/test/units/modules/network/nxos/test_nxos_bfd_interfaces.py b/test/units/modules/network/nxos/test_nxos_bfd_interfaces.py
deleted file mode 100644
index 83630f2937..0000000000
--- a/test/units/modules/network/nxos/test_nxos_bfd_interfaces.py
+++ /dev/null
@@ -1,303 +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/>.
-
-# Make coding more python3-ish
-from __future__ import (absolute_import, division, print_function)
-__metaclass__ = type
-
-from textwrap import dedent
-from units.compat.mock import patch
-from units.modules.utils import AnsibleFailJson
-from ansible.modules.network.nxos import nxos_bfd_interfaces
-from ansible.module_utils.network.nxos.config.bfd_interfaces.bfd_interfaces import Bfd_interfaces
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-ignore_provider_arg = True
-
-
-class TestNxosBfdInterfacesModule(TestNxosModule):
-
- module = nxos_bfd_interfaces
-
- def setUp(self):
- super(TestNxosBfdInterfacesModule, self).setUp()
-
- self.mock_FACT_LEGACY_SUBSETS = patch('ansible.module_utils.network.nxos.facts.facts.FACT_LEGACY_SUBSETS')
- self.FACT_LEGACY_SUBSETS = self.mock_FACT_LEGACY_SUBSETS.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.nxos.config.bfd_interfaces.bfd_interfaces.Bfd_interfaces.edit_config')
- self.edit_config = self.mock_edit_config.start()
-
- def tearDown(self):
- super(TestNxosBfdInterfacesModule, self).tearDown()
- self.mock_FACT_LEGACY_SUBSETS.stop()
- self.mock_get_resource_connection_config.stop()
- self.mock_get_resource_connection_facts.stop()
- self.mock_edit_config.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.mock_FACT_LEGACY_SUBSETS.return_value = dict()
- self.get_resource_connection_config.return_value = None
- self.edit_config.return_value = None
-
- # ---------------------------
- # Bfd_interfaces Test Cases
- # ---------------------------
-
- # 'state' logic behaviors
- #
- # - 'merged' : Update existing device state with any differences in the play.
- # - 'deleted' : Reset existing device state to default values. Ignores any
- # play attrs other than 'name'. Scope is limited to interfaces
- # in the play.
- # - 'overridden': The play is the source of truth. Similar to replaced but the
- # scope includes all interfaces; ie. it will also reset state
- # on interfaces not found in the play.
- # - 'replaced' : Scope is limited to the interfaces in the play.
-
- SHOW_CMD = "show running-config | section '^interface|^feature bfd'"
-
- def test_1(self):
- # Setup: No BFD configs shown on device interfaces
- # NOTE: The bfd 'enable' state is the default and does not nvgen.
- existing = dedent('''\
- feature bfd
- interface Ethernet1/1
- interface Ethernet1/2
- interface Ethernet1/3
- ''')
- self.get_resource_connection_facts.return_value = {self.SHOW_CMD: existing}
- playbook = dict(config=[
- dict(
- name='Ethernet1/1',
- bfd='disable',
- echo='disable'),
- dict(
- name='Ethernet1/2',
- bfd='disable'),
- ])
- # Expected result commands for each 'state'
- merged = ['interface Ethernet1/1', 'no bfd', 'no bfd echo',
- 'interface Ethernet1/2', 'no bfd']
- deleted = []
- overridden = merged
- replaced = merged
-
- playbook['state'] = 'merged'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=merged)
-
- playbook['state'] = 'deleted'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=False, commands=deleted)
-
- playbook['state'] = 'overridden'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=overridden)
-
- playbook['state'] = 'replaced'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=replaced)
-
- def test_2(self):
- # Change existing BFD configs
- existing = dedent('''\
- feature bfd
- interface Ethernet1/1
- no bfd
- interface Ethernet1/2
- no bfd echo
- interface Ethernet1/3
- no bfd
- no bfd echo
- ''')
- self.get_resource_connection_facts.return_value = {self.SHOW_CMD: existing}
- playbook = dict(config=[
- dict(
- name='Ethernet1/1',
- bfd='enable',
- echo='disable'),
- dict(
- name='Ethernet1/2'),
- # Eth1/3 not present! Thus overridden should set Eth1/3 to defaults;
- # replaced should ignore Eth1/3.
- ])
- # Expected result commands for each 'state'
- merged = ['interface Ethernet1/1', 'bfd', 'no bfd echo']
- deleted = ['interface Ethernet1/1', 'bfd',
- 'interface Ethernet1/2', 'bfd echo']
- overridden = ['interface Ethernet1/3', 'bfd', 'bfd echo',
- 'interface Ethernet1/1', 'bfd', 'no bfd echo',
- 'interface Ethernet1/2', 'bfd echo']
- replaced = ['interface Ethernet1/1', 'bfd', 'no bfd echo',
- 'interface Ethernet1/2', 'bfd echo']
-
- playbook['state'] = 'merged'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=merged)
-
- playbook['state'] = 'deleted'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=deleted)
-
- playbook['state'] = 'overridden'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=overridden)
-
- playbook['state'] = 'replaced'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=replaced)
-
- def test_3(self):
- # Device has bfd configs, playbook has no values
- existing = dedent('''\
- feature bfd
- interface Ethernet1/1
- no bfd
- interface Ethernet1/2
- no bfd echo
- interface Ethernet1/3
- no bfd
- no bfd echo
- ''')
- self.get_resource_connection_facts.return_value = {self.SHOW_CMD: existing}
- playbook = dict(config=[
- dict(name='Ethernet1/1'),
- ])
- # Expected result commands for each 'state'
- merged = []
- deleted = ['interface Ethernet1/1', 'bfd']
- overridden = ['interface Ethernet1/1', 'bfd',
- 'interface Ethernet1/2', 'bfd echo',
- 'interface Ethernet1/3', 'bfd', 'bfd echo']
- replaced = ['interface Ethernet1/1', 'bfd']
-
- playbook['state'] = 'merged'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=False, commands=merged)
-
- playbook['state'] = 'deleted'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=deleted)
-
- playbook['state'] = 'overridden'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=overridden)
-
- playbook['state'] = 'replaced'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=replaced)
-
- def test_4(self):
- # Test with interface that doesn't exist yet
- existing = dedent('''\
- feature bfd
- interface Ethernet1/1
- no bfd
- ''')
- self.get_resource_connection_facts.return_value = {self.SHOW_CMD: existing}
- playbook = dict(config=[
- dict(
- name='Ethernet1/1.42',
- bfd='enable',
- echo='disable'),
- ])
- # Expected result commands for each 'state'
- merged = ['interface Ethernet1/1.42', 'bfd', 'no bfd echo']
- deleted = []
- overridden = ['interface Ethernet1/1.42', 'bfd', 'no bfd echo',
- 'interface Ethernet1/1', 'bfd']
- replaced = ['interface Ethernet1/1.42', 'bfd', 'no bfd echo']
-
- playbook['state'] = 'merged'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=merged)
-
- playbook['state'] = 'deleted'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=False, commands=deleted)
-
- playbook['state'] = 'overridden'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=overridden)
-
- playbook['state'] = 'replaced'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=replaced)
-
- def test_5(self):
- # idempotence
- existing = dedent('''\
- feature bfd
- interface Ethernet1/1
- no bfd
- no bfd echo
- interface Ethernet1/2
- ''')
- self.get_resource_connection_facts.return_value = {self.SHOW_CMD: existing}
- playbook = dict(config=[
- dict(
- name='Ethernet1/1',
- bfd='disable',
- echo='disable'),
- dict(
- name='Ethernet1/2',
- bfd='enable',
- echo='enable'),
- ])
- # Expected result commands for each 'state'
- merged = []
- deleted = ['interface Ethernet1/1', 'bfd', 'bfd echo']
- overridden = []
- replaced = []
-
- playbook['state'] = 'merged'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=False, commands=merged)
-
- playbook['state'] = 'deleted'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=deleted)
-
- playbook['state'] = 'overridden'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=False, commands=overridden)
-
- playbook['state'] = 'replaced'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=False, commands=replaced)
-
-
-def build_args(data, type, state=None, check_mode=None):
- if state is None:
- state = 'merged'
- if check_mode is None:
- check_mode = False
- args = {
- 'state': state,
- '_ansible_check_mode': check_mode,
- 'config': {
- type: data
- }
- }
- return args
diff --git a/test/units/modules/network/nxos/test_nxos_bgp.py b/test/units/modules/network/nxos/test_nxos_bgp.py
deleted file mode 100644
index cc3ae8c890..0000000000
--- a/test/units/modules/network/nxos/test_nxos_bgp.py
+++ /dev/null
@@ -1,134 +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.nxos import nxos_bgp
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosBgpModule(TestNxosModule):
-
- module = nxos_bgp
-
- def setUp(self):
- super(TestNxosBgpModule, self).setUp()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_bgp.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_get_config = patch('ansible.modules.network.nxos.nxos_bgp.get_config')
- self.get_config = self.mock_get_config.start()
-
- def tearDown(self):
- super(TestNxosBgpModule, self).tearDown()
- self.mock_load_config.stop()
- self.mock_get_config.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.get_config.return_value = load_fixture('nxos_bgp', 'config.cfg')
- self.load_config.return_value = []
-
- def test_nxos_bgp(self):
- set_module_args(dict(asn=65535, router_id='192.0.2.1'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['router bgp 65535', 'router-id 192.0.2.1'])
-
- def test_nxos_bgp_change_nothing(self):
- set_module_args(dict(asn=65535, router_id='192.168.1.1'))
- self.execute_module(changed=False)
-
- def test_nxos_bgp_wrong_asn(self):
- set_module_args(dict(asn=10, router_id='192.168.1.1'))
- result = self.execute_module(failed=True)
- self.assertEqual(result['msg'], 'Another BGP ASN already exists.')
-
- def test_nxos_bgp_remove(self):
- set_module_args(dict(asn=65535, state='absent'))
- self.execute_module(changed=True, commands=['no router bgp 65535'])
-
- def test_nxos_bgp_remove_vrf(self):
- set_module_args(dict(asn=65535, vrf='test2', state='absent'))
- self.execute_module(changed=True, commands=['router bgp 65535', 'no vrf test2'])
-
- def test_nxos_bgp_remove_nonexistant_vrf(self):
- set_module_args(dict(asn=65535, vrf='foo', state='absent'))
- self.execute_module(changed=False)
-
- def test_nxos_bgp_remove_wrong_asn(self):
- set_module_args(dict(asn=10, state='absent'))
- self.execute_module(changed=False)
-
- def test_nxos_bgp_vrf(self):
- set_module_args(dict(asn=65535, vrf='test', router_id='192.0.2.1'))
- result = self.execute_module(changed=True, commands=['router bgp 65535', 'vrf test', 'router-id 192.0.2.1'])
- self.assertEqual(result['warnings'], ["VRF test doesn't exist."])
-
- def test_nxos_bgp_global_param(self):
- set_module_args(dict(asn=65535, shutdown=True))
- self.execute_module(changed=True, commands=['router bgp 65535', 'shutdown'])
-
- def test_nxos_bgp_global_param_outside_default(self):
- set_module_args(dict(asn=65535, vrf='test', shutdown=True))
- result = self.execute_module(failed=True)
- self.assertEqual(result['msg'], 'Global params can be modified only under "default" VRF.')
-
- def test_nxos_bgp_default_value(self):
- set_module_args(dict(asn=65535, graceful_restart_timers_restart='default'))
- self.execute_module(
- changed=True,
- commands=['router bgp 65535', 'graceful-restart restart-time 120']
- )
-
-
-class TestNxosBgp32BitsAS(TestNxosModule):
-
- module = nxos_bgp
-
- def setUp(self):
- super(TestNxosBgp32BitsAS, self).setUp()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_bgp.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_get_config = patch('ansible.modules.network.nxos.nxos_bgp.get_config')
- self.get_config = self.mock_get_config.start()
-
- def tearDown(self):
- super(TestNxosBgp32BitsAS, self).tearDown()
- self.mock_load_config.stop()
- self.mock_get_config.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.get_config.return_value = load_fixture('nxos_bgp', 'config_32_bits_as.cfg')
- self.load_config.return_value = []
-
- def test_nxos_bgp_change_nothing(self):
- set_module_args(dict(asn='65535.65535', router_id='192.168.1.1'))
- self.execute_module(changed=False)
-
- def test_nxos_bgp_wrong_asn(self):
- set_module_args(dict(asn='65535.10', router_id='192.168.1.1'))
- result = self.execute_module(failed=True)
- self.assertEqual(result['msg'], 'Another BGP ASN already exists.')
-
- def test_nxos_bgp_remove(self):
- set_module_args(dict(asn='65535.65535', state='absent'))
- self.execute_module(changed=True, commands=['no router bgp 65535.65535'])
diff --git a/test/units/modules/network/nxos/test_nxos_bgp_af.py b/test/units/modules/network/nxos/test_nxos_bgp_af.py
deleted file mode 100644
index 452caef80f..0000000000
--- a/test/units/modules/network/nxos/test_nxos_bgp_af.py
+++ /dev/null
@@ -1,103 +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.nxos import nxos_bgp_af
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosBgpAfModule(TestNxosModule):
-
- module = nxos_bgp_af
-
- def setUp(self):
- super(TestNxosBgpAfModule, self).setUp()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_bgp_af.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_get_config = patch('ansible.modules.network.nxos.nxos_bgp_af.get_config')
- self.get_config = self.mock_get_config.start()
-
- def tearDown(self):
- super(TestNxosBgpAfModule, self).tearDown()
- self.mock_load_config.stop()
- self.mock_get_config.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.get_config.return_value = load_fixture('nxos_bgp', 'config.cfg')
- self.load_config.return_value = None
-
- def test_nxos_bgp_af(self):
- set_module_args(dict(asn=65535, afi='ipv4', safi='unicast'))
- self.execute_module(
- changed=True, sort=False,
- commands=['router bgp 65535', 'address-family ipv4 unicast']
- )
-
- def test_nxos_bgp_af_vrf(self):
- set_module_args(dict(asn=65535, vrf='test', afi='ipv4', safi='unicast'))
- self.execute_module(
- changed=True, sort=False,
- commands=['router bgp 65535', 'vrf test', 'address-family ipv4 unicast']
- )
-
- def test_nxos_bgp_af_vrf_exists(self):
- set_module_args(dict(asn=65535, vrf='test2', afi='ipv4', safi='unicast'))
- self.execute_module(changed=False, commands=[])
-
- def test_nxos_bgp_af_dampening_routemap(self):
- set_module_args(dict(asn=65535, afi='ipv4', safi='unicast',
- dampening_routemap='route-map-a'))
- self.execute_module(
- changed=True,
- commands=['router bgp 65535', 'address-family ipv4 unicast',
- 'dampening route-map route-map-a']
- )
-
- def test_nxos_bgp_af_dampening_manual(self):
- set_module_args(dict(asn=65535, afi='ipv4', safi='unicast',
- dampening_half_time=5, dampening_suppress_time=2000,
- dampening_reuse_time=1900, dampening_max_suppress_time=10))
- self.execute_module(
- changed=True,
- commands=['router bgp 65535', 'address-family ipv4 unicast',
- 'dampening 5 1900 2000 10']
- )
-
- def test_nxos_bgp_af_dampening_mix(self):
- set_module_args(dict(asn=65535, afi='ipv4', safi='unicast',
- dampening_routemap='route-map-a',
- dampening_half_time=5, dampening_suppress_time=2000,
- dampening_reuse_time=1900, dampening_max_suppress_time=10))
- result = self.execute_module(failed=True)
- self.assertEqual(result['msg'], 'parameters are mutually exclusive: dampening_routemap|dampening_half_time, '
- 'dampening_routemap|dampening_suppress_time, dampening_routemap|dampening_reuse_time, '
- 'dampening_routemap|dampening_max_suppress_time')
-
- def test_nxos_bgp_af_client(self):
- set_module_args(dict(asn=65535, afi='ipv4', safi='unicast',
- client_to_client=False))
- self.execute_module(
- changed=True,
- commands=['router bgp 65535', 'address-family ipv4 unicast',
- 'no client-to-client reflection']
- )
diff --git a/test/units/modules/network/nxos/test_nxos_bgp_neighbor.py b/test/units/modules/network/nxos/test_nxos_bgp_neighbor.py
deleted file mode 100644
index 564ef301e4..0000000000
--- a/test/units/modules/network/nxos/test_nxos_bgp_neighbor.py
+++ /dev/null
@@ -1,81 +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.nxos import nxos_bgp_neighbor
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosBgpNeighborModule(TestNxosModule):
-
- module = nxos_bgp_neighbor
-
- def setUp(self):
- super(TestNxosBgpNeighborModule, self).setUp()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_bgp_neighbor.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_get_config = patch('ansible.modules.network.nxos.nxos_bgp_neighbor.get_config')
- self.get_config = self.mock_get_config.start()
-
- def tearDown(self):
- super(TestNxosBgpNeighborModule, self).tearDown()
- self.mock_load_config.stop()
- self.mock_get_config.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.get_config.return_value = load_fixture('nxos_bgp', 'config.cfg')
- self.load_config.return_value = []
-
- def test_nxos_bgp_neighbor_bfd_1(self):
- # None (disable) -> enable
- set_module_args(dict(asn=65535, neighbor='1.1.1.1', bfd='enable'))
- self.execute_module(changed=True, commands=['router bgp 65535', 'neighbor 1.1.1.1', 'bfd'])
-
- # enable -> enable (idempotence)
- set_module_args(dict(asn=65535, neighbor='1.1.1.2', bfd='enable'))
- self.execute_module(changed=False)
-
- def test_nxos_bgp_neighbor_bfd_2(self):
- # enable -> None (disable)
- set_module_args(dict(asn=65535, neighbor='1.1.1.2', bfd='disable'))
- self.execute_module(changed=True, commands=['router bgp 65535', 'neighbor 1.1.1.2', 'no bfd'])
-
- # None (disable) -> disable (idempotence)
- set_module_args(dict(asn=65535, neighbor='1.1.1.1', bfd='disable'))
- self.execute_module(changed=False)
-
- def test_nxos_bgp_neighbor(self):
- set_module_args(dict(asn=65535, neighbor='192.0.2.3', description='some words'))
- self.execute_module(changed=True, commands=['router bgp 65535', 'neighbor 192.0.2.3', 'description some words'])
-
- def test_nxos_bgp_neighbor_absent(self):
- set_module_args(dict(asn=65535, neighbor='1.1.1.1', state='absent'))
- self.execute_module(changed=True, commands=['router bgp 65535', 'no neighbor 1.1.1.1'])
-
- def test_nxos_bgp_neighbor_remove_private_as(self):
- set_module_args(dict(asn=65535, neighbor='3.3.3.4', remove_private_as='all'))
- self.execute_module(changed=False, commands=[])
-
- def test_nxos_bgp_neighbor_remove_private_as_changed(self):
- set_module_args(dict(asn=65535, neighbor='3.3.3.4', remove_private_as='replace-as'))
- self.execute_module(changed=True, commands=['router bgp 65535', 'neighbor 3.3.3.4', 'remove-private-as replace-as'])
diff --git a/test/units/modules/network/nxos/test_nxos_bgp_neighbor_af.py b/test/units/modules/network/nxos/test_nxos_bgp_neighbor_af.py
deleted file mode 100644
index 78cb1e3307..0000000000
--- a/test/units/modules/network/nxos/test_nxos_bgp_neighbor_af.py
+++ /dev/null
@@ -1,108 +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.nxos import nxos_bgp_neighbor_af
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosBgpNeighborAfModule(TestNxosModule):
-
- module = nxos_bgp_neighbor_af
-
- def setUp(self):
- super(TestNxosBgpNeighborAfModule, self).setUp()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_bgp_neighbor_af.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_get_config = patch('ansible.modules.network.nxos.nxos_bgp_neighbor_af.get_config')
- self.get_config = self.mock_get_config.start()
-
- def tearDown(self):
- super(TestNxosBgpNeighborAfModule, self).tearDown()
- self.mock_load_config.stop()
- self.mock_get_config.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.get_config.return_value = load_fixture('nxos_bgp', 'config.cfg')
- self.load_config.return_value = []
-
- def test_nxos_bgp_neighbor_af(self):
- set_module_args(dict(asn=65535, neighbor='192.0.2.3', afi='ipv4',
- safi='unicast', route_reflector_client=True))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], [
- 'router bgp 65535', 'neighbor 192.0.2.3', 'address-family ipv4 unicast',
- 'route-reflector-client'
- ])
-
- def test_nxos_bgp_neighbor_af_exists(self):
- set_module_args(dict(asn=65535, neighbor='3.3.3.5', afi='ipv4', safi='unicast'))
- self.execute_module(changed=False, commands=[])
-
- def test_nxos_bgp_neighbor_af_absent(self):
- set_module_args(dict(asn=65535, neighbor='3.3.3.5', afi='ipv4', safi='unicast', state='absent'))
- self.execute_module(
- changed=True, sort=False,
- commands=['router bgp 65535', 'neighbor 3.3.3.5', 'no address-family ipv4 unicast']
- )
-
- def test_nxos_bgp_neighbor_af_advertise_map(self):
- set_module_args(dict(asn=65535, neighbor='3.3.3.5', afi='ipv4', safi='unicast',
- advertise_map_exist=['my_advertise_map', 'my_exist_map']))
- self.execute_module(
- changed=True, sort=False,
- commands=['router bgp 65535', 'neighbor 3.3.3.5', 'address-family ipv4 unicast', 'advertise-map my_advertise_map exist-map my_exist_map']
- )
-
- def test_nxos_bgp_neighbor_af_advertise_map_non_exist(self):
- set_module_args(dict(asn=65535, neighbor='3.3.3.5', afi='ipv4', safi='unicast',
- advertise_map_non_exist=['my_advertise_map', 'my_non_exist_map']))
- self.execute_module(
- changed=True, sort=False,
- commands=['router bgp 65535', 'neighbor 3.3.3.5', 'address-family ipv4 unicast', 'advertise-map my_advertise_map non-exist-map my_non_exist_map']
- )
-
- def test_nxos_bgp_neighbor_af_max_prefix_limit_default(self):
- set_module_args(dict(asn=65535, neighbor='3.3.3.5', afi='ipv4',
- safi='unicast', max_prefix_limit='default'))
- self.execute_module(
- changed=True, sort=False,
- commands=['router bgp 65535', 'neighbor 3.3.3.5', 'address-family ipv4 unicast', 'no maximum-prefix']
- )
-
- def test_nxos_bgp_neighbor_af_max_prefix(self):
- set_module_args(dict(asn=65535, neighbor='3.3.3.5', afi='ipv4',
- safi='unicast', max_prefix_threshold=20,
- max_prefix_limit=20))
- self.execute_module(
- changed=True, sort=False,
- commands=['router bgp 65535', 'neighbor 3.3.3.5', 'address-family ipv4 unicast', 'maximum-prefix 20 20']
- )
-
- def test_nxos_bgp_neighbor_af_disable_peer_as_check(self):
- set_module_args(dict(asn=65535, neighbor='3.3.3.5', afi='ipv4',
- safi='unicast', disable_peer_as_check=True))
- self.execute_module(
- changed=True,
- commands=['router bgp 65535', 'neighbor 3.3.3.5', 'address-family ipv4 unicast', 'disable-peer-as-check']
- )
diff --git a/test/units/modules/network/nxos/test_nxos_command.py b/test/units/modules/network/nxos/test_nxos_command.py
deleted file mode 100644
index a3c148212a..0000000000
--- a/test/units/modules/network/nxos/test_nxos_command.py
+++ /dev/null
@@ -1,106 +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.nxos import nxos_command
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosCommandModule(TestNxosModule):
-
- module = nxos_command
-
- def setUp(self):
- super(TestNxosCommandModule, self).setUp()
-
- self.mock_run_commands = patch('ansible.modules.network.nxos.nxos_command.run_commands')
- self.run_commands = self.mock_run_commands.start()
-
- def tearDown(self):
- super(TestNxosCommandModule, self).tearDown()
- self.mock_run_commands.stop()
-
- def load_fixtures(self, commands=None, device=''):
- 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 = '%s.txt' % str(command).replace(' ', '_')
- output.append(load_fixture('nxos_command', filename))
- return output
-
- self.run_commands.side_effect = load_from_file
-
- def test_nxos_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'))
-
- def test_nxos_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'))
-
- def test_nxos_command_wait_for(self):
- wait_for = 'result[0] contains "NX-OS"'
- set_module_args(dict(commands=['show version'], wait_for=wait_for))
- self.execute_module()
-
- def test_nxos_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_nxos_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_nxos_command_match_any(self):
- wait_for = ['result[0] contains "Cisco"',
- 'result[0] contains "test string"']
- set_module_args(dict(commands=['show version'], wait_for=wait_for, match='any'))
- self.execute_module()
-
- def test_nxos_command_match_all(self):
- wait_for = ['result[0] contains "Cisco"',
- 'result[0] contains "image file"']
- set_module_args(dict(commands=['show version'], wait_for=wait_for, match='all'))
- self.execute_module()
-
- def test_nxos_command_match_all_failure(self):
- wait_for = ['result[0] contains "Cisco"',
- '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)
diff --git a/test/units/modules/network/nxos/test_nxos_config.py b/test/units/modules/network/nxos/test_nxos_config.py
deleted file mode 100644
index 37d1f164e8..0000000000
--- a/test/units/modules/network/nxos/test_nxos_config.py
+++ /dev/null
@@ -1,224 +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.nxos import nxos_config
-from ansible.plugins.cliconf.nxos import Cliconf
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosConfigModule(TestNxosModule):
-
- module = nxos_config
-
- def setUp(self):
- super(TestNxosConfigModule, self).setUp()
-
- self.mock_get_config = patch('ansible.modules.network.nxos.nxos_config.get_config')
- self.get_config = self.mock_get_config.start()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_config.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_save_config = patch('ansible.modules.network.nxos.nxos_config.save_config')
- self.save_config = self.mock_save_config.start()
-
- self.mock_get_connection = patch('ansible.modules.network.nxos.nxos_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.nxos.nxos_config.run_commands')
- self.run_commands = self.mock_run_commands.start()
-
- self.cliconf_obj = Cliconf(MagicMock())
- self.running_config = load_fixture('nxos_config', 'config.cfg')
-
- def tearDown(self):
- super(TestNxosConfigModule, self).tearDown()
- self.mock_get_config.stop()
- self.mock_load_config.stop()
- self.mock_run_commands.stop()
- self.mock_get_connection.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.get_config.return_value = load_fixture('nxos_config', 'config.cfg')
- self.load_config.return_value = None
-
- def test_nxos_config_no_change(self):
- lines = ['hostname localhost']
- args = dict(lines=lines)
- self.conn.get_diff = MagicMock(return_value=self.cliconf_obj.get_diff('\n'.join(lines), self.running_config))
- set_module_args(args)
- result = self.execute_module()
-
- def test_nxos_config_src(self):
- src = load_fixture('nxos_config', 'candidate.cfg')
- args = dict(src=src)
- self.conn.get_diff = MagicMock(return_value=self.cliconf_obj.get_diff(src, self.running_config))
- set_module_args(args)
-
- result = self.execute_module(changed=True)
- config = ['hostname switch01', 'interface Ethernet1',
- 'description test interface', 'no shutdown', 'ip routing']
-
- self.assertEqual(sorted(config), sorted(result['commands']), result['commands'])
-
- def test_nxos_config_replace_src(self):
- set_module_args(dict(replace_src='bootflash:config', replace='config'))
- self.conn.get_diff = MagicMock(return_value=self.cliconf_obj.get_diff(self.running_config, self.running_config, diff_replace='config'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['config replace bootflash:config'])
-
- def test_nxos_config_lines(self):
- lines = ['hostname switch01', 'ip domain-name eng.ansible.com']
- args = dict(lines=lines)
- self.conn.get_diff = MagicMock(return_value=self.cliconf_obj.get_diff('\n'.join(lines), self.running_config))
- set_module_args(args)
-
- result = self.execute_module(changed=True)
- config = ['hostname switch01']
-
- self.assertEqual(sorted(config), sorted(result['commands']), result['commands'])
-
- def test_nxos_config_before(self):
- lines = ['hostname switch01', 'ip domain-name eng.ansible.com']
- args = dict(lines=lines,
- before=['before command'])
- self.conn.get_diff = MagicMock(return_value=self.cliconf_obj.get_diff('\n'.join(lines), self.running_config))
- set_module_args(args)
-
- result = self.execute_module(changed=True)
- config = ['before command', 'hostname switch01']
-
- self.assertEqual(sorted(config), sorted(result['commands']), result['commands'])
- self.assertEqual('before command', result['commands'][0])
-
- def test_nxos_config_after(self):
- lines = ['hostname switch01', 'ip domain-name eng.ansible.com']
- args = dict(lines=lines,
- after=['after command'])
-
- self.conn.get_diff = MagicMock(return_value=self.cliconf_obj.get_diff('\n'.join(lines), self.running_config))
- set_module_args(args)
-
- result = self.execute_module(changed=True)
- config = ['after command', 'hostname switch01']
-
- self.assertEqual(sorted(config), sorted(result['commands']), result['commands'])
- self.assertEqual('after command', result['commands'][-1])
-
- def test_nxos_config_parents(self):
- lines = ['ip address 1.2.3.4/5', 'no shutdown']
- parents = ['interface Ethernet10']
- args = dict(lines=lines, parents=parents)
- self.conn.get_diff = MagicMock(return_value=self.cliconf_obj.get_diff('\n'.join(parents + lines), self.running_config, path=parents))
- set_module_args(args)
-
- result = self.execute_module(changed=True)
- config = ['interface Ethernet10', 'ip address 1.2.3.4/5', 'no shutdown']
-
- self.assertEqual(config, result['commands'], result['commands'])
-
- def test_nxos_config_src_and_lines_fails(self):
- args = dict(src='foo', lines='foo')
- set_module_args(args)
- result = self.execute_module(failed=True)
-
- def test_nxos_config_src_and_parents_fails(self):
- args = dict(src='foo', parents='foo')
- set_module_args(args)
- result = self.execute_module(failed=True)
-
- def test_nxos_config_match_exact_requires_lines(self):
- args = dict(match='exact')
- set_module_args(args)
- result = self.execute_module(failed=True)
-
- def test_nxos_config_match_strict_requires_lines(self):
- args = dict(match='strict')
- set_module_args(args)
- result = self.execute_module(failed=True)
-
- def test_nxos_config_replace_block_requires_lines(self):
- args = dict(replace='block')
- set_module_args(args)
- result = self.execute_module(failed=True)
-
- def test_nxos_config_replace_config_requires_src(self):
- args = dict(replace='config')
- set_module_args(args)
- result = self.execute_module(failed=True)
-
- def test_nxos_config_backup_returns__backup__(self):
- args = dict(backup=True)
- set_module_args(args)
- result = self.execute_module()
- self.assertIn('__backup__', result)
-
- def test_nxos_config_save_always(self):
- args = dict(save_when='always')
- set_module_args(args)
- self.execute_module()
- self.assertEqual(self.save_config.call_count, 1)
- self.assertEqual(self.get_config.call_count, 0)
- self.assertEqual(self.load_config.call_count, 0)
-
- def test_nxos_config_save_changed_true(self):
- args = dict(save_when='changed', lines=['hostname foo', 'interface GigabitEthernet0/0', 'no ip address'])
- set_module_args(args)
- self.execute_module(changed=True)
- self.assertEqual(self.save_config.call_count, 1)
- self.assertEqual(self.get_config.call_count, 1)
- self.assertEqual(self.load_config.call_count, 1)
-
- def test_nxos_config_save_changed_false(self):
- args = dict(save_when='changed')
- set_module_args(args)
- self.execute_module()
- self.assertEqual(self.save_config.call_count, 0)
- self.assertEqual(self.get_config.call_count, 0)
- self.assertEqual(self.load_config.call_count, 0)
-
- def test_nxos_config_defaults_false(self):
- set_module_args(dict(lines=['hostname localhost'], defaults=False))
- result = self.execute_module(changed=True)
- self.assertEqual(self.get_config.call_count, 1)
- self.assertEqual(self.get_config.call_args[1], dict(flags=[]))
-
- def test_nxos_config_defaults_true(self):
- set_module_args(dict(lines=['hostname localhost'], defaults=True))
- result = self.execute_module(changed=True)
- self.assertEqual(self.get_config.call_count, 1)
- self.assertEqual(self.get_config.call_args[1], dict(flags=['all']))
-
- def test_nxos_config_defaults_false_backup_true(self):
- set_module_args(dict(lines=['hostname localhost'], defaults=False, backup=True))
- result = self.execute_module(changed=True)
- self.assertEqual(self.get_config.call_count, 1)
- self.assertEqual(self.get_config.call_args[1], dict(flags=[]))
-
- def test_nxos_config_defaults_true_backup_true(self):
- set_module_args(dict(lines=['hostname localhost'], defaults=True, backup=True))
- result = self.execute_module(changed=True)
- self.assertEqual(self.get_config.call_count, 1)
- self.assertEqual(self.get_config.call_args[1], dict(flags=['all']))
diff --git a/test/units/modules/network/nxos/test_nxos_evpn_global.py b/test/units/modules/network/nxos/test_nxos_evpn_global.py
deleted file mode 100644
index f83e242d20..0000000000
--- a/test/units/modules/network/nxos/test_nxos_evpn_global.py
+++ /dev/null
@@ -1,69 +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.nxos import nxos_evpn_global
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosEvpnGlobalModule(TestNxosModule):
-
- module = nxos_evpn_global
-
- def setUp(self):
- super(TestNxosEvpnGlobalModule, self).setUp()
- self.mock_get_config = patch('ansible.modules.network.nxos.nxos_evpn_global.get_config')
- self.get_config = self.mock_get_config.start()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_evpn_global.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_get_capabilities = patch('ansible.modules.network.nxos.nxos_evpn_global.get_capabilities')
- self.get_capabilities = self.mock_get_capabilities.start()
- self.get_capabilities.return_value = {'network_api': 'cliconf'}
-
- def tearDown(self):
- super(TestNxosEvpnGlobalModule, self).tearDown()
- self.mock_get_config.stop()
- self.mock_load_config.stop()
- self.mock_get_capabilities.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.load_config.return_value = None
-
- def start_configured(self, *args, **kwargs):
- self.get_config.return_value = load_fixture('nxos_evpn_global', 'configured.cfg')
- return self.execute_module(*args, **kwargs)
-
- def start_unconfigured(self, *args, **kwargs):
- self.get_config.return_value = load_fixture('nxos_evpn_global', 'unconfigured.cfg')
- return self.execute_module(*args, **kwargs)
-
- def test_nxos_evpn_global_enable(self):
- set_module_args(dict(nv_overlay_evpn=True))
- commands = ['nv overlay evpn']
- self.start_unconfigured(changed=True, commands=commands)
-
- def test_nxos_evpn_global_disable(self):
- set_module_args(dict(nv_overlay_evpn=False))
- commands = ['no nv overlay evpn']
- self.start_configured(changed=True, commands=commands)
diff --git a/test/units/modules/network/nxos/test_nxos_evpn_vni.py b/test/units/modules/network/nxos/test_nxos_evpn_vni.py
deleted file mode 100644
index 64e55e4410..0000000000
--- a/test/units/modules/network/nxos/test_nxos_evpn_vni.py
+++ /dev/null
@@ -1,67 +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.nxos import nxos_evpn_vni
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosEvpnVniModule(TestNxosModule):
-
- module = nxos_evpn_vni
-
- def setUp(self):
- super(TestNxosEvpnVniModule, self).setUp()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_evpn_vni.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_get_config = patch('ansible.modules.network.nxos.nxos_evpn_vni.get_config')
- self.get_config = self.mock_get_config.start()
-
- def tearDown(self):
- super(TestNxosEvpnVniModule, self).tearDown()
- self.mock_load_config.stop()
- self.mock_get_config.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.get_config.return_value = load_fixture('', 'nxos_evpn_vni_config.cfg')
- self.load_config.return_value = None
-
- def test_nxos_evpn_vni_present(self):
- set_module_args(dict(vni='6000',
- route_target_import='5000:10',
- state='present'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['evpn',
- 'vni 6000 l2',
- 'route-target import 5000:10',
- 'no route-target import auto'])
-
- def test_nxos_evpn_vni_absent_not_existing(self):
- set_module_args(dict(vni='12000', state='absent'))
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
-
- def test_nxos_evpn_vni_absent_existing(self):
- set_module_args(dict(vni='6000', state='absent'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['evpn', 'no vni 6000 l2'])
diff --git a/test/units/modules/network/nxos/test_nxos_feature.py b/test/units/modules/network/nxos/test_nxos_feature.py
deleted file mode 100644
index d0ca483410..0000000000
--- a/test/units/modules/network/nxos/test_nxos_feature.py
+++ /dev/null
@@ -1,77 +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.nxos import nxos_feature
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosFeatureModule(TestNxosModule):
-
- module = nxos_feature
-
- def setUp(self):
- super(TestNxosFeatureModule, self).setUp()
- self.mock_run_commands = patch('ansible.modules.network.nxos.nxos_feature.run_commands')
- self.run_commands = self.mock_run_commands.start()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_feature.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_get_capabilities = patch('ansible.modules.network.nxos.nxos_feature.get_capabilities')
- self.get_capabilities = self.mock_get_capabilities.start()
- self.get_capabilities.return_value = {'network_api': 'cliconf'}
-
- def tearDown(self):
- super(TestNxosFeatureModule, self).tearDown()
- self.mock_run_commands.stop()
- self.mock_load_config.stop()
- self.mock_get_capabilities.stop()
-
- def load_fixtures(self, commands=None, device=''):
- 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 = '%s.txt' % str(command).replace(' ', '_')
- output.append(load_fixture('nxos_feature', filename))
- return output
-
- self.run_commands.side_effect = load_from_file
- self.load_config.return_value = None
-
- def test_nxos_feature_enable(self):
- set_module_args(dict(feature='nve', state='enabled'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['terminal dont-ask', 'feature nv overlay'])
-
- def test_nxos_feature_disable(self):
- set_module_args(dict(feature='ospf', state='disabled'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['terminal dont-ask', 'no feature ospf'])
diff --git a/test/units/modules/network/nxos/test_nxos_hsrp.py b/test/units/modules/network/nxos/test_nxos_hsrp.py
deleted file mode 100644
index dc459ab9cd..0000000000
--- a/test/units/modules/network/nxos/test_nxos_hsrp.py
+++ /dev/null
@@ -1,66 +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.nxos import nxos_hsrp
-from .nxos_module import TestNxosModule, set_module_args
-
-
-class TestNxosHsrpModule(TestNxosModule):
-
- module = nxos_hsrp
-
- def setUp(self):
- super(TestNxosHsrpModule, self).setUp()
- self.mock_run_commands = patch('ansible.modules.network.nxos.nxos_hsrp.run_commands')
- self.run_commands = self.mock_run_commands.start()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_hsrp.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_get_capabilities = patch('ansible.modules.network.nxos.nxos_hsrp.get_capabilities')
- self.get_capabilities = self.mock_get_capabilities.start()
- self.get_capabilities.return_value = {'network_api': 'cliconf'}
-
- def tearDown(self):
- super(TestNxosHsrpModule, self).tearDown()
- self.mock_run_commands.stop()
- self.mock_load_config.stop()
- self.mock_get_capabilities.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.load_config.return_value = None
-
- def test_nxos_hsrp(self):
- set_module_args(dict(group='10',
- vip='192.0.2.2/8',
- priority='150',
- interface='Ethernet1/2',
- preempt='enabled',
- ))
- result = self.execute_module(changed=True)
- self.assertEqual(sorted(result['commands']), sorted(['config t',
- 'interface ethernet1/2',
- 'hsrp version 1',
- 'hsrp 10',
- 'priority 150',
- 'ip 192.0.2.2/8',
- 'preempt']))
diff --git a/test/units/modules/network/nxos/test_nxos_hsrp_interfaces.py b/test/units/modules/network/nxos/test_nxos_hsrp_interfaces.py
deleted file mode 100644
index 91225520f2..0000000000
--- a/test/units/modules/network/nxos/test_nxos_hsrp_interfaces.py
+++ /dev/null
@@ -1,293 +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/>.
-
-# Make coding more python3-ish
-from __future__ import (absolute_import, division, print_function)
-__metaclass__ = type
-
-from textwrap import dedent
-from units.compat.mock import patch
-from units.modules.utils import AnsibleFailJson
-from ansible.modules.network.nxos import nxos_hsrp_interfaces
-from ansible.module_utils.network.nxos.config.hsrp_interfaces.hsrp_interfaces import Hsrp_interfaces
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-ignore_provider_arg = True
-
-
-class TestNxosHsrpInterfacesModule(TestNxosModule):
-
- module = nxos_hsrp_interfaces
-
- def setUp(self):
- super(TestNxosHsrpInterfacesModule, self).setUp()
-
- self.mock_FACT_LEGACY_SUBSETS = patch('ansible.module_utils.network.nxos.facts.facts.FACT_LEGACY_SUBSETS')
- self.FACT_LEGACY_SUBSETS = self.mock_FACT_LEGACY_SUBSETS.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.nxos.config.hsrp_interfaces.hsrp_interfaces.Hsrp_interfaces.edit_config')
- self.edit_config = self.mock_edit_config.start()
-
- def tearDown(self):
- super(TestNxosHsrpInterfacesModule, self).tearDown()
- self.mock_FACT_LEGACY_SUBSETS.stop()
- self.mock_get_resource_connection_config.stop()
- self.mock_get_resource_connection_facts.stop()
- self.mock_edit_config.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.mock_FACT_LEGACY_SUBSETS.return_value = dict()
- self.get_resource_connection_config.return_value = None
- self.edit_config.return_value = None
-
- # ---------------------------
- # Hsrp_interfaces Test Cases
- # ---------------------------
-
- # 'state' logic behaviors
- #
- # - 'merged' : Update existing device state with any differences in the play.
- # - 'deleted' : Reset existing device state to default values. Ignores any
- # play attrs other than 'name'. Scope is limited to interfaces
- # in the play.
- # - 'overridden': The play is the source of truth. Similar to replaced but the
- # scope includes all interfaces; ie. it will also reset state
- # on interfaces not found in the play.
- # - 'replaced' : Scope is limited to the interfaces in the play.
-
- SHOW_CMD = 'show running-config | section ^interface'
-
- def test_1(self):
- # Setup: No HSRP BFD configs shown on device interfaces
- existing = dedent('''\
- interface Ethernet1/1
- interface Ethernet1/2
- interface Ethernet1/3
- ''')
- self.get_resource_connection_facts.return_value = {self.SHOW_CMD: existing}
- playbook = dict(config=[
- dict(
- name='Ethernet1/1',
- bfd='enable'),
- dict(
- name='Ethernet1/2',
- bfd='disable'),
- ])
- # Expected result commands for each 'state'
- merged = ['interface Ethernet1/1', 'hsrp bfd']
- deleted = []
- overridden = merged
- replaced = merged
-
- playbook['state'] = 'merged'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=merged)
-
- playbook['state'] = 'deleted'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=False, commands=deleted)
-
- playbook['state'] = 'overridden'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=overridden)
-
- playbook['state'] = 'replaced'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=replaced)
-
- def test_2(self):
- # Change existing HSRP configs
- existing = dedent('''\
- interface Ethernet1/1
- hsrp bfd
- interface Ethernet1/2
- hsrp bfd
- interface Ethernet1/3
- hsrp bfd
- ''')
- self.get_resource_connection_facts.return_value = {self.SHOW_CMD: existing}
- playbook = dict(config=[
- dict(
- name='Ethernet1/1',
- bfd='disable'),
- dict(name='Ethernet1/2'),
- # Eth1/3 not present! Thus overridden should set Eth1/3 to defaults;
- # replaced should ignore Eth1/3.
- ])
- # Expected result commands for each 'state'
- merged = ['interface Ethernet1/1', 'no hsrp bfd']
- deleted = ['interface Ethernet1/1', 'no hsrp bfd',
- 'interface Ethernet1/2', 'no hsrp bfd']
- overridden = ['interface Ethernet1/3', 'no hsrp bfd',
- 'interface Ethernet1/1', 'no hsrp bfd',
- 'interface Ethernet1/2', 'no hsrp bfd']
- replaced = ['interface Ethernet1/1', 'no hsrp bfd',
- 'interface Ethernet1/2', 'no hsrp bfd']
-
- playbook['state'] = 'merged'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=merged)
-
- playbook['state'] = 'deleted'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=deleted)
-
- playbook['state'] = 'overridden'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=overridden)
-
- playbook['state'] = 'replaced'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=replaced)
-
- def test_3(self):
- # Device has hsrp bfd configs, playbook has no values
- existing = dedent('''\
- interface Ethernet1/1
- hsrp bfd
- interface Ethernet1/2
- hsrp bfd
- interface Ethernet1/3
- hsrp bfd
- ''')
- self.get_resource_connection_facts.return_value = {self.SHOW_CMD: existing}
- playbook = dict(config=[
- dict(name='Ethernet1/1'),
- dict(name='Ethernet1/2'),
- ])
- # Expected result commands for each 'state'
- merged = []
- deleted = ['interface Ethernet1/1', 'no hsrp bfd',
- 'interface Ethernet1/2', 'no hsrp bfd']
- overridden = ['interface Ethernet1/3', 'no hsrp bfd',
- 'interface Ethernet1/1', 'no hsrp bfd',
- 'interface Ethernet1/2', 'no hsrp bfd']
- replaced = ['interface Ethernet1/1', 'no hsrp bfd',
- 'interface Ethernet1/2', 'no hsrp bfd']
-
- playbook['state'] = 'merged'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=False, commands=merged)
-
- playbook['state'] = 'deleted'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=deleted)
-
- playbook['state'] = 'overridden'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=overridden)
-
- playbook['state'] = 'replaced'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=replaced)
-
- def test_4(self):
- # Test with interface that doesn't exist yet
- existing = dedent('''\
- interface Ethernet1/1
- hsrp bfd
- interface Ethernet1/2
- hsrp bfd
- ''')
- self.get_resource_connection_facts.return_value = {self.SHOW_CMD: existing}
- playbook = dict(config=[
- dict(
- name='Ethernet1/1.42',
- bfd='enable'),
- ])
- # Expected result commands for each 'state'
- merged = ['interface Ethernet1/1.42', 'hsrp bfd']
- deleted = []
- overridden = ['interface Ethernet1/1.42', 'hsrp bfd',
- 'interface Ethernet1/1', 'no hsrp bfd',
- 'interface Ethernet1/2', 'no hsrp bfd']
- replaced = ['interface Ethernet1/1.42', 'hsrp bfd']
-
- playbook['state'] = 'merged'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=merged)
-
- playbook['state'] = 'deleted'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=False, commands=deleted)
-
- playbook['state'] = 'overridden'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=overridden)
-
- playbook['state'] = 'replaced'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=replaced)
-
- def test_5(self):
- # idempotence
- existing = dedent('''\
- interface Ethernet1/1
- hsrp bfd
- interface Ethernet1/2
- ''')
- self.get_resource_connection_facts.return_value = {self.SHOW_CMD: existing}
- playbook = dict(config=[
- dict(
- name='Ethernet1/1',
- bfd='enable'),
- dict(
- name='Ethernet1/2',
- bfd='disable'),
- ])
- # Expected result commands for each 'state'
- merged = []
- deleted = ['interface Ethernet1/1', 'no hsrp bfd']
- overridden = []
- replaced = []
-
- playbook['state'] = 'merged'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=False, commands=merged)
-
- playbook['state'] = 'deleted'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=deleted)
-
- playbook['state'] = 'overridden'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=False, commands=overridden)
-
- playbook['state'] = 'replaced'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=False, commands=replaced)
-
-
-def build_args(data, type, state=None, check_mode=None):
- if state is None:
- state = 'merged'
- if check_mode is None:
- check_mode = False
- args = {
- 'state': state,
- '_ansible_check_mode': check_mode,
- 'config': {
- type: data
- }
- }
- return args
diff --git a/test/units/modules/network/nxos/test_nxos_interface.py b/test/units/modules/network/nxos/test_nxos_interface.py
deleted file mode 100644
index f9a2fbc870..0000000000
--- a/test/units/modules/network/nxos/test_nxos_interface.py
+++ /dev/null
@@ -1,91 +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.nxos import _nxos_interface
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosInterfaceModule(TestNxosModule):
-
- module = _nxos_interface
-
- def setUp(self):
- super(TestNxosInterfaceModule, self).setUp()
- self.mock_run_commands = patch('ansible.modules.network.nxos._nxos_interface.run_commands')
- self.run_commands = self.mock_run_commands.start()
-
- self.mock_load_config = patch('ansible.modules.network.nxos._nxos_interface.load_config')
- self.load_config = self.mock_load_config.start()
-
- def tearDown(self):
- super(TestNxosInterfaceModule, self).tearDown()
- self.mock_run_commands.stop()
- self.mock_load_config.stop()
-
- def load_fixtures(self, commands=None, device=''):
- module_name = self.module.__name__.rsplit('.', 1)[1]
-
- def load_from_file(*args, **kwargs):
- module, commands = args
- output = list()
-
- for command in commands:
- if type(command) == dict:
- command = command['command']
- filename = str(command).split(' | ')[0].replace(' ', '_').replace('/', '_')
- print(filename)
- output.append(load_fixture(module_name, filename))
- return output
-
- self.load_config.return_value = None
- self.run_commands.side_effect = load_from_file
-
- def test_nxos_interface_up(self):
- set_module_args(dict(interface='loopback0'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['interface loopback0', 'no shutdown'])
-
- def test_nxos_interface_down(self):
- set_module_args(dict(interface='loopback0', admin_state='down'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['interface loopback0', 'shutdown'])
-
- def test_nxos_interface_delete(self):
- set_module_args(dict(interface='loopback0', state='absent'))
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
-
- def test_nxos_interface_type(self):
- set_module_args(dict(interface_type='loopback', state='absent'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['no interface loopback0'])
-
- def test_nxos_interface_mtu(self):
- set_module_args(dict(interface='Ethernet2/1', mode='layer2', mtu='1800'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['interface Ethernet2/1', 'switchport', 'mtu 1800',
- 'interface Ethernet2/1', 'no shutdown'])
-
- def test_nxos_interface_speed_idempotence(self):
- set_module_args(dict(interface='Ethernet2/1', speed='1000'))
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
diff --git a/test/units/modules/network/nxos/test_nxos_interface_ospf.py b/test/units/modules/network/nxos/test_nxos_interface_ospf.py
deleted file mode 100644
index d4156b43dd..0000000000
--- a/test/units/modules/network/nxos/test_nxos_interface_ospf.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.nxos import nxos_interface_ospf
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosInterfaceOspfModule(TestNxosModule):
-
- module = nxos_interface_ospf
-
- def setUp(self):
- super(TestNxosInterfaceOspfModule, self).setUp()
-
- self.mock_get_config = patch('ansible.modules.network.nxos.nxos_interface_ospf.get_config')
- self.get_config = self.mock_get_config.start()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_interface_ospf.load_config')
- self.load_config = self.mock_load_config.start()
-
- def tearDown(self):
- super(TestNxosInterfaceOspfModule, self).tearDown()
- self.mock_get_config.stop()
- self.mock_load_config.stop()
-
- def load_fixtures(self, commands=None, device=''):
- module_name = self.module.__name__.rsplit('.', 1)[1]
- self.get_config.return_value = load_fixture(module_name, 'config.cfg')
- self.load_config.return_value = None
-
- def test_nxos_interface_ospf(self):
- set_module_args(dict(interface='ethernet1/32', ospf=1, area=1))
- self.execute_module(changed=True, commands=['interface Ethernet1/32', 'ip router ospf 1 area 0.0.0.1'])
-
- def test_bfd_1(self):
- # default -> enable
- set_module_args(dict(interface='ethernet1/33', ospf=1, area=1, bfd='enable'))
- self.execute_module(changed=True, commands=['interface Ethernet1/33', 'ip router ospf 1 area 0.0.0.1', 'ip ospf bfd'])
-
- # default -> disable
- set_module_args(dict(interface='ethernet1/33', ospf=1, area=1, bfd='disable'))
- self.execute_module(changed=True, commands=['interface Ethernet1/33', 'ip router ospf 1 area 0.0.0.1', 'ip ospf bfd disable'])
-
- def test_bfd_2(self):
- # default -> default
- set_module_args(dict(interface='ethernet1/33.101', ospf=1, area=1, bfd='default'))
- self.execute_module(changed=False)
-
- # enable -> default
- set_module_args(dict(interface='ethernet1/36', ospf=1, area=1, bfd='default'))
- self.execute_module(changed=True, commands=['interface Ethernet1/36', 'no ip ospf bfd'])
-
- # disable -> default
- set_module_args(dict(interface='ethernet1/37', ospf=1, area=1, bfd='default'))
- self.execute_module(changed=True, commands=['interface Ethernet1/37', 'no ip ospf bfd'])
-
- def test_bfd_3(self):
- # enable -> idempotence
- set_module_args(dict(interface='ethernet1/36', ospf=1, area=1, bfd='enable'))
- self.execute_module(changed=False)
-
- # disable -> idempotence
- set_module_args(dict(interface='ethernet1/37', ospf=1, area=1, bfd='disable'))
- self.execute_module(changed=False)
-
- def test_bfd_4(self):
- # None -> absent
- set_module_args(dict(interface='ethernet1/33.101', ospf=1, area=1, state='absent'))
- self.execute_module(changed=True, commands=['interface Ethernet1/33.101', 'no ip router ospf 1 area 0.0.0.1'])
-
- # enable -> absent
- set_module_args(dict(interface='ethernet1/36', ospf=1, area=1, bfd='enable', state='absent'))
- self.execute_module(changed=True, commands=['interface Ethernet1/36', 'no ip router ospf 1 area 0.0.0.1', 'no ip ospf bfd'])
-
- # disable -> absent
- set_module_args(dict(interface='ethernet1/37', ospf=1, area=1, bfd='disable', state='absent'))
- self.execute_module(changed=True, commands=['interface Ethernet1/37', 'no ip router ospf 1 area 0.0.0.1', 'no ip ospf bfd'])
-
- def test_absent_1(self):
- # area only -> absent
- set_module_args(dict(interface='ethernet1/33.101', ospf=1, area=1, state='absent'))
- self.execute_module(changed=True, commands=['interface Ethernet1/33.101', 'no ip router ospf 1 area 0.0.0.1'])
-
- # None -> absent
- set_module_args(dict(interface='ethernet1/33', ospf=1, area=1, state='absent'))
- self.execute_module(changed=False)
-
- def test_loopback_interface_failed(self):
- set_module_args(dict(interface='loopback0', ospf=1, area=0, passive_interface=True))
- self.execute_module(failed=True, changed=False)
- set_module_args(dict(interface='loopback0', ospf=1, area=0, network='broadcast'))
- self.execute_module(failed=True, changed=False)
-
- def test_nxos_interface_ospf_passive(self):
- # default -> True
- set_module_args(dict(interface='ethernet1/33', ospf=1, area=1, passive_interface=True))
- self.execute_module(changed=True, commands=['interface Ethernet1/33',
- 'ip router ospf 1 area 0.0.0.1',
- 'ip ospf passive-interface'])
- # default -> False
- set_module_args(dict(interface='ethernet1/33', ospf=1, area=1, passive_interface=False))
- self.execute_module(changed=True, commands=['interface Ethernet1/33',
- 'ip router ospf 1 area 0.0.0.1',
- 'no ip ospf passive-interface'])
- # True -> False
- set_module_args(dict(interface='ethernet1/34', ospf=1, area=1, passive_interface=False))
- self.execute_module(changed=True, commands=['interface Ethernet1/34',
- 'no ip ospf passive-interface'])
- # True -> default (absent)
- set_module_args(dict(interface='ethernet1/34', ospf=1, area=1, state='absent'))
- self.execute_module(changed=True, commands=['interface Ethernet1/34',
- 'no ip router ospf 1 area 0.0.0.1',
- 'default ip ospf passive-interface'])
- # False -> True
- set_module_args(dict(interface='ethernet1/35', ospf=1, area=1, passive_interface=True))
- self.execute_module(changed=True, commands=['interface Ethernet1/35',
- 'ip ospf passive-interface'])
- # False -> default (absent)
- set_module_args(dict(interface='ethernet1/35', ospf=1, area=1, state='absent'))
- self.execute_module(changed=True, commands=['interface Ethernet1/35',
- 'no ip router ospf 1 area 0.0.0.1',
- 'default ip ospf passive-interface'])
diff --git a/test/units/modules/network/nxos/test_nxos_interfaces.py b/test/units/modules/network/nxos/test_nxos_interfaces.py
deleted file mode 100644
index 26467abfd6..0000000000
--- a/test/units/modules/network/nxos/test_nxos_interfaces.py
+++ /dev/null
@@ -1,461 +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/>.
-
-# Make coding more python3-ish
-from __future__ import (absolute_import, division, print_function)
-__metaclass__ = type
-
-from textwrap import dedent
-from units.compat.mock import patch
-from units.modules.utils import AnsibleFailJson
-from ansible.modules.network.nxos import nxos_interfaces
-from ansible.module_utils.network.nxos.config.interfaces.interfaces import Interfaces
-from ansible.module_utils.network.nxos.facts.interfaces.interfaces import InterfacesFacts
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-ignore_provider_arg = True
-
-
-class TestNxosInterfacesModule(TestNxosModule):
-
- module = nxos_interfaces
-
- def setUp(self):
- super(TestNxosInterfacesModule, self).setUp()
-
- self.mock_FACT_LEGACY_SUBSETS = patch('ansible.module_utils.network.nxos.facts.facts.FACT_LEGACY_SUBSETS')
- self.FACT_LEGACY_SUBSETS = self.mock_FACT_LEGACY_SUBSETS.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.nxos.config.interfaces.interfaces.Interfaces.edit_config')
- self.edit_config = self.mock_edit_config.start()
- self.mock__device_info = patch('ansible.module_utils.network.nxos.facts.interfaces.interfaces.InterfacesFacts._device_info')
- self._device_info = self.mock__device_info.start()
-
- def tearDown(self):
- super(TestNxosInterfacesModule, self).tearDown()
- self.mock_FACT_LEGACY_SUBSETS.stop()
- self.mock_get_resource_connection_config.stop()
- self.mock_get_resource_connection_facts.stop()
- self.mock_edit_config.stop()
- self.mock__device_info.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.mock_FACT_LEGACY_SUBSETS.return_value = dict()
- self.get_resource_connection_config.return_value = None
- self.edit_config.return_value = None
- if device == 'legacy':
- # call execute_module() with device='legacy' to use this codepath
- self._device_info.return_value = {'network_os_platform': 'N3K-Cxxx'}
- else:
- self._device_info.return_value = {'network_os_platform': 'N9K-Cxxx'}
-
- SHOW_RUN_SYSDEF = "show running-config all | incl 'system default switchport'"
- SHOW_RUN_INTF = 'show running-config | section ^interface'
-
- def test_1(self):
- # Overall general test for each state: merged, deleted, overridden, replaced
- sysdefs = dedent('''\
- !
- ! Interfaces default to L3 !!
- !
- no system default switchport
- no system default switchport shutdown
- ''')
- intf = dedent('''\
- interface mgmt0
- description do not manage mgmt0!
- interface Ethernet1/1
- description foo
- interface Ethernet1/2
- description bar
- speed 1000
- duplex full
- mtu 4096
- ip forward
- fabric forwarding mode anycast-gateway
- interface Ethernet1/3
- interface Ethernet1/4
- interface Ethernet1/5
- interface Ethernet1/6
- no shutdown
- interface loopback0
- description test-loopback
- ''')
- self.get_resource_connection_facts.return_value = {
- self.SHOW_RUN_SYSDEF: sysdefs,
- self.SHOW_RUN_INTF: intf
- }
- playbook = dict(config=[
- dict(name='Ethernet1/1', description='ansible', mode='layer3'),
- dict(name='Ethernet1/2', speed=10000, duplex='auto', mtu=1500,
- ip_forward=False, fabric_forwarding_anycast_gateway=False),
- dict(name='Ethernet1/3', description='ansible', mode='layer3'),
- dict(name='Ethernet1/3.101', description='test-sub-intf', enabled=False),
- dict(name='Ethernet1/4', mode='layer2'),
- dict(name='Ethernet1/5'),
- dict(name='loopback1', description='test-loopback')
- ])
- merged = [
- # Update existing device states with any differences in the playbook.
- 'interface Ethernet1/1', 'description ansible',
- 'interface Ethernet1/2', 'speed 10000', 'duplex auto', 'mtu 1500',
- 'no ip forward', 'no fabric forwarding mode anycast-gateway',
- 'interface Ethernet1/3', 'description ansible',
- 'interface Ethernet1/3.101', 'description test-sub-intf',
- 'interface Ethernet1/4', 'switchport',
- 'interface loopback1', 'description test-loopback'
- ]
- playbook['state'] = 'merged'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=merged)
-
- deleted = [
- # Reset existing device state to default values. Scope is limited to
- # objects in the play. Ignores any play attrs other than 'name'.
- 'interface Ethernet1/1', 'no description',
- 'interface Ethernet1/2', 'no description', 'no speed', 'no duplex', 'no mtu',
- 'no ip forward', 'no fabric forwarding mode anycast-gateway',
- ]
- playbook['state'] = 'deleted'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=deleted)
-
- replaced = [
- # Scope is limited to objects in the play. The play is the source of
- # truth for the objects that are explicitly listed.
- 'interface Ethernet1/1', 'description ansible',
- 'interface Ethernet1/2', 'no description',
- 'no ip forward', 'no fabric forwarding mode anycast-gateway',
- 'speed 10000', 'duplex auto', 'mtu 1500',
- 'interface Ethernet1/3', 'description ansible',
- 'interface Ethernet1/3.101', 'description test-sub-intf',
- 'interface Ethernet1/4', 'switchport',
- 'interface loopback1', 'description test-loopback'
- ]
- playbook['state'] = 'replaced'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=replaced)
-
- overridden = [
- # The play is the source of truth. Similar to replaced but the scope
- # includes all objects on the device; i.e. it will also reset state
- # on objects not found in the play.
- 'interface Ethernet1/1', 'description ansible',
- 'interface Ethernet1/2', 'no description',
- 'no ip forward', 'no fabric forwarding mode anycast-gateway',
- 'speed 10000', 'duplex auto', 'mtu 1500',
- 'interface Ethernet1/6', 'shutdown',
- 'interface loopback0', 'no description',
- 'interface Ethernet1/3', 'description ansible',
- 'interface Ethernet1/4', 'switchport',
- 'interface Ethernet1/3.101', 'description test-sub-intf',
- 'interface loopback1', 'description test-loopback'
- ]
- playbook['state'] = 'overridden'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=overridden)
-
- def test_2(self):
- # 'enabled'/shutdown behaviors are tricky:
- # - different default states for different interface types for different
- # platforms, based on 'system default switchport' settings
- # - virtual interfaces may not exist yet
- # - idempotence for interfaces with all default states
- sysdefs = dedent('''\
- !
- ! Interfaces default to L3 !!
- !
- no system default switchport
- no system default switchport shutdown
- ''')
- intf = dedent('''\
- interface mgmt0
- interface Ethernet1/1
- interface Ethernet1/2
- switchport
- shutdown
- interface Ethernet1/3
- switchport
- interface loopback1
- interface loopback2
- shutdown
- interface loopback3
- interface loopback8
- interface loopback9
- shutdown
- interface port-channel2
- interface port-channel3
- shutdown
- ''')
- self.get_resource_connection_facts.return_value = {
- self.SHOW_RUN_SYSDEF: sysdefs,
- self.SHOW_RUN_INTF: intf
- }
- playbook = dict(config=[
- # Set non-default states on existing objs
- dict(name='Ethernet1/1', mode='layer3', enabled=True),
- dict(name='loopback1', enabled=False),
- # Set default states on existing objs
- dict(name='Ethernet1/2', enabled=True),
- dict(name='loopback2', enabled=True),
- # Set explicit default state on existing objs (no chg)
- dict(name='Ethernet1/3', enabled=True),
- dict(name='loopback3', enabled=True),
- dict(name='port-channel3', enabled=True),
- # Set default state on non-existent objs; no state changes but need to create intf
- dict(name='loopback4', enabled=True),
- dict(name='port-channel4', enabled=True),
- dict(name='Ethernet1/4.101')
- ])
- # Testing with newer code version
- merged = [
- 'interface Ethernet1/1', 'no shutdown',
- 'interface loopback1', 'shutdown',
- 'interface Ethernet1/2', 'no shutdown',
- 'interface loopback2', 'no shutdown',
- 'interface port-channel3', 'no shutdown',
- 'interface loopback4',
- 'interface port-channel4',
- 'interface Ethernet1/4.101'
- ]
- playbook['state'] = 'merged'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=merged)
-
- deleted = [
- # e1/2 becomes L3 so enable default changes to false
- 'interface Ethernet1/2', 'no switchport',
- 'interface loopback2', 'no shutdown',
- 'interface Ethernet1/3', 'no switchport',
- 'interface port-channel3', 'no shutdown'
- ]
- playbook['state'] = 'deleted'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=deleted)
-
- replaced = [
- 'interface Ethernet1/1', 'no shutdown',
- 'interface loopback1', 'shutdown',
- 'interface Ethernet1/2', 'no switchport', 'no shutdown',
- 'interface loopback2', 'no shutdown',
- 'interface Ethernet1/3', 'no switchport', 'no shutdown',
- 'interface port-channel3', 'no shutdown',
- 'interface loopback4',
- 'interface port-channel4',
- 'interface Ethernet1/4.101'
- ]
- playbook['state'] = 'replaced'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=replaced)
-
- overridden = [
- 'interface Ethernet1/2', 'no switchport', 'no shutdown',
- 'interface Ethernet1/3', 'no switchport', 'no shutdown',
- 'interface loopback2', 'no shutdown',
- 'interface loopback9', 'no shutdown',
- 'interface port-channel3', 'no shutdown',
- 'interface Ethernet1/1', 'no shutdown',
- 'interface loopback1', 'shutdown',
- 'interface loopback4',
- 'interface port-channel4',
- 'interface Ethernet1/4.101'
- ]
- playbook['state'] = 'overridden'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=overridden)
-
- def test_3(self):
- # Testing 'enabled' with different 'system default' settings.
- # This is the same as test_2 with some minor changes.
- sysdefs = dedent('''\
- !
- ! Interfaces default to L2 !!
- !
- system default switchport
- system default switchport shutdown
- ''')
- intf = dedent('''\
- interface mgmt0
- interface Ethernet1/1
- interface Ethernet1/2
- no switchport
- no shutdown
- interface Ethernet1/3
- no switchport
- interface loopback1
- interface loopback2
- shutdown
- interface loopback3
- interface loopback8
- interface loopback9
- shutdown
- interface port-channel2
- interface port-channel3
- shutdown
- ''')
- self.get_resource_connection_facts.return_value = {
- self.SHOW_RUN_SYSDEF: sysdefs,
- self.SHOW_RUN_INTF: intf
- }
- playbook = dict(config=[
- # Set non-default states on existing objs
- dict(name='Ethernet1/1', mode='layer3', enabled=True),
- dict(name='loopback1', enabled=False),
- # Set default states on existing objs
- dict(name='Ethernet1/2', enabled=False),
- dict(name='loopback2', enabled=True),
- # Set explicit default state on existing objs (no chg)
- dict(name='Ethernet1/3', enabled=False),
- dict(name='loopback3', enabled=True),
- dict(name='port-channel3', enabled=True),
- # Set default state on non-existent objs; no state changes but need to create intf
- dict(name='loopback4', enabled=True),
- dict(name='port-channel4', enabled=True),
- dict(name='Ethernet1/4.101')
- ])
- merged = [
- 'interface Ethernet1/1', 'no switchport', 'no shutdown',
- 'interface loopback1', 'shutdown',
- 'interface Ethernet1/2', 'shutdown',
- 'interface loopback2', 'no shutdown',
- 'interface port-channel3', 'no shutdown',
- 'interface loopback4',
- 'interface port-channel4',
- 'interface Ethernet1/4.101'
- ]
- playbook['state'] = 'merged'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=merged)
-
- # Test with an older image version which has different defaults
- merged_legacy = [
- 'interface Ethernet1/1', 'no switchport',
- 'interface loopback1', 'shutdown',
- 'interface Ethernet1/2', 'shutdown',
- 'interface loopback2', 'no shutdown',
- 'interface Ethernet1/3', 'shutdown',
- 'interface port-channel3', 'no shutdown',
- 'interface loopback4',
- 'interface port-channel4',
- 'interface Ethernet1/4.101'
- ]
- self.execute_module(changed=True, commands=merged_legacy, device='legacy')
-
- deleted = [
- 'interface Ethernet1/2', 'switchport', 'shutdown',
- 'interface loopback2', 'no shutdown',
- 'interface Ethernet1/3', 'switchport',
- 'interface port-channel3', 'no shutdown'
- ]
- playbook['state'] = 'deleted'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=deleted)
-
- replaced = [
- 'interface Ethernet1/1', 'no switchport', 'no shutdown',
- 'interface loopback1', 'shutdown',
- 'interface Ethernet1/2', 'switchport', 'shutdown',
- 'interface loopback2', 'no shutdown',
- 'interface Ethernet1/3', 'switchport',
- 'interface port-channel3', 'no shutdown',
- 'interface loopback4',
- 'interface port-channel4',
- 'interface Ethernet1/4.101'
- ]
- playbook['state'] = 'replaced'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=replaced)
-
- overridden = [
- 'interface Ethernet1/2', 'switchport', 'shutdown',
- 'interface Ethernet1/3', 'switchport',
- 'interface loopback2', 'no shutdown',
- 'interface loopback9', 'no shutdown',
- 'interface port-channel3', 'no shutdown',
- 'interface Ethernet1/1', 'no switchport', 'no shutdown',
- 'interface loopback1', 'shutdown',
- 'interface loopback4',
- 'interface port-channel4',
- 'interface Ethernet1/4.101'
- ]
- playbook['state'] = 'overridden'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=overridden)
-
- def test_4(self):
- # Basic idempotence test
- sysdefs = dedent('''\
- !
- ! Interfaces default to L3 !!
- !
- no system default switchport
- no system default switchport shutdown
- ''')
- intf = dedent('''\
- interface Ethernet1/1
- interface Ethernet1/2
- switchport
- speed 1000
- shutdown
- ''')
- self.get_resource_connection_facts.return_value = {
- self.SHOW_RUN_SYSDEF: sysdefs,
- self.SHOW_RUN_INTF: intf
- }
- playbook = dict(config=[
- dict(name='Ethernet1/1', mode='layer3'),
- dict(name='Ethernet1/2', mode='layer2', enabled=False)
- ])
- merged = []
- playbook['state'] = 'merged'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=False, commands=merged)
-
- def test_5(self):
- # 'state: deleted' without 'config'; clean all objects.
- sysdefs = dedent('''\
- !
- ! Interfaces default to L3 !!
- !
- no system default switchport
- no system default switchport shutdown
- ''')
- intf = dedent('''\
- interface Ethernet1/1
- switchport
- interface Ethernet1/2
- speed 1000
- no shutdown
- ''')
- self.get_resource_connection_facts.return_value = {
- self.SHOW_RUN_SYSDEF: sysdefs,
- self.SHOW_RUN_INTF: intf
- }
- playbook = dict()
- deleted = [
- 'interface Ethernet1/1', 'no switchport',
- 'interface Ethernet1/2', 'no speed', 'shutdown'
- ]
- playbook['state'] = 'deleted'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=deleted)
diff --git a/test/units/modules/network/nxos/test_nxos_l3_interface.py b/test/units/modules/network/nxos/test_nxos_l3_interface.py
deleted file mode 100644
index 9e23f5702c..0000000000
--- a/test/units/modules/network/nxos/test_nxos_l3_interface.py
+++ /dev/null
@@ -1,226 +0,0 @@
-# Copyright: (c) 2019, Olivier Blin <olivier.oblin@gmail.com>
-# GNU General Public License v3.0+ (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-
-# 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.nxos import _nxos_l3_interface
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosL3InterfaceModule(TestNxosModule):
-
- module = _nxos_l3_interface
-
- def setUp(self):
- super(TestNxosL3InterfaceModule, self).setUp()
-
- self.mock_load_config = patch('ansible.modules.network.nxos._nxos_l3_interface.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_get_config = patch('ansible.modules.network.nxos._nxos_l3_interface.get_config')
- self.get_config = self.mock_get_config.start()
-
- def tearDown(self):
- super(TestNxosL3InterfaceModule, self).tearDown()
- self.mock_load_config.stop()
- self.mock_get_config.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.load_config.return_value = None
- self.get_config.return_value = load_fixture('nxos_l3_interface', self.mode)
-
- def test_nxos_l3_interface_unknonw_ethernet(self):
- self.mode = 'ethernet_noshut'
- set_module_args(dict(name='Ethernet1/2', ipv4='192.168.0.1/24'))
- result = self.execute_module(changed=False)
-
- # Add when missing
- def test_nxos_l3_interface_add_missing_ipv4(self):
- self.mode = 'ethernet_noshut'
- set_module_args(dict(name='Ethernet1/1', ipv4='192.168.0.1/24'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['interface Ethernet1/1', 'ip address 192.168.0.1/24', 'exit'])
-
- def test_nxos_l3_interface_add_missing_ipv4_on_e11(self):
- self.mode = 'ethernet_noshut'
- set_module_args(dict(name='et1/1', ipv4='192.168.0.1/24'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['interface Ethernet1/1', 'ip address 192.168.0.1/24', 'exit'])
-
- def test_nxos_l3_interface_add_missing_ipv6(self):
- self.mode = 'ethernet_noshut'
- set_module_args(dict(name='Ethernet1/1', ipv6='2001:db8::1/124'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['interface Ethernet1/1', 'ipv6 address 2001:db8::1/124', 'exit'])
-
- def test_nxos_l3_interface_add_missing_ipv4_and_ipv6(self):
- self.mode = 'ethernet_noshut'
- set_module_args(dict(name='Ethernet1/1', ipv4='192.168.0.1/24', ipv6='2001:db8::1/124'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['interface Ethernet1/1', 'ip address 192.168.0.1/24', 'ipv6 address 2001:db8::1/124', 'exit'])
-
- # Add when existing
- def test_nxos_l3_interface_add_existing_ipv4(self):
- self.mode = 'ethernet_noshut_ipv4_ipv6'
- set_module_args(dict(name='Ethernet1/1', ipv4='192.168.0.1/24'))
- result = self.execute_module()
-
- def test_nxos_l3_interface_add_existing_ipv4_on_e11(self):
- self.mode = 'ethernet_noshut_ipv4_ipv6'
- set_module_args(dict(name='et1/1', ipv4='192.168.0.1/24'))
- result = self.execute_module()
-
- def test_nxos_l3_interface_add_existing_ipv6(self):
- self.mode = 'ethernet_noshut_ipv4_ipv6'
- set_module_args(dict(name='Ethernet1/1', ipv6='2001:db8::1/124'))
- result = self.execute_module()
-
- def test_nxos_l3_interface_add_existing_ipv4_and_ipv6(self):
- self.mode = 'ethernet_noshut_ipv4_ipv6'
- set_module_args(dict(name='Ethernet1/1', ipv4='192.168.0.1/24', ipv6='2001:db8::1/124'))
- result = self.execute_module()
-
- def test_nxos_l3_interface_new_ipv4_and_ipv6(self):
- self.mode = 'ethernet_noshut_ipv4_ipv6'
- set_module_args(dict(name='Ethernet1/1', ipv4='192.168.0.2/24', ipv6='2001:db8::2/124'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['interface Ethernet1/1', 'ip address 192.168.0.2/24', 'ipv6 address 2001:db8::2/124', 'exit'])
-
- # Add when existing with multiple IPv6
- def test_nxos_l3_interface_multiple_ipv6_add_first(self):
- self.mode = 'ethernet_noshut_multiple_ipv6'
- set_module_args(dict(name='Ethernet1/1', ipv6='2001:db8::1/124'))
- result = self.execute_module()
-
- def test_nxos_l3_interface_multiple_ipv6_add_last(self):
- self.mode = 'ethernet_noshut_multiple_ipv6'
- set_module_args(dict(name='Ethernet1/1', ipv6='2001:db8:2::1/124'))
- result = self.execute_module()
-
- # Add aggregate
- def test_nxos_l3_interface_add_missing_with_empty_aggregate(self):
- self.mode = 'ethernet_noshut'
- set_module_args(dict(aggregate=[]))
- result = self.execute_module()
-
- def test_nxos_l3_interface_add_missing_with_aggregate(self):
- self.mode = 'ethernet_noshut'
- set_module_args(dict(aggregate=[
- dict(name='Ethernet1/1', ipv4='192.168.0.2/24', ipv6='2001:db8::2/124'),
- dict(name='Ethernet1/1', ipv6='2001:db8:1::2/124'),
- dict(name='Ethernet1/1', ipv6='2001:db8:2::2/124')]))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], [
- 'interface Ethernet1/1', 'ip address 192.168.0.2/24', 'ipv6 address 2001:db8::2/124', 'exit',
- 'interface Ethernet1/1', 'ipv6 address 2001:db8:1::2/124', 'exit',
- 'interface Ethernet1/1', 'ipv6 address 2001:db8:2::2/124', 'exit'])
-
- # Rem when missing
- def test_nxos_l3_interface_rem_missing_ipv4(self):
- self.mode = 'ethernet_noshut'
- set_module_args(dict(name='Ethernet1/1', ipv4='192.168.0.1/24', state='absent'))
- result = self.execute_module()
-
- def test_nxos_l3_interface_rem_missing_ipv4_on_e11(self):
- self.mode = 'ethernet_noshut'
- set_module_args(dict(name='et1/1', ipv4='192.168.0.1/24', state='absent'))
- result = self.execute_module()
-
- def test_nxos_l3_interface_rem_missing_ipv6(self):
- self.mode = 'ethernet_noshut'
- set_module_args(dict(name='Ethernet1/1', ipv6='2001:db8::1/124', state='absent'))
- result = self.execute_module()
-
- def test_nxos_l3_interface_rem_missing_ipv4_and_ipv6(self):
- self.mode = 'ethernet_noshut'
- set_module_args(dict(name='Ethernet1/1', ipv4='192.168.0.1/24', ipv6='2001:db8::1/124', state='absent'))
- result = self.execute_module()
-
- # Rem when existing
- def test_nxos_l3_interface_rem_existing_ipv4(self):
- self.mode = 'ethernet_noshut_ipv4_ipv6'
- set_module_args(dict(name='Ethernet1/1', ipv4='192.168.0.1/24', state='absent'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['interface Ethernet1/1', 'no ip address 192.168.0.1/24', 'exit'])
-
- def test_nxos_l3_interface_rem_existing_ipv4_on_e11(self):
- self.mode = 'ethernet_noshut_ipv4_ipv6'
- set_module_args(dict(name='et1/1', ipv4='192.168.0.1/24', state='absent'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['interface Ethernet1/1', 'no ip address 192.168.0.1/24', 'exit'])
-
- def test_nxos_l3_interface_rem_existing_ipv6(self):
- self.mode = 'ethernet_noshut_ipv4_ipv6'
- set_module_args(dict(name='Ethernet1/1', ipv6='2001:db8::1/124', state='absent'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['interface Ethernet1/1', 'no ipv6 address 2001:db8::1/124', 'exit'])
-
- def test_nxos_l3_interface_rem_existing_ipv4_and_ipv6(self):
- self.mode = 'ethernet_noshut_ipv4_ipv6'
- set_module_args(dict(name='Ethernet1/1', ipv4='192.168.0.1/24', ipv6='2001:db8::1/124', state='absent'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['interface Ethernet1/1', 'no ip address 192.168.0.1/24', 'no ipv6 address 2001:db8::1/124', 'exit'])
-
- # Rem when existing with multiple IPv6
- def test_nxos_l3_interface_multiple_ipv6_rem_first(self):
- self.mode = 'ethernet_noshut_multiple_ipv6'
- set_module_args(dict(name='Ethernet1/1', ipv6='2001:db8::1/124', state='absent'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['interface Ethernet1/1', 'no ipv6 address 2001:db8::1/124', 'exit'])
-
- def test_nxos_l3_interface_multiple_ipv6_rem_last(self):
- self.mode = 'ethernet_noshut_multiple_ipv6'
- set_module_args(dict(name='Ethernet1/1', ipv6='2001:db8:2::1/124', state='absent'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['interface Ethernet1/1', 'no ipv6 address 2001:db8:2::1/124', 'exit'])
-
- # Rem when missing with aggregate
- def test_nxos_l3_interface_rem_with_empty_aggregate(self):
- self.mode = 'ethernet_noshut_multiple_ipv6'
- set_module_args(dict(aggregate=[], state='absent'))
- result = self.execute_module()
-
- def test_nxos_l3_interface_rem_missing_with_aggregate(self):
- self.mode = 'ethernet_noshut_multiple_ipv6'
- set_module_args(dict(state='absent', aggregate=[
- dict(name='Ethernet1/1', ipv4='192.168.0.2/24', ipv6='2001:db8::2/124'),
- dict(name='Ethernet1/1', ipv6='2001:db8:1::2/124'),
- dict(name='Ethernet1/1', ipv6='2001:db8:2::2/124')]))
- result = self.execute_module()
-
- # Rem when existing with aggregate
- def test_nxos_l3_interface_rem_existing_with_aggregate(self):
- self.mode = 'ethernet_noshut_multiple_ipv6'
- set_module_args(dict(state='absent', aggregate=[
- dict(name='Ethernet1/1', ipv4='192.168.0.1/24', ipv6='2001:db8::1/124'),
- dict(name='Ethernet1/1', ipv6='2001:db8:1::1/124'),
- dict(name='Ethernet1/1', ipv6='2001:db8:2::1/124')]))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], [
- 'interface Ethernet1/1', 'no ip address 192.168.0.1/24', 'no ipv6 address 2001:db8::1/124', 'exit',
- 'interface Ethernet1/1', 'no ipv6 address 2001:db8:1::1/124', 'exit',
- 'interface Ethernet1/1', 'no ipv6 address 2001:db8:2::1/124', 'exit'])
-
- # Add itf only
- def test_nxos_l3_interface_add_on_itf_only(self):
- self.mode = 'ethernet_noshut'
- set_module_args(dict(name='Ethernet1/1'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['interface Ethernet1/1'])
-
- # Add unknown interface
- def test_nxos_l3_interface_add_on_unknown_itf(self):
- self.mode = 'ethernet_noshut'
- set_module_args(dict(name='Ethernet1/2', ipv4='192.168.0.1/24'))
- result = self.execute_module()
- self.assertEqual(result['warnings'], ['Unknown interface Ethernet1/2'])
-
- # Rem unknown interface
- def test_nxos_l3_interface_rem_on_unknown_itf(self):
- self.mode = 'ethernet_noshut'
- set_module_args(dict(name='Ethernet1/2', ipv4='192.168.0.1/24', state='absent'))
- result = self.execute_module()
- self.assertEqual(result['warnings'], ['Unknown interface Ethernet1/2'])
diff --git a/test/units/modules/network/nxos/test_nxos_l3_interfaces.py b/test/units/modules/network/nxos/test_nxos_l3_interfaces.py
deleted file mode 100644
index 79ca244ef4..0000000000
--- a/test/units/modules/network/nxos/test_nxos_l3_interfaces.py
+++ /dev/null
@@ -1,580 +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/>.
-
-# Make coding more python3-ish
-from __future__ import (absolute_import, division, print_function)
-__metaclass__ = type
-
-from textwrap import dedent
-from units.compat.mock import patch
-from units.modules.utils import AnsibleFailJson
-from ansible.modules.network.nxos import nxos_l3_interfaces
-from ansible.module_utils.network.nxos.config.l3_interfaces.l3_interfaces import L3_interfaces
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-ignore_provider_arg = True
-
-
-class TestNxosL3InterfacesModule(TestNxosModule):
-
- module = nxos_l3_interfaces
-
- def setUp(self):
- super(TestNxosL3InterfacesModule, self).setUp()
-
- self.mock_FACT_LEGACY_SUBSETS = patch('ansible.module_utils.network.nxos.facts.facts.FACT_LEGACY_SUBSETS')
- self.FACT_LEGACY_SUBSETS = self.mock_FACT_LEGACY_SUBSETS.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.nxos.config.l3_interfaces.l3_interfaces.L3_interfaces.edit_config')
- self.edit_config = self.mock_edit_config.start()
-
- self.mock_get_platform_type = patch('ansible.module_utils.network.nxos.config.l3_interfaces.l3_interfaces.L3_interfaces.get_platform_type')
- self.get_platform_type = self.mock_get_platform_type.start()
-
- def tearDown(self):
- super(TestNxosL3InterfacesModule, self).tearDown()
- self.mock_FACT_LEGACY_SUBSETS.stop()
- self.mock_get_resource_connection_config.stop()
- self.mock_get_resource_connection_facts.stop()
- self.mock_edit_config.stop()
- self.mock_get_platform_type.stop()
-
- def load_fixtures(self, commands=None, device='N9K'):
- self.mock_FACT_LEGACY_SUBSETS.return_value = dict()
- self.get_resource_connection_config.return_value = None
- self.edit_config.return_value = None
- self.get_platform_type.return_value = device
-
- # ---------------------------
- # L3_interfaces Test Cases
- # ---------------------------
-
- # 'state' logic behaviors
- #
- # - 'merged' : Update existing device state with any differences in the play.
- # - 'deleted' : Reset existing device state to default values. Ignores any
- # play attrs other than 'name'. Scope is limited to interfaces
- # in the play.
- # - 'overridden': The play is the source of truth. Similar to replaced but the
- # scope includes all interfaces; ie. it will also reset state
- # on interfaces not found in the play.
- # - 'replaced' : Scope is limited to the interfaces in the play.
-
- SHOW_CMD = 'show running-config | section ^interface'
-
- def test_1(self):
- # Verify raise when playbook specifies mgmt0
- self.get_resource_connection_facts.return_value = {self.SHOW_CMD: ''}
- playbook = dict(config=[dict(name='mgmt0')])
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module({'failed': True, 'msg': "The 'mgmt0' interface is not allowed to be managed by this module"})
-
- def test_2(self):
- # basic tests
- existing = dedent('''\
- interface mgmt0
- ip address 10.0.0.254/24
- interface Ethernet1/1
- ip address 10.1.1.1/24
- interface Ethernet1/2
- ip address 10.1.2.1/24
- interface Ethernet1/3
- ip address 10.1.3.1/24
- ''')
- self.get_resource_connection_facts.return_value = {self.SHOW_CMD: existing}
- playbook = dict(config=[
- dict(
- name='Ethernet1/1',
- ipv4=[{'address': '192.168.1.1/24'}]),
- dict(name='Ethernet1/2'),
- # Eth1/3 not present! Thus overridden should set Eth1/3 to defaults;
- # replaced should ignore Eth1/3.
- ])
- # Expected result commands for each 'state'
- merged = ['interface Ethernet1/1', 'ip address 192.168.1.1/24']
- deleted = ['interface Ethernet1/1', 'no ip address',
- 'interface Ethernet1/2', 'no ip address']
- replaced = ['interface Ethernet1/1', 'ip address 192.168.1.1/24',
- 'interface Ethernet1/2', 'no ip address']
- overridden = ['interface Ethernet1/1', 'ip address 192.168.1.1/24',
- 'interface Ethernet1/2', 'no ip address',
- 'interface Ethernet1/3', 'no ip address']
-
- playbook['state'] = 'merged'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=merged)
-
- playbook['state'] = 'deleted'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=deleted)
-
- playbook['state'] = 'replaced'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=replaced)
-
- playbook['state'] = 'overridden'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=overridden)
-
- def test_3(self):
- # encap testing
- existing = dedent('''\
- interface mgmt0
- ip address 10.0.0.254/24
- interface Ethernet1/1.41
- encapsulation dot1q 4100
- ip address 10.1.1.1/24
- interface Ethernet1/1.42
- encapsulation dot1q 42
- interface Ethernet1/1.44
- encapsulation dot1q 44
- interface Ethernet1/1.45
- encapsulation dot1q 45
- ip address 10.5.5.5/24
- ipv6 address 10::5/128
- ''')
- self.get_resource_connection_facts.return_value = {self.SHOW_CMD: existing}
- playbook = dict(config=[
- dict(name='Ethernet1/1.41', dot1q=41, ipv4=[{'address': '10.2.2.2/24'}]),
- dict(name='Ethernet1/1.42', dot1q=42),
- dict(name='Ethernet1/1.43', dot1q=43, ipv6=[{'address': '10::2/128'}]),
- dict(name='Ethernet1/1.44')
- ])
- # Expected result commands for each 'state'
- merged = [
- 'interface Ethernet1/1.41', 'encapsulation dot1q 41', 'ip address 10.2.2.2/24',
- 'interface Ethernet1/1.43', 'encapsulation dot1q 43', 'ipv6 address 10::2/128',
- ]
- deleted = [
- 'interface Ethernet1/1.41', 'no encapsulation dot1q', 'no ip address',
- 'interface Ethernet1/1.42', 'no encapsulation dot1q',
- 'interface Ethernet1/1.44', 'no encapsulation dot1q'
- ]
- replaced = [
- 'interface Ethernet1/1.41', 'encapsulation dot1q 41', 'ip address 10.2.2.2/24',
- # 42 no chg
- 'interface Ethernet1/1.43', 'encapsulation dot1q 43', 'ipv6 address 10::2/128',
- 'interface Ethernet1/1.44', 'no encapsulation dot1q'
- ]
- overridden = [
- 'interface Ethernet1/1.41', 'encapsulation dot1q 41', 'ip address 10.2.2.2/24',
- # 42 no chg
- 'interface Ethernet1/1.44', 'no encapsulation dot1q',
- 'interface Ethernet1/1.45', 'no encapsulation dot1q', 'no ip address', 'no ipv6 address',
- 'interface Ethernet1/1.43', 'encapsulation dot1q 43', 'ipv6 address 10::2/128'
- ]
-
- playbook['state'] = 'merged'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=merged)
-
- playbook['state'] = 'deleted'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=deleted)
-
- playbook['state'] = 'replaced'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=replaced)
-
- playbook['state'] = 'overridden'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=overridden)
-
- def test_4(self):
- # IPv4-centric testing
- existing = dedent('''\
- interface mgmt0
- ip address 10.0.0.254/24
- interface Ethernet1/1
- no ip redirects
- ip address 10.1.1.1/24 tag 11
- ip address 10.2.2.2/24 secondary tag 12
- ip address 10.3.3.3/24 secondary
- ip address 10.4.4.4/24 secondary tag 14
- ip address 10.5.5.5/24 secondary tag 15
- ip address 10.6.6.6/24 secondary tag 16
- interface Ethernet1/2
- ip address 10.12.12.12/24
- interface Ethernet1/3
- ip address 10.13.13.13/24
- interface Ethernet1/5
- no ip redirects
- ip address 10.15.15.15/24
- ip address 10.25.25.25/24 secondary
- ''')
- self.get_resource_connection_facts.return_value = {self.SHOW_CMD: existing}
- playbook = dict(config=[
- dict(name='Ethernet1/1',
- ipv4=[{'address': '10.1.1.1/24', 'secondary': True}, # prim->sec
- {'address': '10.2.2.2/24', 'secondary': True}, # rmv tag
- {'address': '10.3.3.3/24', 'tag': 3}, # become prim
- {'address': '10.4.4.4/24', 'secondary': True, 'tag': 14}, # no chg
- {'address': '10.5.5.5/24', 'secondary': True, 'tag': 55}, # chg tag
- {'address': '10.7.7.7/24', 'secondary': True, 'tag': 77}]), # new ip
- dict(name='Ethernet1/2'),
- dict(name='Ethernet1/4',
- ipv4=[{'address': '10.40.40.40/24'},
- {'address': '10.41.41.41/24', 'secondary': True}]),
- dict(name='Ethernet1/5'),
- ])
- # Expected result commands for each 'state'
- merged = [
- 'interface Ethernet1/1',
- 'no ip address 10.5.5.5/24 secondary',
- 'no ip address 10.2.2.2/24 secondary',
- 'no ip address 10.3.3.3/24 secondary',
- 'ip address 10.3.3.3/24 tag 3', # Changes primary
- 'ip address 10.1.1.1/24 secondary',
- 'ip address 10.2.2.2/24 secondary',
- 'ip address 10.7.7.7/24 secondary tag 77',
- 'ip address 10.5.5.5/24 secondary tag 55',
- 'interface Ethernet1/4',
- 'ip address 10.40.40.40/24',
- 'ip address 10.41.41.41/24 secondary'
- ]
- deleted = [
- 'interface Ethernet1/1', 'no ip address',
- 'interface Ethernet1/2', 'no ip address',
- 'interface Ethernet1/5', 'no ip address'
- ]
- replaced = [
- 'interface Ethernet1/1',
- 'no ip address 10.5.5.5/24 secondary',
- 'no ip address 10.2.2.2/24 secondary',
- 'no ip address 10.3.3.3/24 secondary',
- 'ip address 10.3.3.3/24 tag 3', # Changes primary
- 'ip address 10.1.1.1/24 secondary',
- 'ip address 10.2.2.2/24 secondary',
- 'ip address 10.7.7.7/24 secondary tag 77',
- 'ip address 10.5.5.5/24 secondary tag 55',
- 'interface Ethernet1/2',
- 'no ip address',
- 'interface Ethernet1/4',
- 'ip address 10.40.40.40/24',
- 'ip address 10.41.41.41/24 secondary',
- 'interface Ethernet1/5',
- 'no ip address'
- ]
- overridden = [
- 'interface Ethernet1/1',
- 'no ip address 10.6.6.6/24 secondary',
- 'no ip address 10.5.5.5/24 secondary',
- 'no ip address 10.2.2.2/24 secondary',
- 'no ip address 10.3.3.3/24 secondary',
- 'ip address 10.3.3.3/24 tag 3', # Changes primary
- 'ip address 10.1.1.1/24 secondary',
- 'ip address 10.2.2.2/24 secondary',
- 'ip address 10.7.7.7/24 secondary tag 77',
- 'ip address 10.5.5.5/24 secondary tag 55',
- 'interface Ethernet1/2',
- 'no ip address',
- 'interface Ethernet1/3',
- 'no ip address',
- 'interface Ethernet1/4',
- 'ip address 10.40.40.40/24',
- 'ip address 10.41.41.41/24 secondary',
- 'interface Ethernet1/5',
- 'no ip address',
- ]
-
- playbook['state'] = 'merged'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=merged)
-
- playbook['state'] = 'deleted'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=deleted)
-
- playbook['state'] = 'replaced'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=replaced)
-
- playbook['state'] = 'overridden'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=overridden)
-
- def test_5(self):
- # IPv6-centric testing
- existing = dedent('''\
- interface Ethernet1/1
- ipv6 address 10::1/128
- ipv6 address 10::2/128 tag 12
- ipv6 address 10::3/128 tag 13
- ipv6 address 10::4/128 tag 14
- interface Ethernet1/2
- ipv6 address 10::12/128
- interface Ethernet1/3
- ipv6 address 10::13/128
- ''')
- self.get_resource_connection_facts.return_value = {self.SHOW_CMD: existing}
- playbook = dict(config=[
- dict(name='Ethernet1/1',
- ipv6=[{'address': '10::1/128'}, # no chg
- {'address': '10::3/128'}, # tag rmv
- {'address': '10::4/128', 'tag': 44}, # tag chg
- {'address': '10::5/128'}, # new addr
- {'address': '10::6/128', 'tag': 66}]), # new addr+tag
- dict(name='Ethernet1/2'),
- ])
- # Expected result commands for each 'state'
- merged = [
- 'interface Ethernet1/1',
- 'ipv6 address 10::4/128 tag 44',
- 'ipv6 address 10::5/128',
- 'ipv6 address 10::6/128 tag 66',
- ]
- deleted = [
- 'interface Ethernet1/1', 'no ipv6 address',
- 'interface Ethernet1/2', 'no ipv6 address',
- ]
- replaced = [
- 'interface Ethernet1/1',
- 'no ipv6 address 10::3/128',
- 'no ipv6 address 10::2/128',
- 'ipv6 address 10::4/128 tag 44',
- 'ipv6 address 10::3/128',
- 'ipv6 address 10::5/128',
- 'ipv6 address 10::6/128 tag 66',
- 'interface Ethernet1/2',
- 'no ipv6 address 10::12/128'
- ]
- overridden = [
- 'interface Ethernet1/1',
- 'no ipv6 address 10::3/128',
- 'no ipv6 address 10::2/128',
- 'ipv6 address 10::4/128 tag 44',
- 'ipv6 address 10::3/128',
- 'ipv6 address 10::5/128',
- 'ipv6 address 10::6/128 tag 66',
- 'interface Ethernet1/2',
- 'no ipv6 address 10::12/128',
- 'interface Ethernet1/3',
- 'no ipv6 address'
- ]
-
- playbook['state'] = 'merged'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=merged)
-
- playbook['state'] = 'deleted'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=deleted)
- #
- playbook['state'] = 'replaced'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=replaced)
- #
- playbook['state'] = 'overridden'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=overridden)
-
- def test_6(self):
- # misc tests
- existing = dedent('''\
- interface Ethernet1/1
- ip address 10.1.1.1/24
- no ip redirects
- ip unreachables
- interface Ethernet1/2
- interface Ethernet1/3
- interface Ethernet1/4
- interface Ethernet1/5
- no ip redirects
- ''')
- self.get_resource_connection_facts.return_value = {self.SHOW_CMD: existing}
- playbook = dict(config=[
- dict(name='Ethernet1/1', redirects=True, unreachables=False,
- ipv4=[{'address': '192.168.1.1/24'}]),
- dict(name='Ethernet1/2'),
- dict(name='Ethernet1/3', redirects=True, unreachables=False), # defaults
- dict(name='Ethernet1/4', redirects=False, unreachables=True),
- ])
- merged = [
- 'interface Ethernet1/1',
- 'ip redirects',
- 'no ip unreachables',
- 'ip address 192.168.1.1/24',
- 'interface Ethernet1/4',
- 'no ip redirects',
- 'ip unreachables'
- ]
- deleted = [
- 'interface Ethernet1/1',
- 'ip redirects',
- 'no ip unreachables',
- 'no ip address'
- ]
- replaced = [
- 'interface Ethernet1/1',
- 'ip redirects',
- 'no ip unreachables',
- 'ip address 192.168.1.1/24',
- 'interface Ethernet1/4',
- 'no ip redirects',
- 'ip unreachables'
- ]
- overridden = [
- 'interface Ethernet1/1',
- 'ip redirects',
- 'no ip unreachables',
- 'ip address 192.168.1.1/24',
- 'interface Ethernet1/5',
- 'ip redirects',
- 'interface Ethernet1/4',
- 'no ip redirects',
- 'ip unreachables'
- ]
-
- playbook['state'] = 'merged'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=merged)
-
- playbook['state'] = 'deleted'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=deleted)
-
- playbook['state'] = 'replaced'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=replaced)
-
- playbook['state'] = 'overridden'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=overridden)
-
- def test_7(self):
- # idempotence
- existing = dedent('''\
- interface Ethernet1/1
- ip address 10.1.1.1/24
- ip address 10.2.2.2/24 secondary tag 2
- ip address 10.3.3.3/24 secondary tag 3
- ip address 10.4.4.4/24 secondary
- ipv6 address 10::1/128
- ipv6 address 10::2/128 tag 2
- no ip redirects
- ip unreachables
- interface Ethernet1/2
- ''')
- self.get_resource_connection_facts.return_value = {self.SHOW_CMD: existing}
- playbook = dict(config=[
- dict(name='Ethernet1/1', redirects=False, unreachables=True,
- ipv4=[{'address': '10.1.1.1/24'},
- {'address': '10.2.2.2/24', 'secondary': True, 'tag': 2},
- {'address': '10.3.3.3/24', 'secondary': True, 'tag': 3},
- {'address': '10.4.4.4/24', 'secondary': True}],
- ipv6=[{'address': '10::1/128'},
- {'address': '10::2/128', 'tag': 2}]),
- dict(name='Ethernet1/2')
- ])
- playbook['state'] = 'merged'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=False)
-
- playbook['state'] = 'replaced'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=False)
-
- playbook['state'] = 'overridden'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=False)
-
- # Modify output for deleted idempotence test
- existing = dedent('''\
- interface Ethernet1/1
- interface Ethernet1/2
- ''')
- self.get_resource_connection_facts.return_value = {self.SHOW_CMD: existing}
- playbook['state'] = 'deleted'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=False)
-
- def test_8(self):
- # no 'config' key in playbook
- existing = dedent('''\
- interface Ethernet1/1
- ip address 10.1.1.1/24
- ''')
- self.get_resource_connection_facts.return_value = {self.SHOW_CMD: existing}
- playbook = dict()
-
- for i in ['merged', 'replaced', 'overridden']:
- playbook['state'] = i
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(failed=True)
-
- deleted = [
- 'interface Ethernet1/1',
- 'no ip address',
- ]
- playbook['state'] = 'deleted'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=deleted)
-
- def test_9(self):
- # Platform specific checks
- # 'ip redirects' has platform-specific behaviors
- existing = dedent('''\
- interface mgmt0
- ip address 10.0.0.254/24
- interface Ethernet1/3
- ip address 10.13.13.13/24
- interface Ethernet1/5
- no ip redirects
- ip address 10.15.15.15/24
- ip address 10.25.25.25/24 secondary
- ''')
- self.get_resource_connection_facts.return_value = {self.SHOW_CMD: existing}
- playbook = dict(config=[
- dict(name='Ethernet1/3'),
- dict(name='Ethernet1/5'),
- ])
- # Expected result commands for each 'state'
- deleted = [
- 'interface Ethernet1/3', 'no ip address',
- 'interface Ethernet1/5', 'no ip address', 'ip redirects'
- ]
- replaced = [
- 'interface Ethernet1/3', 'no ip address',
- 'interface Ethernet1/5', 'no ip address', 'ip redirects'
- ]
- overridden = [
- 'interface Ethernet1/3', 'no ip address',
- 'interface Ethernet1/5', 'no ip address', 'ip redirects'
- ]
- platform = 'N3K'
-
- playbook['state'] = 'merged'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=False, device=platform)
-
- playbook['state'] = 'deleted'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=deleted, device=platform)
-
- playbook['state'] = 'replaced'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=replaced, device=platform)
-
- playbook['state'] = 'overridden'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=overridden, device=platform)
diff --git a/test/units/modules/network/nxos/test_nxos_lldp_interfaces.py b/test/units/modules/network/nxos/test_nxos_lldp_interfaces.py
deleted file mode 100644
index fb70ed2e1c..0000000000
--- a/test/units/modules/network/nxos/test_nxos_lldp_interfaces.py
+++ /dev/null
@@ -1,236 +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.modules.network.nxos import nxos_lldp_interfaces
-from units.compat.mock import patch, MagicMock
-from units.modules.utils import set_module_args
-from .nxos_module import TestNxosModule, load_fixture
-
-
-class TestNxosLldpInterfacesModule(TestNxosModule):
-
- module = nxos_lldp_interfaces
-
- def setUp(self):
- super(TestNxosLldpInterfacesModule, 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.nxos.config.lldp_interfaces.lldp_interfaces.Lldp_interfaces.edit_config'
- )
- self.edit_config = self.mock_edit_config.start()
-
- self.mock_execute_show_command = patch(
- 'ansible.module_utils.network.nxos.facts.lldp_interfaces.lldp_interfaces.Lldp_interfacesFacts.get_device_data'
- )
- self.execute_show_command = self.mock_execute_show_command.start()
-
- def tearDown(self):
- super(TestNxosLldpInterfacesModule, 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, device=''):
- def load_from_file(*args, **kwargs):
- output = '''interface Ethernet1/1
- lldp receive
- no lldp transmit
- interface Ethernet1/2
- no lldp receive
- lldp tlv-set vlan 12'''
- return output
-
- self.execute_show_command.side_effect = load_from_file
-
- def test_nxos_lldp_interfaces_merged(self):
- set_module_args(
- dict(config=[
- dict(name="Ethernet1/3",
- receive=False,
- tlv_set=dict(
- vlan=123
- )
- )
- ], state="merged"))
- commands = ['interface Ethernet1/3',
- 'no lldp receive',
- 'lldp tlv-set vlan 123']
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_lldp_interfaces_merged_idempotent(self):
- set_module_args(
- dict(config=[
- dict(name="Ethernet1/2",
- receive=False,
- tlv_set=dict(
- vlan=12
- )
- ),
- dict(name="Ethernet1/1",
- receive=True,
- transmit=False)
- ], state="merged"))
- self.execute_module(changed=False, commands=[])
-
- def test_nxos_lldp_interfaces_replaced(self):
- set_module_args(
- dict(config=[
- dict(name="Ethernet1/2",
- receive=True,
- transmit=False,
- tlv_set=dict(
- management_address='192.0.2.123'
- )
- )
- ], state="replaced"))
- commands = ['interface Ethernet1/2',
- 'lldp receive',
- 'no lldp transmit',
- 'no lldp tlv-set vlan 12',
- 'lldp tlv-set management-address 192.0.2.123']
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_lldp_interfaces_replaced_idempotent(self):
- set_module_args(
- dict(config=[
- dict(name="Ethernet1/2",
- receive=False,
- tlv_set=dict(
- vlan=12
- )
- ),
- dict(name="Ethernet1/1",
- receive=True,
- transmit=False)
- ], state="replaced"))
- self.execute_module(changed=False, commands=[])
-
- def test_nxos_lldp_interfaces_overridden(self):
- set_module_args(
- dict(config=[
- dict(name="Ethernet1/4",
- receive=True,
- transmit=False
- )
- ], state="overridden"))
- commands = ['interface Ethernet1/4',
- 'lldp receive',
- 'no lldp transmit',
- 'interface Ethernet1/1',
- 'lldp receive',
- 'lldp transmit',
- 'interface Ethernet1/2',
- 'lldp receive',
- 'no lldp tlv-set vlan 12']
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_lldp_interfaces_overridden_idempotent(self):
- set_module_args(
- dict(config=[
- dict(name="Ethernet1/2",
- receive=False,
- tlv_set=dict(
- vlan=12
- )
- ),
- dict(name="Ethernet1/1",
- receive=True,
- transmit=False)
- ], state="overridden"))
- self.execute_module(changed=False, commands=[])
-
- def test_nxos_lldp_interfaces_deleted_intf(self):
- set_module_args(
- dict(config=[
- dict(name="Ethernet1/2")
- ], state="deleted"))
- commands = ['interface Ethernet1/2',
- 'lldp receive',
- 'no lldp tlv-set vlan 12']
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_lldp_interfaces_deleted_all(self):
- set_module_args(
- dict(state="deleted"))
- commands = ['interface Ethernet1/2',
- 'lldp receive',
- 'no lldp tlv-set vlan 12',
- 'interface Ethernet1/1',
- 'lldp receive',
- 'lldp transmit']
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_lldp_interfaces_rendered(self):
- set_module_args(
- dict(config=[
- dict(name="Ethernet1/2",
- receive=False,
- tlv_set=dict(
- vlan=12
- )
- ),
- dict(name="Ethernet1/1",
- receive=True,
- transmit=False)
- ], state="rendered"))
- commands = ['interface Ethernet1/1',
- 'lldp receive',
- 'no lldp transmit',
- 'interface Ethernet1/2',
- 'no lldp receive',
- 'lldp tlv-set vlan 12']
- result = self.execute_module(changed=False)
- self.assertEqual(sorted(result['rendered']), sorted(
- commands), result['rendered'])
-
- def test_nxos_lldp_interfaces_parsed(self):
- set_module_args(dict(running_config='''interface Ethernet1/1
- lldp receive
- no lldp transmit
- interface Ethernet1/2
- no lldp receive
- lldp tlv-set vlan 12''', state="parsed"))
- result = self.execute_module(changed=False)
- compare_list = [{'name': 'Ethernet1/1', 'receive': True, 'transmit': False},
- {'name': 'Ethernet1/2', 'receive': False, 'tlv_set': {
- 'vlan': 12
- }}]
- self.assertEqual(result['parsed'],
- compare_list, result['parsed'])
-
- def test_nxos_lldp_interfaces_gathered(self):
- set_module_args(dict(state="gathered"))
- result = self.execute_module(changed=False)
- compare_list = [{'name': 'Ethernet1/1', 'receive': True, 'transmit': False},
- {'name': 'Ethernet1/2', 'receive': False, 'tlv_set': {
- 'vlan': 12
- }}]
- self.assertEqual(result['gathered'],
- compare_list, result['gathered'])
diff --git a/test/units/modules/network/nxos/test_nxos_nxapi.py b/test/units/modules/network/nxos/test_nxos_nxapi.py
deleted file mode 100644
index c0eae1a341..0000000000
--- a/test/units/modules/network/nxos/test_nxos_nxapi.py
+++ /dev/null
@@ -1,74 +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.nxos import nxos_nxapi
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosNxapiModule(TestNxosModule):
-
- module = nxos_nxapi
-
- def setUp(self):
- super(TestNxosNxapiModule, self).setUp()
-
- self.mock_run_commands = patch('ansible.modules.network.nxos.nxos_nxapi.run_commands')
- self.run_commands = self.mock_run_commands.start()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_nxapi.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_get_capabilities = patch('ansible.modules.network.nxos.nxos_nxapi.get_capabilities')
- self.get_capabilities = self.mock_get_capabilities.start()
- self.get_capabilities.return_value = {'device_info': {'network_os_platform': 'N7K-C7018', 'network_os_version': '8.3(1)'}, 'network_api': 'cliconf'}
-
- def tearDown(self):
- super(TestNxosNxapiModule, self).tearDown()
- self.mock_run_commands.stop()
- self.mock_load_config.stop()
- self.mock_get_capabilities.stop()
-
- def load_fixtures(self, commands=None, device=''):
- def load_from_file(*args, **kwargs):
- module, commands = args
- module_name = self.module.__name__.rsplit('.', 1)[1]
-
- output = list()
- for command in commands:
- filename = str(command).split(' | ')[0].replace(' ', '_')
- output.append(load_fixture(module_name, filename, device))
- return output
-
- self.run_commands.side_effect = load_from_file
- self.load_config.return_value = None
-
- def test_nxos_nxapi_no_change(self):
- set_module_args(dict(http=True, https=False, http_port=80, https_port=443, sandbox=False))
- self.execute_module_devices(changed=False, commands=[])
-
- def test_nxos_nxapi_disable(self):
- set_module_args(dict(state='absent'))
- self.execute_module_devices(changed=True, commands=['no feature nxapi'])
-
- def test_nxos_nxapi_no_http(self):
- set_module_args(dict(https=True, http=False, https_port=8443))
- self.execute_module_devices(changed=True, commands=['no nxapi http', 'nxapi https port 8443'])
diff --git a/test/units/modules/network/nxos/test_nxos_ospf.py b/test/units/modules/network/nxos/test_nxos_ospf.py
deleted file mode 100644
index 6f5cb3df82..0000000000
--- a/test/units/modules/network/nxos/test_nxos_ospf.py
+++ /dev/null
@@ -1,56 +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.nxos import nxos_ospf
-from .nxos_module import TestNxosModule, set_module_args
-
-
-class TestNxosOspfModule(TestNxosModule):
-
- module = nxos_ospf
-
- def setUp(self):
- super(TestNxosOspfModule, self).setUp()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_ospf.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_get_config = patch('ansible.modules.network.nxos.nxos_ospf.get_config')
- self.get_config = self.mock_get_config.start()
-
- def tearDown(self):
- super(TestNxosOspfModule, self).tearDown()
- self.mock_load_config.stop()
- self.mock_get_config.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.load_config.return_value = None
-
- def test_nxos_ospf_present(self):
- set_module_args(dict(ospf=1, state='present'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['router ospf 1'])
-
- def test_nxos_ospf_absent(self):
- set_module_args(dict(ospf=1, state='absent'))
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
diff --git a/test/units/modules/network/nxos/test_nxos_ospf_vrf.py b/test/units/modules/network/nxos/test_nxos_ospf_vrf.py
deleted file mode 100644
index 165d127437..0000000000
--- a/test/units/modules/network/nxos/test_nxos_ospf_vrf.py
+++ /dev/null
@@ -1,128 +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.nxos import nxos_ospf_vrf
-from .nxos_module import TestNxosModule, set_module_args
-
-
-class TestNxosOspfVrfModule(TestNxosModule):
-
- module = nxos_ospf_vrf
-
- def setUp(self):
- super(TestNxosOspfVrfModule, self).setUp()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_ospf_vrf.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_get_config = patch('ansible.modules.network.nxos.nxos_ospf_vrf.get_config')
- self.get_config = self.mock_get_config.start()
-
- def tearDown(self):
- super(TestNxosOspfVrfModule, self).tearDown()
- self.mock_load_config.stop()
- self.mock_get_config.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.load_config.return_value = None
-
- def test_nxos_ospf_vrf_present(self):
- set_module_args(dict(ospf=1,
- vrf='test',
- timer_throttle_spf_start=50,
- timer_throttle_spf_hold=1000,
- timer_throttle_spf_max=2000,
- timer_throttle_lsa_start=60,
- timer_throttle_lsa_hold=1100,
- timer_throttle_lsa_max=3000,
- bfd='enable',
- state='present'))
- result = self.execute_module(changed=True)
- self.assertEqual(sorted(result['commands']),
- sorted(['router ospf 1',
- 'vrf test',
- 'timers throttle lsa 60 1100 3000',
- 'timers throttle spf 50 1000 2000',
- 'bfd',
- ]))
-
- def test_nxos_ospf_vrf_absent(self):
- set_module_args(dict(ospf=1, vrf='test', state='absent'))
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
-
- def test_bfd_1(self):
- self.get_config.return_value = 'router ospf 1\n bfd\nrouter ospf 2'
- # enable -> disable
- set_module_args(dict(
- ospf=1,
- bfd='disable',
- ))
- self.execute_module(changed=True, commands=[
- 'router ospf 1',
- 'no bfd',
- ])
-
- # disable -> enable
- set_module_args(dict(
- ospf=2,
- bfd='enable',
- ))
- self.execute_module(changed=True, commands=[
- 'router ospf 2',
- 'bfd',
- ])
-
- def test_bfd_2(self):
- # enable idempotence
- self.get_config.return_value = 'router ospf 1\n bfd\nrouter ospf 2'
- set_module_args(dict(
- ospf=1,
- bfd='enable',
- ))
- self.execute_module(changed=False)
-
- # disable idempotence
- set_module_args(dict(
- ospf=2,
- bfd='disable',
- ))
- self.execute_module(changed=False)
-
- def test_bfd_3(self):
- # absent tests
- self.get_config.return_value = 'router ospf 1\n bfd\nrouter ospf 2'
- set_module_args(dict(
- ospf=1,
- state='absent'
- ))
- self.execute_module(changed=True, commands=[
- 'router ospf 1',
- 'no bfd',
- ])
-
- # absent w/bfd disable
- set_module_args(dict(
- ospf=2,
- state='absent'
- ))
- self.execute_module(changed=False)
diff --git a/test/units/modules/network/nxos/test_nxos_overlay_global.py b/test/units/modules/network/nxos/test_nxos_overlay_global.py
deleted file mode 100644
index ffbfe73e8d..0000000000
--- a/test/units/modules/network/nxos/test_nxos_overlay_global.py
+++ /dev/null
@@ -1,51 +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.nxos import nxos_overlay_global
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosOverlayGlobalModule(TestNxosModule):
-
- module = nxos_overlay_global
-
- def setUp(self):
- super(TestNxosOverlayGlobalModule, self).setUp()
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_overlay_global.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_get_config = patch('ansible.modules.network.nxos.nxos_overlay_global.get_config')
- self.get_config = self.mock_get_config.start()
-
- def tearDown(self):
- super(TestNxosOverlayGlobalModule, self).tearDown()
- self.mock_load_config.stop()
- self.mock_get_config.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.get_config.return_value = load_fixture('', 'nxos_overlay_global_config.cfg')
- self.load_config.return_value = None
-
- def test_nxos_overlay_global_up(self):
- set_module_args(dict(anycast_gateway_mac="a.a.a"))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['fabric forwarding anycast-gateway-mac 000A.000A.000A'])
diff --git a/test/units/modules/network/nxos/test_nxos_pim.py b/test/units/modules/network/nxos/test_nxos_pim.py
deleted file mode 100644
index f4aa433245..0000000000
--- a/test/units/modules/network/nxos/test_nxos_pim.py
+++ /dev/null
@@ -1,100 +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.nxos import nxos_pim
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosPimModule(TestNxosModule):
-
- module = nxos_pim
-
- def setUp(self):
- super(TestNxosPimModule, self).setUp()
-
- self.mock_get_config = patch('ansible.modules.network.nxos.nxos_pim.get_config')
- self.get_config = self.mock_get_config.start()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_pim.load_config')
- self.load_config = self.mock_load_config.start()
-
- def tearDown(self):
- super(TestNxosPimModule, self).tearDown()
- self.mock_get_config.stop()
- self.mock_load_config.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.load_config.return_value = None
-
- def test_nxos_pim_1(self):
- # Add/ Modify
- self.get_config.return_value = load_fixture('nxos_pim', 'config.cfg')
- set_module_args(dict(ssm_range='233.0.0.0/8'))
- self.execute_module(changed=True, commands=[
- 'ip pim ssm range 233.0.0.0/8',
- ])
-
- def test_nxos_pim_2(self):
- # Remove existing values
- self.get_config.return_value = load_fixture('nxos_pim', 'config.cfg')
- set_module_args(dict(bfd='disable', ssm_range='none'))
- self.execute_module(changed=True, commands=[
- 'no ip pim bfd',
- 'ip pim ssm range none',
- ])
-
- def test_nxos_pim_3(self):
- # bfd None (disable)-> enable
- self.get_config.return_value = None
- set_module_args(dict(bfd='enable'))
- self.execute_module(changed=True, commands=['ip pim bfd'])
-
- # bfd None (disable) -> disable
- set_module_args(dict(bfd='disable'))
- self.execute_module(changed=False)
-
- # ssm None to 'default'
- set_module_args(dict(ssm_range='default'))
- self.execute_module(changed=False)
-
- def test_nxos_pim_4(self):
- # SSM 'none'
- self.get_config.return_value = load_fixture('nxos_pim', 'config.cfg')
- set_module_args(dict(ssm_range='none'))
- self.execute_module(changed=True, commands=['ip pim ssm range none'])
-
- def test_nxos_pim_5(self):
- # SSM 'default'
- self.get_config.return_value = load_fixture('nxos_pim', 'config.cfg')
- set_module_args(dict(ssm_range='default'))
- self.execute_module(changed=True, commands=['no ip pim ssm range none'])
-
- # SSM 'default' idempotence
- self.get_config.return_value = None
- set_module_args(dict(ssm_range='default'))
- self.execute_module(changed=False)
-
- def test_nxos_pim_6(self):
- # Idempotence
- self.get_config.return_value = load_fixture('nxos_pim', 'config.cfg')
- set_module_args(dict(bfd='enable', ssm_range='127.0.0.0/31'))
- self.execute_module(changed=False, commands=[])
diff --git a/test/units/modules/network/nxos/test_nxos_pim_interface.py b/test/units/modules/network/nxos/test_nxos_pim_interface.py
deleted file mode 100644
index 0248d77401..0000000000
--- a/test/units/modules/network/nxos/test_nxos_pim_interface.py
+++ /dev/null
@@ -1,249 +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.nxos import nxos_pim_interface
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosIPInterfaceModule(TestNxosModule):
-
- module = nxos_pim_interface
-
- def setUp(self):
- super(TestNxosIPInterfaceModule, self).setUp()
-
- self.mock_get_config = patch('ansible.modules.network.nxos.nxos_pim_interface.get_config')
- self.get_config = self.mock_get_config.start()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_pim_interface.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_run_commands = patch('ansible.modules.network.nxos.nxos_pim_interface.run_commands')
- self.run_commands = self.mock_run_commands.start()
-
- def tearDown(self):
- super(TestNxosIPInterfaceModule, self).tearDown()
- self.mock_get_config.stop()
- self.mock_load_config.stop()
- self.mock_run_commands.stop()
-
- def load_fixtures(self, commands=None, device=''):
- module_name = self.module.__name__.rsplit('.', 1)[1]
-
- def load_from_file(*args, **kwargs):
- module, commands = args
- output = list()
-
- for command in commands:
- if type(command) == dict:
- command = command['command']
- filename = str(command).split(' | ')[0].replace(' ', '_').replace('/', '_')
- output.append(load_fixture(module_name, filename))
- return output
-
- self.get_config.return_value = load_fixture(module_name, 'config.cfg')
- self.load_config.return_value = None
- self.run_commands.side_effect = load_from_file
-
- def test_nxos_pim_interface_present(self):
- set_module_args(dict(interface='eth2/1', dr_prio=10, hello_interval=40, sparse=True, border=False))
- self.execute_module(
- changed=True,
- commands=[
- 'interface eth2/1', 'ip pim dr-priority 10', 'ip pim hello-interval 40000',
- 'ip pim sparse-mode']
- )
-
- def test_nxos_pim_interface_jp(self):
- set_module_args(dict(
- interface='eth2/1', jp_policy_in='JPIN', jp_policy_out='JPOUT',
- jp_type_in='routemap', jp_type_out='routemap',
- ))
- self.execute_module(
- changed=True,
- commands=['interface eth2/1', 'ip pim jp-policy JPOUT out',
- 'ip pim jp-policy JPIN in']
- )
-
- def test_nxos_pim_interface_default(self):
- set_module_args(dict(interface='eth2/1', state='default'))
- self.execute_module(
- changed=False,
- commands=[]
- )
-
- def test_nxos_pim_interface_ip_absent(self):
- set_module_args(dict(interface='eth2/1', state='absent'))
- self.execute_module(changed=False, commands=[])
-
-
-class TestNxosPimInterfaceBfdModule(TestNxosModule):
-
- module = nxos_pim_interface
-
- def setUp(self):
- super(TestNxosPimInterfaceBfdModule, self).setUp()
-
- self.mock_get_interface_mode = patch('ansible.modules.network.nxos.nxos_pim_interface.get_interface_mode')
- self.get_interface_mode = self.mock_get_interface_mode.start()
-
- self.mock_get_config = patch('ansible.modules.network.nxos.nxos_pim_interface.get_config')
- self.get_config = self.mock_get_config.start()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_pim_interface.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_run_commands = patch('ansible.modules.network.nxos.nxos_pim_interface.run_commands')
- self.run_commands = self.mock_run_commands.start()
-
- def tearDown(self):
- super(TestNxosPimInterfaceBfdModule, self).tearDown()
- self.mock_get_interface_mode.stop()
- self.mock_get_config.stop()
- self.mock_load_config.stop()
- self.mock_run_commands.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.load_config.return_value = None
-
- def test_bfd_1(self):
- # default (None) -> enable
- self.get_config.return_value = None
- set_module_args(dict(interface='eth2/1', bfd='enable'))
- self.execute_module(
- changed=True,
- commands=[
- 'interface eth2/1',
- 'ip pim bfd-instance',
- ])
-
- # default (None) -> disable
- set_module_args(dict(interface='eth2/1', bfd='disable'))
- self.execute_module(
- changed=True,
- commands=[
- 'interface eth2/1',
- 'ip pim bfd-instance disable',
- ])
-
- # default (None) -> default (None) (idempotence)
- set_module_args(dict(interface='eth2/1', bfd='default'))
- self.execute_module(changed=False,)
-
- # default (None) -> interface state 'default'
- set_module_args(dict(interface='Ethernet9/3', state='default'))
- self.execute_module(changed=False,)
-
- # default (None) -> interface state 'absent'
- set_module_args(dict(interface='Ethernet9/3', state='absent'))
- self.execute_module(changed=False,)
-
- def test_bfd_2(self):
- # From disable
- self.get_config.return_value = '''
- interface Ethernet9/2
- ip pim bfd-instance disable
- '''
- # disable -> enable
- set_module_args(dict(interface='Ethernet9/2', bfd='enable'))
- self.execute_module(
- changed=True,
- commands=[
- 'interface Ethernet9/2',
- 'ip pim bfd-instance',
- ])
-
- # disable -> disable (idempotence)
- set_module_args(dict(interface='Ethernet9/2', bfd='disable'))
- self.execute_module(changed=False,)
-
- # disable -> default (None)
- set_module_args(dict(interface='Ethernet9/2', bfd='default'))
- self.execute_module(
- changed=True,
- commands=[
- 'interface Ethernet9/2',
- 'no ip pim bfd-instance',
- ])
- # disable -> interface state 'default'
- set_module_args(dict(interface='Ethernet9/3', state='default'))
- self.execute_module(
- changed=True,
- commands=[
- 'interface Ethernet9/3',
- 'no ip pim bfd-instance',
- ])
-
- # disable -> interface state 'absent'
- set_module_args(dict(interface='Ethernet9/3', state='absent'))
- self.execute_module(
- changed=True,
- commands=[
- 'interface Ethernet9/3',
- 'no ip pim bfd-instance',
- ])
-
- def test_bfd_3(self):
- # From enable
- self.get_config.return_value = '''
- interface Ethernet9/2
- ip pim bfd-instance
- '''
- # enable -> disabled
- set_module_args(dict(interface='Ethernet9/3', bfd='disable'))
- self.execute_module(
- changed=True,
- commands=[
- 'interface Ethernet9/3',
- 'ip pim bfd-instance disable',
- ])
-
- # enable -> enable (idempotence)
- set_module_args(dict(interface='Ethernet9/3', bfd='enable'))
- self.execute_module(changed=False,)
-
- # enable -> default (None)
- set_module_args(dict(interface='Ethernet9/3', bfd='default'))
- self.execute_module(
- changed=True,
- commands=[
- 'interface Ethernet9/3',
- 'no ip pim bfd-instance',
- ])
-
- # enable -> interface state 'default'
- set_module_args(dict(interface='Ethernet9/3', state='default'))
- self.execute_module(
- changed=True,
- commands=[
- 'interface Ethernet9/3',
- 'no ip pim bfd-instance',
- ])
-
- # enable -> interface state 'absent'
- set_module_args(dict(interface='Ethernet9/3', state='absent'))
- self.execute_module(
- changed=True,
- commands=[
- 'interface Ethernet9/3',
- 'no ip pim bfd-instance',
- ])
diff --git a/test/units/modules/network/nxos/test_nxos_pim_rp_address.py b/test/units/modules/network/nxos/test_nxos_pim_rp_address.py
deleted file mode 100644
index f6e8919daf..0000000000
--- a/test/units/modules/network/nxos/test_nxos_pim_rp_address.py
+++ /dev/null
@@ -1,63 +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.nxos import nxos_pim_rp_address
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosPimRpAddressModule(TestNxosModule):
-
- module = nxos_pim_rp_address
-
- def setUp(self):
- super(TestNxosPimRpAddressModule, self).setUp()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_pim_rp_address.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_get_config = patch('ansible.modules.network.nxos.nxos_pim_rp_address.get_config')
- self.get_config = self.mock_get_config.start()
-
- def tearDown(self):
- super(TestNxosPimRpAddressModule, self).tearDown()
- self.mock_load_config.stop()
- self.mock_get_config.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.get_config.return_value = load_fixture('nxos_pim_rp_address', 'config.cfg')
- self.load_config.return_value = None
-
- def test_nxos_pim_rp_address(self):
- set_module_args(dict(rp_address='5.6.7.8'))
- self.execute_module(changed=True, commands=['ip pim rp-address 5.6.7.8'])
-
- def test_nxos_pim_rp_address_no_change(self):
- set_module_args(dict(rp_address='1.2.3.4'))
- self.execute_module(changed=False, commands=[])
-
- def test_nxos_pim_rp_address_absent(self):
- set_module_args(dict(rp_address='1.2.3.4', state='absent'))
- self.execute_module(changed=True, commands=['no ip pim rp-address 1.2.3.4'])
-
- def test_nxos_pim_rp_address_absent_no_change(self):
- set_module_args(dict(rp_address='5.6.7.8', state='absent'))
- self.execute_module(changed=False, commands=[])
diff --git a/test/units/modules/network/nxos/test_nxos_static_route.py b/test/units/modules/network/nxos/test_nxos_static_route.py
deleted file mode 100644
index cb9d13cc1a..0000000000
--- a/test/units/modules/network/nxos/test_nxos_static_route.py
+++ /dev/null
@@ -1,79 +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.nxos import nxos_static_route
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosStaticRouteModule(TestNxosModule):
-
- module = nxos_static_route
-
- def setUp(self):
- super(TestNxosStaticRouteModule, self).setUp()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_static_route.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_get_config = patch('ansible.modules.network.nxos.nxos_static_route.get_config')
- self.get_config = self.mock_get_config.start()
-
- def tearDown(self):
- super(TestNxosStaticRouteModule, self).tearDown()
- self.mock_load_config.stop()
- self.mock_get_config.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.get_config.return_value = load_fixture('', 'nxos_static_route.cfg')
- self.load_config.return_value = None
-
- def test_nxos_static_route_present(self):
- set_module_args(dict(prefix='192.168.20.64/24', next_hop='192.0.2.3'))
- self.execute_module(changed=True, commands=['ip route 192.168.20.0/24 192.0.2.3'])
-
- def test_nxos_static_route_present_no_defaults(self):
- set_module_args(dict(prefix='192.168.20.64/24', next_hop='192.0.2.3',
- route_name='testing', pref=100))
- self.execute_module(changed=True, commands=['ip route 192.168.20.0/24 192.0.2.3 name testing 100'])
-
- def test_nxos_static_route_present_vrf(self):
- set_module_args(dict(prefix='192.168.20.64/24', next_hop='192.0.2.3', vrf='test'))
- self.execute_module(changed=True, sort=False, commands=['vrf context test', 'ip route 192.168.20.0/24 192.0.2.3'])
-
- def test_nxos_static_route_no_change(self):
- set_module_args(dict(prefix='10.10.30.64/24', next_hop='1.2.4.8'))
- self.execute_module(changed=False, commands=[])
-
- def test_nxos_static_route_absent(self):
- set_module_args(dict(prefix='10.10.30.12/24', next_hop='1.2.4.8', state='absent'))
- self.execute_module(changed=True, commands=['no ip route 10.10.30.0/24 1.2.4.8'])
-
- def test_nxos_static_route_absent_no_change(self):
- set_module_args(dict(prefix='192.168.20.6/24', next_hop='192.0.2.3', state='absent'))
- self.execute_module(changed=False, commands=[])
-
- def test_nxos_static_route_absent_vrf(self):
- set_module_args(dict(prefix='10.11.12.13/14', next_hop='15.16.17.18', vrf='test', state='absent'))
- self.execute_module(
- changed=True, sort=False,
- commands=['vrf context test', 'no ip route 10.8.0.0/14 15.16.17.18']
- )
diff --git a/test/units/modules/network/nxos/test_nxos_system.py b/test/units/modules/network/nxos/test_nxos_system.py
deleted file mode 100644
index 6f38dd3893..0000000000
--- a/test/units/modules/network/nxos/test_nxos_system.py
+++ /dev/null
@@ -1,130 +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.nxos import nxos_system
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosSystemModule(TestNxosModule):
-
- module = nxos_system
-
- def setUp(self):
- super(TestNxosSystemModule, self).setUp()
-
- self.mock_get_config = patch('ansible.modules.network.nxos.nxos_system.get_config')
- self.get_config = self.mock_get_config.start()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_system.load_config')
- self.load_config = self.mock_load_config.start()
-
- def tearDown(self):
- super(TestNxosSystemModule, self).tearDown()
- self.mock_get_config.stop()
- self.mock_load_config.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.get_config.return_value = load_fixture('', 'nxos_system_config.cfg')
- self.load_config.return_value = None
-
- def test_nxos_system_hostname_changed(self):
- set_module_args(dict(hostname='foo'))
- commands = ['hostname foo']
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_system_domain_lookup(self):
- set_module_args(dict(domain_lookup=True))
- commands = ['ip domain-lookup']
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_system_missing_vrf(self):
- domain_name = dict(name='example.com', vrf='example')
- set_module_args(dict(domain_name=domain_name))
- self.execute_module(failed=True)
-
- def test_nxos_system_domain_name(self):
- set_module_args(dict(domain_name=['example.net']))
- commands = ['no ip domain-name ansible.com',
- 'vrf context management', 'no ip domain-name eng.ansible.com', 'exit',
- 'ip domain-name example.net']
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_system_domain_name_complex(self):
- domain_name = dict(name='example.net', vrf='management')
- set_module_args(dict(domain_name=[domain_name]))
- commands = ['no ip domain-name ansible.com',
- 'vrf context management', 'no ip domain-name eng.ansible.com', 'exit',
- 'vrf context management', 'ip domain-name example.net', 'exit']
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_system_domain_search(self):
- set_module_args(dict(domain_search=['example.net']))
- commands = ['vrf context management', 'no ip domain-list ansible.com', 'exit',
- 'vrf context management', 'no ip domain-list redhat.com', 'exit',
- 'no ip domain-list ansible.com', 'no ip domain-list redhat.com',
- 'ip domain-list example.net']
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_system_domain_search_complex(self):
- domain_search = dict(name='example.net', vrf='management')
- set_module_args(dict(domain_search=[domain_search]))
- commands = ['vrf context management', 'no ip domain-list ansible.com', 'exit',
- 'vrf context management', 'no ip domain-list redhat.com', 'exit',
- 'no ip domain-list ansible.com', 'no ip domain-list redhat.com',
- 'vrf context management', 'ip domain-list example.net', 'exit']
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_system_name_servers(self):
- set_module_args(dict(name_servers=['1.2.3.4', '8.8.8.8']))
- commands = ['no ip name-server 172.26.1.1',
- 'vrf context management', 'no ip name-server 8.8.8.8', 'exit',
- 'vrf context management', 'no ip name-server 172.26.1.1', 'exit',
- 'ip name-server 1.2.3.4']
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_system_name_servers_complex(self):
- name_servers = dict(server='1.2.3.4', vrf='management')
- set_module_args(dict(name_servers=[name_servers]))
- commands = ['no ip name-server 8.8.8.8', 'no ip name-server 172.26.1.1',
- 'vrf context management', 'no ip name-server 8.8.8.8', 'exit',
- 'vrf context management', 'no ip name-server 172.26.1.1', 'exit',
- 'vrf context management', 'ip name-server 1.2.3.4', 'exit']
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_system_system_mtu(self):
- set_module_args(dict(system_mtu=2000))
- commands = ['system jumbomtu 2000']
- self.execute_module(changed=True, commands=commands)
-
- def test_nxos_system_state_absent(self):
- set_module_args(dict(state='absent'))
- commands = ['no hostname', 'no ip domain-name ansible.com',
- 'vrf context management', 'no ip domain-name eng.ansible.com', 'exit',
- 'no ip domain-list ansible.com', 'no ip domain-list redhat.com',
- 'vrf context management', 'no ip domain-list ansible.com', 'exit',
- 'vrf context management', 'no ip domain-list redhat.com', 'exit',
- 'no ip name-server 8.8.8.8', 'no ip name-server 172.26.1.1',
- 'vrf context management', 'no ip name-server 8.8.8.8', 'exit',
- 'vrf context management', 'no ip name-server 172.26.1.1', 'exit',
- 'no system jumbomtu']
- self.execute_module(changed=True, commands=commands)
diff --git a/test/units/modules/network/nxos/test_nxos_telemetry.py b/test/units/modules/network/nxos/test_nxos_telemetry.py
deleted file mode 100644
index a752ab8615..0000000000
--- a/test/units/modules/network/nxos/test_nxos_telemetry.py
+++ /dev/null
@@ -1,1256 +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/>.
-
-# Make coding more python3-ish
-from __future__ import (absolute_import, division, print_function)
-__metaclass__ = type
-
-from units.compat.mock import patch
-from units.modules.utils import AnsibleFailJson
-from ansible.modules.network.nxos import nxos_telemetry
-from ansible.module_utils.network.nxos.nxos import NxosCmdRef
-from ansible.module_utils.network.nxos.config.telemetry.telemetry import Telemetry
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-# TBD: These imports / import checks are only needed as a workaround for
-# shippable, which fails this test due to import yaml & import ordereddict.
-import pytest
-from ansible.module_utils.network.nxos.nxos import nxosCmdRef_import_check
-msg = nxosCmdRef_import_check()
-ignore_provider_arg = True
-
-
-@pytest.mark.skipif(len(msg), reason=msg)
-class TestNxosTelemetryModule(TestNxosModule):
-
- module = nxos_telemetry
-
- def setUp(self):
- super(TestNxosTelemetryModule, self).setUp()
-
- self.mock_FACT_LEGACY_SUBSETS = patch('ansible.module_utils.network.nxos.facts.facts.FACT_LEGACY_SUBSETS')
- self.FACT_LEGACY_SUBSETS = self.mock_FACT_LEGACY_SUBSETS.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.nxos.config.telemetry.telemetry.Telemetry.edit_config')
- self.edit_config = self.mock_edit_config.start()
-
- self.mock_execute_show_command = patch('ansible.module_utils.network.nxos.nxos.NxosCmdRef.execute_show_command')
- self.execute_show_command = self.mock_execute_show_command.start()
-
- self.mock_get_platform_shortname = patch('ansible.module_utils.network.nxos.nxos.NxosCmdRef.get_platform_shortname')
- self.get_platform_shortname = self.mock_get_platform_shortname.start()
-
- def tearDown(self):
- super(TestNxosTelemetryModule, self).tearDown()
- self.mock_FACT_LEGACY_SUBSETS.stop()
- self.mock_get_resource_connection_config.stop()
- self.mock_get_resource_connection_facts.stop()
- self.mock_edit_config.stop()
- self.mock_execute_show_command.stop()
- self.get_platform_shortname.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.mock_FACT_LEGACY_SUBSETS.return_value = dict()
- self.get_resource_connection_config.return_value = 'Connection'
- self.get_resource_connection_facts.return_value = 'Connection'
- self.edit_config.return_value = None
-
- # ---------------------------
- # Telemetry Global Test Cases
- # ---------------------------
-
- def test_tms_global_merged_n9k(self):
- # Assumes feature telemetry is disabled
- # TMS global config is not present.
- self.execute_show_command.return_value = None
- self.get_platform_shortname.return_value = 'N9K'
- set_module_args(dict(
- config=dict(
- certificate={'key': '/bootflash/sample.key', 'hostname': 'server.example.com'},
- compression='gzip',
- source_interface='Ethernet2/1',
- vrf='blue',
- )
- ), ignore_provider_arg)
- self.execute_module(changed=True, commands=[
- 'feature telemetry',
- 'telemetry',
- 'certificate /bootflash/sample.key server.example.com',
- 'destination-profile',
- 'use-compression gzip',
- 'source-interface Ethernet2/1',
- 'use-vrf blue'
- ])
-
- def test_tms_global_checkmode_n9k(self):
- # Assumes feature telemetry is disabled
- # TMS global config is not present.
- self.execute_show_command.return_value = None
- self.get_platform_shortname.return_value = 'N9K'
- set_module_args(dict(
- _ansible_check_mode=True,
- config=dict(
- certificate={'key': '/bootflash/sample.key', 'hostname': 'server.example.com'},
- compression='gzip',
- source_interface='Ethernet2/1',
- vrf='blue',
- )
- ), ignore_provider_arg)
- self.execute_module(changed=True, commands=[
- 'feature telemetry',
- 'telemetry',
- 'certificate /bootflash/sample.key server.example.com',
- 'destination-profile',
- 'use-compression gzip',
- 'source-interface Ethernet2/1',
- 'use-vrf blue'
- ])
-
- def test_tms_global_merged2_n9k(self):
- # Assumes feature telemetry is disabled
- # TMS global config is not present.
- # Configure only vrf
- self.execute_show_command.return_value = None
- self.get_platform_shortname.return_value = 'N9K'
- set_module_args(dict(
- config=dict(
- vrf='blue',
- )
- ), ignore_provider_arg)
- self.execute_module(changed=True, commands=[
- 'feature telemetry',
- 'telemetry',
- 'destination-profile',
- 'use-vrf blue'
- ])
-
- def test_tms_global_idempotent_n9k(self):
- # Assumes feature telemetry is enabled
- # TMS global config is present.
- self.execute_show_command.return_value = load_fixture('nxos_telemetry', 'N9K.cfg')
- self.get_platform_shortname.return_value = 'N9K'
- set_module_args(dict(
- config=dict(
- certificate={'key': '/bootflash/server.key', 'hostname': 'localhost'},
- compression='gzip',
- source_interface='loopback55',
- vrf='management',
- )
- ), ignore_provider_arg)
- self.execute_module(changed=False)
-
- def test_tms_global_change_cert_n9k(self):
- # Assumes feature telemetry is enabled
- # TMS global config is present
- # Change certificate
- self.execute_show_command.return_value = load_fixture('nxos_telemetry', 'N9K.cfg')
- self.get_platform_shortname.return_value = 'N9K'
- set_module_args(dict(
- config=dict(
- certificate={'key': '/bootflash/server.key', 'hostname': 'my_host'},
- compression='gzip',
- source_interface='loopback55',
- vrf='management',
- )
- ), ignore_provider_arg)
- self.execute_module(changed=True, commands=[
- 'telemetry',
- 'certificate /bootflash/server.key my_host'
- ])
-
- def test_tms_global_change_interface_n9k(self):
- # Assumes feature telemetry is enabled
- # TMS global config is present
- # Change interface
- self.execute_show_command.return_value = load_fixture('nxos_telemetry', 'N9K.cfg')
- self.get_platform_shortname.return_value = 'N9K'
- set_module_args(dict(
- config=dict(
- certificate={'key': '/bootflash/server.key', 'hostname': 'localhost'},
- compression='gzip',
- source_interface='Ethernet8/1',
- vrf='management',
- )
- ), ignore_provider_arg)
- self.execute_module(changed=True, commands=[
- 'telemetry',
- 'destination-profile',
- 'source-interface Ethernet8/1'
- ])
-
- def test_tms_global_change_several_n9k(self):
- # Assumes feature telemetry is enabled
- # TMS global config is present
- # Change source_interface, vrf and cert
- self.execute_show_command.return_value = load_fixture('nxos_telemetry', 'N9K.cfg')
- self.get_platform_shortname.return_value = 'N9K'
- set_module_args(dict(
- config=dict(
- certificate={'key': '/bootflash/server_5.key', 'hostname': 'my_host'},
- compression='gzip',
- source_interface='Ethernet8/1',
- vrf='blue',
- )
- ), ignore_provider_arg)
- self.execute_module(changed=True, commands=[
- 'telemetry',
- 'certificate /bootflash/server_5.key my_host',
- 'destination-profile',
- 'source-interface Ethernet8/1',
- 'use-vrf blue',
- ])
-
- # ------------------------------
- # Telemetry DestGroup Test Cases
- # ------------------------------
-
- def test_tms_destgroup_input_validation_1(self):
- # Mandatory parameter 'id' missing.
- self.execute_show_command.return_value = None
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'destination': {'ip': '192.168.1.1', 'port': '5001', 'protocol': 'GRPC', 'encoding': 'GPB'}}
- ], 'destination_groups')
- set_module_args(args, ignore_provider_arg)
- with pytest.raises(AnsibleFailJson) as errinfo:
- self.execute_module()
- testdata = errinfo.value.args[0]
- assert 'Parameter <id> under <destination_groups> is required' in str(testdata['msg'])
- assert testdata['failed']
-
- def test_tms_destgroup_input_validation_2(self):
- # Parameter 'destination' is not a dict.
- self.execute_show_command.return_value = None
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': '88',
- 'destination': '192.168.1.1',
- }
- ], 'destination_groups')
- set_module_args(args, ignore_provider_arg)
- with pytest.raises(AnsibleFailJson) as errinfo:
- self.execute_module()
- testdata = errinfo.value.args[0]
- assert "Parameter <destination> under <destination_groups> must be a dict" in str(testdata['msg'])
- assert testdata['failed']
-
- def test_tms_destgroup_input_validation_3(self):
- # Parameter 'destination' is not a dict.
- self.execute_show_command.return_value = None
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': '88',
- 'ip': '192.168.1.1',
- 'port': '5001'
- }
- ], 'destination_groups')
- set_module_args(args, ignore_provider_arg)
- with pytest.raises(AnsibleFailJson) as errinfo:
- self.execute_module()
- testdata = errinfo.value.args[0]
- assert 'Playbook entry contains unrecongnized parameters' in str(testdata['msg'])
- assert testdata['failed']
-
- def test_tms_destgroup_merged_n9k(self):
- # Assumes feature telemetry is enabled
- # TMS destgroup config is not present.
- self.execute_show_command.return_value = None
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': '88',
- 'destination': {'ip': '192.168.1.1', 'port': '5001', 'protocol': 'GRPC', 'encoding': 'GPB'},
- },
- {'id': '88',
- 'destination': {'ip': '192.168.1.2', 'port': '6001', 'protocol': 'GRPC', 'encoding': 'GPB'},
- },
- {'id': '99',
- 'destination': {'ip': '192.168.1.2', 'port': '6001', 'protocol': 'GRPC', 'encoding': 'GPB'},
- },
- {'id': '99',
- 'destination': {'ip': '192.168.1.1', 'port': '5001', 'protocol': 'GRPC', 'encoding': 'GPB'},
- },
- ], 'destination_groups')
- set_module_args(args, ignore_provider_arg)
- self.execute_module(changed=True, commands=[
- 'feature telemetry',
- 'telemetry',
- 'destination-group 88',
- 'ip address 192.168.1.1 port 5001 protocol grpc encoding gpb',
- 'ip address 192.168.1.2 port 6001 protocol grpc encoding gpb',
- 'destination-group 99',
- 'ip address 192.168.1.2 port 6001 protocol grpc encoding gpb',
- 'ip address 192.168.1.1 port 5001 protocol grpc encoding gpb',
- ])
-
- def test_tms_destgroup_checkmode_n9k(self):
- # Assumes feature telemetry is enabled
- # TMS destgroup config is not present.
- self.execute_show_command.return_value = None
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': '88',
- 'destination': {'ip': '192.168.1.1', 'port': '5001', 'protocol': 'GRPC', 'encoding': 'GPB'},
- }
- ], 'destination_groups', state='merged', check_mode=True)
- set_module_args(args, ignore_provider_arg)
- self.execute_module(changed=True, commands=[
- 'feature telemetry',
- 'telemetry',
- 'destination-group 88',
- 'ip address 192.168.1.1 port 5001 protocol grpc encoding gpb'
- ])
-
- def test_tms_destgroup_merged2_n9k(self):
- # Assumes feature telemetry is enabled
- # TMS destgroup config is not present.
- # Configure only identifier
- self.execute_show_command.return_value = None
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': '88'}
- ], 'destination_groups')
- set_module_args(args, ignore_provider_arg)
- self.execute_module(changed=True, commands=[
- 'feature telemetry',
- 'telemetry',
- 'destination-group 88',
- ])
-
- def test_tms_destgroup_idempotent_n9k(self):
- # Assumes feature telemetry is enabled
- # TMS destgroup config is not present.
- # Configure only identifier
- self.execute_show_command.return_value = load_fixture('nxos_telemetry', 'N9K.cfg')
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': '2',
- 'destination': {'ip': '192.168.0.2', 'port': '60001', 'protocol': 'grpc', 'encoding': 'gpb'},
- }
- ], 'destination_groups')
- set_module_args(args, ignore_provider_arg)
- self.execute_module(changed=False)
-
- def test_tms_destgroup_idempotent2_n9k(self):
- # Assumes feature telemetry is enabled
- # TMS destgroup config is not present.
- # Configure only identifier
- self.execute_show_command.return_value = load_fixture('nxos_telemetry', 'N9K.cfg')
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': '2'}
- ], 'destination_groups')
- set_module_args(args, ignore_provider_arg)
- self.execute_module(changed=False)
-
- def test_tms_destgroup_merged_aggregate_idempotent_n9k(self):
- # Assumes feature telemetry is enabled
- # TMS destgroup config is present.
- self.execute_show_command.return_value = load_fixture('nxos_telemetry', 'N9K.cfg')
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': '2',
- 'destination': {'ip': '192.168.0.1', 'port': '50001', 'protocol': 'gRPC', 'encoding': 'gpb'}
- },
- {'id': '10',
- 'destination': {'ip': '192.168.0.1', 'port': '50001', 'protocol': 'gRPC', 'encoding': 'gpb'}
- }
- ], 'destination_groups')
- set_module_args(args, ignore_provider_arg)
- self.execute_module(changed=False)
-
- def test_tms_destgroup_change_n9k(self):
- # TMS destgroup config is not present.
- # Change protocol and encoding for dest group 2
- self.execute_show_command.return_value = load_fixture('nxos_telemetry', 'N9K.cfg')
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': '2',
- 'destination': {'ip': '192.168.0.1', 'port': '50001', 'protocol': 'http', 'encoding': 'JSON'}
- },
- {'id': '10',
- 'destination': {'ip': '192.168.0.1', 'port': '50001', 'protocol': 'gRPC', 'encoding': 'gpb'}
- }
- ], 'destination_groups')
- set_module_args(args, ignore_provider_arg)
- self.execute_module(changed=True, commands=[
- 'telemetry', 'destination-group 2',
- 'ip address 192.168.0.1 port 50001 protocol http encoding json'
- ])
-
- def test_tms_destgroup_add_n9k(self):
- # TMS destgroup config is not present.
- # Add destinations to destgroup 10
- # Add new destgroup 55 and 56
- self.execute_show_command.return_value = load_fixture('nxos_telemetry', 'N9K.cfg')
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': '10',
- 'destination': {'ip': '192.168.0.1', 'port': '50001', 'protocol': 'gRPC', 'encoding': 'gpb'}
- },
- {'id': '10',
- 'destination': {'ip': '192.168.0.10', 'port': '50001', 'protocol': 'gRPC', 'encoding': 'gpb'}
- },
- {'id': '55',
- 'destination': {'ip': '192.168.0.2', 'port': '50001', 'protocol': 'gRPC', 'encoding': 'gpb'}
- },
- {'id': '56'},
- ], 'destination_groups')
- set_module_args(args, ignore_provider_arg)
- self.execute_module(changed=True, commands=[
- 'telemetry',
- 'destination-group 10',
- 'ip address 192.168.0.10 port 50001 protocol grpc encoding gpb',
- 'destination-group 55',
- 'ip address 192.168.0.2 port 50001 protocol grpc encoding gpb',
- 'destination-group 56'
- ])
-
- # --------------------------------
- # Telemetry SensorGroup Test Cases
- # --------------------------------
-
- def test_tms_sensorgroup_merged_n9k(self):
- # Assumes feature telemetry is enabled
- # TMS sensorgroup config is not present.
- self.execute_show_command.return_value = None
- self.get_platform_shortname.return_value = 'N9K'
- td55_name = 'sys/bgp/inst/dom-default/peer-[10.10.10.11]/ent-[10.10.10.11]'
- td55_fc = 'or(eq(ethpmPhysIf.operSt,"down"),eq(ethpmPhysIf.operSt,"up"))'
- args = build_args([
- {'id': '2',
- 'data_source': 'NX-API',
- 'path': {'name': 'sys/bgp', 'depth': 0, 'query_condition': 'foo', 'filter_condition': 'foo'},
- },
- {'id': '2',
- 'data_source': 'NX-API',
- 'path': {'name': 'sys/bgp/inst', 'depth': 'unbounded', 'query_condition': 'foo', 'filter_condition': 'foo'},
- },
- {'id': '55',
- 'data_source': 'DME',
- 'path': {'name': td55_name, 'depth': 0, 'query_condition': 'foo', 'filter_condition': 'foo'},
- },
- {'id': '55',
- 'data_source': 'DME',
- 'path': {'name': 'sys/ospf', 'depth': 0, 'query_condition': 'foo', 'filter_condition': td55_fc},
- },
- ], 'sensor_groups')
- set_module_args(args, ignore_provider_arg)
- self.execute_module(changed=True, commands=[
- 'feature telemetry',
- 'telemetry',
- 'sensor-group 2',
- 'data-source NX-API',
- 'path sys/bgp depth 0 query-condition foo filter-condition foo',
- 'path sys/bgp/inst depth unbounded query-condition foo filter-condition foo',
- 'sensor-group 55',
- 'data-source DME',
- 'path sys/bgp/inst/dom-default/peer-[10.10.10.11]/ent-[10.10.10.11] depth 0 query-condition foo filter-condition foo',
- 'path sys/ospf depth 0 query-condition foo filter-condition or(eq(ethpmPhysIf.operSt,"down"),eq(ethpmPhysIf.operSt,"up"))',
- ])
-
- def test_tms_sensorgroup_input_validation_1(self):
- # Mandatory parameter 'id' missing.
- self.execute_show_command.return_value = None
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'data_source': 'DME',
- 'path': {'name': 'sys/bgp', 'depth': 0, 'query_condition': 'query_condition_xyz', 'filter_condition': 'filter_condition_xyz'},
- },
- ], 'sensor_groups')
- set_module_args(args, ignore_provider_arg)
- with pytest.raises(AnsibleFailJson) as errinfo:
- self.execute_module()
- testdata = errinfo.value.args[0]
- assert 'Parameter <id> under <sensor_groups> is required' in str(testdata['msg'])
- assert testdata['failed']
-
- def test_tms_sensorgroup_input_validation_2(self):
- # Path present but mandatory 'name' key is not
- self.execute_show_command.return_value = None
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': '77',
- 'data_source': 'DME',
- 'path': {'depth': 0, 'query_condition': 'query_condition_xyz', 'filter_condition': 'filter_condition_xyz'},
- },
- ], 'sensor_groups')
- set_module_args(args, ignore_provider_arg)
- with pytest.raises(AnsibleFailJson) as errinfo:
- self.execute_module()
- testdata = errinfo.value.args[0]
- assert 'Parameter <path> under <sensor_groups> requires <name> key' in str(testdata['msg'])
- assert testdata['failed']
-
- def test_tms_sensorgroup_resource_key_n9k(self):
- # TMS sensorgroup config is not present.
- self.execute_show_command.return_value = None
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': '77'}
- ], 'sensor_groups')
- set_module_args(args, ignore_provider_arg)
- self.execute_module(changed=True, commands=[
- 'feature telemetry',
- 'telemetry',
- 'sensor-group 77',
- ])
-
- def test_tms_sensorgroup_merged_variable_args1_n9k(self):
- # TMS sensorgroup config is not present.
- # Only path key name provided
- self.execute_show_command.return_value = None
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': '77',
- 'data_source': 'DME',
- 'path': {'name': 'sys/bgp'},
- },
- ], 'sensor_groups')
- set_module_args(args, ignore_provider_arg)
- self.execute_module(changed=True, commands=[
- 'feature telemetry',
- 'telemetry',
- 'sensor-group 77',
- 'data-source DME',
- 'path sys/bgp',
- ])
-
- def test_tms_sensorgroup_merged_variable_args2_n9k(self):
- # TMS sensorgroup config is not present.
- # Only path keys name and depth provided
- self.execute_show_command.return_value = None
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': '77',
- 'data_source': 'DME',
- 'path': {'name': 'sys/bgp', 'depth': 0},
- },
- ], 'sensor_groups')
- set_module_args(args, ignore_provider_arg)
- self.execute_module(changed=True, commands=[
- 'feature telemetry',
- 'telemetry',
- 'sensor-group 77',
- 'data-source DME',
- 'path sys/bgp depth 0',
- ])
-
- def test_tms_sensorgroup_merged_variable_args3_n9k(self):
- # TMS sensorgroup config is not present.
- # Only path keys name, depth and query_condition provided
- self.execute_show_command.return_value = None
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': '77',
- 'data_source': 'DME',
- 'path': {'name': 'sys/bgp', 'depth': 0, 'query_condition': 'query_condition_xyz'},
- },
- ], 'sensor_groups')
- set_module_args(args, ignore_provider_arg)
- self.execute_module(changed=True, commands=[
- 'feature telemetry',
- 'telemetry',
- 'sensor-group 77',
- 'data-source DME',
- 'path sys/bgp depth 0 query-condition query_condition_xyz',
- ])
-
- def test_tms_sensorgroup_merged_variable_args4_n9k(self):
- # TMS sensorgroup config is not present.
- # Only path keys name, depth and filter_condition provided
- self.execute_show_command.return_value = None
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': '77',
- 'data_source': 'DME',
- 'path': {'name': 'sys/bgp', 'depth': 0, 'filter_condition': 'filter_condition_xyz'},
- },
- ], 'sensor_groups')
- set_module_args(args, ignore_provider_arg)
- self.execute_module(changed=True, commands=[
- 'feature telemetry',
- 'telemetry',
- 'sensor-group 77',
- 'data-source DME',
- 'path sys/bgp depth 0 filter-condition filter_condition_xyz',
- ])
-
- def test_tms_sensorgroup_merged_idempotent_n9k(self):
- # Assumes feature telemetry is enabled
- # TMS sensorgroup config is not present.
- self.execute_show_command.return_value = load_fixture('nxos_telemetry', 'N9K.cfg')
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': '2',
- 'data_source': 'DME',
- 'path': {'name': 'sys/ospf', 'depth': 0, 'query_condition': 'qc', 'filter_condition': 'fc'},
- },
- ], 'sensor_groups')
- set_module_args(args, ignore_provider_arg)
- self.execute_module(changed=False)
-
- def test_tms_sensorgroup_quotes_merged_idempotent_n9k(self):
- # Assumes feature telemetry is enabled
- # TMS sensorgroup config is present with quotes in NX-API path.
- self.execute_show_command.return_value = load_fixture('nxos_telemetry', 'N9K_SGs.cfg')
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': '2',
- 'data_source': 'NX-API',
- 'path': {'name': '"show mac address-table count"', 'depth': 2},
- },
- {'id': '3',
- 'data_source': 'NX-API',
- 'path': {'name': '"show interface ethernet1/1-52"'},
- },
- {'id': '1',
- 'path': {'name': 'sys/procsys', 'depth': 1},
- },
- ], 'sensor_groups')
- set_module_args(args, ignore_provider_arg)
- self.execute_module(changed=False)
-
- def test_tms_sensorgroup_vxlan_idempotent_n9k(self):
- # TMS sensorgroup config present.
- self.execute_show_command.return_value = load_fixture('nxos_telemetry', 'N9K.cfg')
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': '56',
- 'data_source': 'DME',
- 'path': {'name': 'vxlan'},
- },
- ], 'sensor_groups')
- set_module_args(args, ignore_provider_arg)
- self.execute_module(changed=False)
-
- def test_tms_sensorgroup_idempotent_variable1_n9k(self):
- # TMS sensorgroup config is present with path key name.
- self.execute_show_command.return_value = load_fixture('nxos_telemetry', 'N9K.cfg')
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': '2',
- 'data_source': 'DME',
- 'path': {'name': 'sys/bgp/inst/dom-default/peer-[10.10.10.11]/ent-[10.10.10.11]'},
- },
- ], 'sensor_groups')
- set_module_args(args, ignore_provider_arg)
- self.execute_module(changed=False)
-
- def test_tms_sensorgroup_idempotent_variable2_n9k(self):
- # TMS sensorgroup config is present with path key name and depth.
- self.execute_show_command.return_value = load_fixture('nxos_telemetry', 'N9K.cfg')
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': '2',
- 'data_source': 'DME',
- 'path': {'name': 'boo', 'depth': 0},
- },
- ], 'sensor_groups')
- set_module_args(args, ignore_provider_arg)
- self.execute_module(changed=False)
-
- def test_tms_sensorgroup_idempotent_resource_key_n9k(self):
- # TMS sensorgroup config is present resource key only.
- self.execute_show_command.return_value = load_fixture('nxos_telemetry', 'N9K.cfg')
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': '55'}
- ], 'sensor_groups')
- set_module_args(args, ignore_provider_arg)
- self.execute_module(changed=False)
-
- def test_tms_sensorgroup_present_path_environment_n9k(self):
- # TMS sensorgroup config is not present.
- # Path name 'environment' test
- self.execute_show_command.return_value = None
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': '77',
- 'data_source': 'YANG',
- 'path': {'name': 'environment'},
- },
- ], 'sensor_groups')
- set_module_args(args, ignore_provider_arg)
- self.execute_module(changed=True, commands=[
- 'feature telemetry',
- 'telemetry',
- 'sensor-group 77',
- 'data-source YANG',
- 'path environment',
- ])
-
- def test_tms_sensorgroup_present_path_interface_n9k(self):
- # TMS sensorgroup config is not present.
- # Path name 'interface' test
- self.execute_show_command.return_value = None
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': '77',
- 'data_source': 'NATIVE',
- 'path': {'name': 'interface'},
- },
- ], 'sensor_groups')
- set_module_args(args, ignore_provider_arg)
- self.execute_module(changed=True, commands=[
- 'feature telemetry',
- 'telemetry',
- 'sensor-group 77',
- 'data-source NATIVE',
- 'path interface',
- ])
-
- def test_tms_sensorgroup_present_path_interface_n9k(self):
- # TMS sensorgroup config is not present.
- # Path name 'resources' test
- self.execute_show_command.return_value = None
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': '77',
- 'data_source': 'NX-API',
- 'path': {'name': 'resources'},
- },
- ], 'sensor_groups')
- set_module_args(args, ignore_provider_arg)
- self.execute_module(changed=True, commands=[
- 'feature telemetry',
- 'telemetry',
- 'sensor-group 77',
- 'data-source NX-API',
- 'path resources',
- ])
-
- # ---------------------------------
- # Telemetry Subscription Test Cases
- # ---------------------------------
-
- def test_tms_subscription_merged_n9k(self):
- # TMS subscription config is not present.
- self.execute_show_command.return_value = None
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': 5,
- 'destination_group': 55,
- 'sensor_group': {'id': 1, 'sample_interval': 1000},
- },
- {'id': 88,
- 'destination_group': 3,
- 'sensor_group': {'id': 4, 'sample_interval': 2000},
- },
- ], 'subscriptions')
- set_module_args(args, ignore_provider_arg)
- self.execute_module(changed=True, commands=[
- 'feature telemetry',
- 'telemetry',
- 'subscription 5',
- 'dst-grp 55',
- 'snsr-grp 1 sample-interval 1000',
- 'subscription 88',
- 'dst-grp 3',
- 'snsr-grp 4 sample-interval 2000'
- ])
-
- def test_tms_subscription_merged_idempotent_n9k(self):
- # TMS subscription config is not present.
- self.execute_show_command.return_value = load_fixture('nxos_telemetry', 'N9K.cfg')
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': 3,
- },
- {'id': 7,
- 'destination_group': 10,
- 'sensor_group': {'id': 2, 'sample_interval': 1000},
- },
- {'id': 5,
- 'destination_group': 2,
- 'sensor_group': {'id': 2, 'sample_interval': 1000},
- },
- ], 'subscriptions')
- set_module_args(args, ignore_provider_arg)
- self.execute_module(changed=False)
-
- def test_tms_subscription_merged_change1_n9k(self):
- # TMS subscription config present.
- # Change sample interval for sensor group 2
- self.execute_show_command.return_value = load_fixture('nxos_telemetry', 'N9K.cfg')
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': 3,
- },
- {'id': 7,
- 'destination_group': 10,
- 'sensor_group': {'id': 2, 'sample_interval': 3000},
- },
- {'id': 5,
- 'destination_group': 2,
- 'sensor_group': {'id': 2, 'sample_interval': 1000},
- },
- ], 'subscriptions')
- set_module_args(args, ignore_provider_arg)
- self.execute_module(changed=True, commands=[
- 'telemetry',
- 'subscription 7',
- 'snsr-grp 2 sample-interval 3000'
- ])
-
- def test_tms_subscription_add_n9k(self):
- # TMS subscription config present.
- # Add new destination_group and sensor_group to subscription 5
- self.execute_show_command.return_value = load_fixture('nxos_telemetry', 'N9K.cfg')
- self.get_platform_shortname.return_value = 'N9K'
- args = build_args([
- {'id': 3,
- },
- {'id': 7,
- 'destination_group': 10,
- 'sensor_group': {'id': 2, 'sample_interval': 1000},
- },
- {'id': 5,
- 'destination_group': 2,
- 'sensor_group': {'id': 2, 'sample_interval': 1000},
- },
- {'id': 5,
- 'destination_group': 7,
- 'sensor_group': {'id': 2, 'sample_interval': 1000},
- },
- {'id': 5,
- 'destination_group': 8,
- 'sensor_group': {'id': 9, 'sample_interval': 1000},
- },
- {'id': 5,
- 'destination_group': 9,
- 'sensor_group': {'id': 10, 'sample_interval': 1000},
- },
- ], 'subscriptions')
- set_module_args(args, ignore_provider_arg)
- self.execute_module(changed=True, commands=[
- 'telemetry',
- 'subscription 5',
- 'dst-grp 7',
- 'dst-grp 8',
- 'dst-grp 9',
- 'snsr-grp 9 sample-interval 1000',
- 'snsr-grp 10 sample-interval 1000'
- ])
-
- def test_telemetry_full_n9k(self):
- # Assumes feature telemetry is disabled
- # TMS global config is not present.
- self.execute_show_command.return_value = None
- self.get_platform_shortname.return_value = 'N9K'
- set_module_args({
- 'state': 'merged',
- 'config': {
- 'certificate': {'key': '/bootflash/sample.key', 'hostname': 'server.example.com'},
- 'compression': 'gzip',
- 'source_interface': 'Ethernet2/1',
- 'vrf': 'blue',
- 'destination_groups': [
- {'id': '88',
- 'destination': {'ip': '192.168.1.1', 'port': '5001', 'protocol': 'GRPC', 'encoding': 'GPB'},
- },
- {'id': '88',
- 'destination': {'ip': '192.168.1.2', 'port': '6001', 'protocol': 'GRPC', 'encoding': 'GPB'},
- },
- {'id': '99',
- 'destination': {'ip': '192.168.1.2', 'port': '6001', 'protocol': 'GRPC', 'encoding': 'GPB'},
- },
- {'id': '99',
- 'destination': {'ip': '192.168.1.1', 'port': '5001', 'protocol': 'GRPC', 'encoding': 'GPB'},
- },
- ],
- 'sensor_groups': [
- {'id': '77',
- 'data_source': 'DME',
- 'path': {'name': 'sys/bgp', 'depth': 0, 'query_condition': 'query_condition_xyz', 'filter_condition': 'filter_condition_xyz'},
- },
- {'id': '99',
- 'data_source': 'DME',
- 'path': {'name': 'sys/bgp', 'depth': 0, 'query_condition': 'query_condition_xyz', 'filter_condition': 'filter_condition_xyz'},
- },
- ],
- 'subscriptions': [
- {'id': 5,
- 'destination_group': 88,
- 'sensor_group': {'id': 77, 'sample_interval': 1000},
- },
- {'id': 5,
- 'destination_group': 99,
- 'sensor_group': {'id': 77, 'sample_interval': 1000},
- },
- {'id': 88,
- 'destination_group': 99,
- 'sensor_group': {'id': 99, 'sample_interval': 2000},
- },
- ],
- }
- }, ignore_provider_arg)
- self.execute_module(changed=True, commands=[
- 'feature telemetry',
- 'telemetry',
- 'certificate /bootflash/sample.key server.example.com',
- 'destination-profile',
- 'use-compression gzip',
- 'source-interface Ethernet2/1',
- 'use-vrf blue',
- 'destination-group 88',
- 'ip address 192.168.1.1 port 5001 protocol grpc encoding gpb',
- 'ip address 192.168.1.2 port 6001 protocol grpc encoding gpb',
- 'destination-group 99',
- 'ip address 192.168.1.2 port 6001 protocol grpc encoding gpb',
- 'ip address 192.168.1.1 port 5001 protocol grpc encoding gpb',
- 'sensor-group 77',
- 'data-source DME',
- 'path sys/bgp depth 0 query-condition query_condition_xyz filter-condition filter_condition_xyz',
- 'sensor-group 99',
- 'data-source DME',
- 'path sys/bgp depth 0 query-condition query_condition_xyz filter-condition filter_condition_xyz',
- 'subscription 5',
- 'dst-grp 88',
- 'dst-grp 99',
- 'snsr-grp 77 sample-interval 1000',
- 'subscription 88',
- 'dst-grp 99',
- 'snsr-grp 99 sample-interval 2000'
- ])
-
- def test_telemetry_deleted_input_validation_n9k(self):
- # State is 'deleted' and 'config' key present.
- self.execute_show_command.return_value = load_fixture('nxos_telemetry', 'N9K.cfg')
- self.get_platform_shortname.return_value = 'N9K'
- set_module_args(dict(
- state='deleted',
- config=dict(
- certificate={'key': '/bootflash/server.key', 'hostname': 'localhost'},
- compression='gzip',
- source_interface='loopback55',
- vrf='management',
- )
- ), ignore_provider_arg)
- with pytest.raises(AnsibleFailJson) as errinfo:
- self.execute_module()
- testdata = errinfo.value.args[0]
- assert 'Remove config key from playbook when state is <deleted>' in str(testdata['msg'])
- assert testdata['failed']
-
- def test_telemetry_deleted_n9k(self):
- # Assumes feature telemetry is enabled
- # TMS global config is present.
- # Make absent with all playbook keys provided
- self.execute_show_command.return_value = load_fixture('nxos_telemetry', 'N9K.cfg')
- self.get_platform_shortname.return_value = 'N9K'
- set_module_args(dict(
- state='deleted',
- ), ignore_provider_arg)
- self.execute_module(changed=True, commands=['no telemetry'])
-
- def test_telemetry_deleted_idempotent_n9k(self):
- # Assumes feature telemetry is enabled
- # TMS global config is present.
- # Make absent with all playbook keys provided
- self.execute_show_command.return_value = None
- self.get_platform_shortname.return_value = 'N9K'
- set_module_args(dict(
- state='deleted',
- ), ignore_provider_arg)
- self.execute_module(changed=False)
-
- def test_tms_replaced1_n9k(self):
- # Assumes feature telemetry is enabled
- # Modify global config and remove everything else
- self.execute_show_command.return_value = load_fixture('nxos_telemetry', 'N9K.cfg')
- self.get_platform_shortname.return_value = 'N9K'
- set_module_args(dict(
- state='replaced',
- config=dict(
- certificate={'key': '/bootflash/sample.key', 'hostname': 'server.example.com'},
- compression='gzip',
- vrf='blue',
- )
- ), ignore_provider_arg)
- self.execute_module(changed=True, commands=[
- 'telemetry',
- 'no subscription 3',
- 'no subscription 4',
- 'no subscription 5',
- 'no subscription 6',
- 'no subscription 7',
- 'no sensor-group 2',
- 'no sensor-group 55',
- 'no sensor-group 56',
- 'no destination-group 2',
- 'no destination-group 10',
- 'certificate /bootflash/sample.key server.example.com',
- 'destination-profile',
- 'no source-interface loopback55',
- 'use-vrf blue'
- ])
-
- def test_tms_replaced2_n9k(self):
- # Assumes feature telemetry is enabled
- # Remove/default all global config
- # Modify destination-group 10, add 11 and 99, remove 2
- # Modify sensor-group 55, 56
- # remove all subscriptions
- self.execute_show_command.return_value = load_fixture('nxos_telemetry', 'N9K.cfg')
- self.get_platform_shortname.return_value = 'N9K'
- set_module_args({
- 'state': 'replaced',
- 'config': {
- 'destination_groups': [
- {'id': 10,
- 'destination': {'ip': '192.168.1.1', 'port': '5001', 'protocol': 'GRPC', 'encoding': 'GPB'},
- },
- {'id': 11,
- 'destination': {'ip': '192.168.1.2', 'port': '6001', 'protocol': 'GRPC', 'encoding': 'GPB'},
- },
- {'id': 99,
- 'destination': {'ip': '192.168.1.2', 'port': '6001', 'protocol': 'GRPC', 'encoding': 'GPB'},
- },
- {'id': '99',
- 'destination': {'ip': '192.168.1.1', 'port': '5001', 'protocol': 'GRPC', 'encoding': 'GPB'},
- },
- ],
- 'sensor_groups': [
- {'id': 55,
- 'data_source': 'NX-API',
- 'path': {'name': 'sys/bgp', 'depth': 0, 'query_condition': 'query_condition_xyz', 'filter_condition': 'filter_condition_xyz'},
- },
- {'id': '56',
- 'data_source': 'NX-API',
- 'path': {'name': 'sys/bgp', 'depth': 0, 'query_condition': 'query_condition_xyz', 'filter_condition': 'filter_condition_xyz'},
- },
- ],
- }
- }, ignore_provider_arg)
- self.execute_module(changed=True, commands=[
- 'telemetry',
- 'no subscription 3',
- 'no subscription 5',
- 'no subscription 4',
- 'no subscription 7',
- 'no subscription 6',
- 'sensor-group 56',
- 'no data-source DME',
- 'no path environment',
- 'no path interface',
- 'no path resources',
- 'no path vxlan',
- 'no sensor-group 2',
- 'destination-group 10',
- 'no ip address 192.168.0.1 port 50001 protocol grpc encoding gpb',
- 'no ip address 192.168.0.2 port 60001 protocol grpc encoding gpb',
- 'no destination-group 2',
- 'destination-group 11',
- 'ip address 192.168.1.2 port 6001 protocol grpc encoding gpb',
- 'destination-group 10',
- 'ip address 192.168.1.1 port 5001 protocol grpc encoding gpb',
- 'destination-group 99',
- 'ip address 192.168.1.2 port 6001 protocol grpc encoding gpb',
- 'ip address 192.168.1.1 port 5001 protocol grpc encoding gpb',
- 'sensor-group 55',
- 'data-source NX-API',
- 'path sys/bgp depth 0 query-condition query_condition_xyz filter-condition filter_condition_xyz',
- 'sensor-group 56',
- 'data-source NX-API',
- 'path sys/bgp depth 0 query-condition query_condition_xyz filter-condition filter_condition_xyz',
- 'no certificate /bootflash/server.key localhost',
- 'no destination-profile'
- ])
-
- def test_tms_replaced3_n9k(self):
- # Assumes feature telemetry is enabled
- # Modify vrf global config, remove default all other global config.
- # destination-group 2 destination '192.168.0.1' idempotent
- # destination-group 2 destination '192.168.0.2' remove
- # remove all other destination-groups
- # Modify sensor-group 55 and delete all others
- # Modify subscription 7, add 10 and delete all others
- self.execute_show_command.return_value = load_fixture('nxos_telemetry', 'N9K.cfg')
- self.get_platform_shortname.return_value = 'N9K'
- set_module_args({
- 'state': 'replaced',
- 'config': {
- 'vrf': 'blue',
- 'destination_groups': [
- {'id': 2,
- 'destination': {'ip': '192.168.0.1', 'port': 50001, 'protocol': 'GRPC', 'encoding': 'GPB'},
- },
- ],
- 'sensor_groups': [
- {'id': 55,
- 'data_source': 'NX-API',
- 'path': {'name': 'sys/bgp', 'depth': 0, 'query_condition': 'query_condition_xyz', 'filter_condition': 'filter_condition_xyz'},
- },
- ],
- 'subscriptions': [
- {'id': 7,
- 'destination_group': 10,
- 'sensor_group': {'id': 55, 'sample_interval': 1000},
- },
- {'id': 10,
- 'destination_group': 2,
- 'sensor_group': {'id': 55, 'sample_interval': 1000},
- },
- ],
- }
- }, ignore_provider_arg)
- self.execute_module(changed=True, commands=[
- 'telemetry',
- 'no subscription 3',
- 'no subscription 5',
- 'no subscription 4',
- 'subscription 7',
- 'no snsr-grp 2 sample-interval 1000',
- 'no subscription 6',
- 'no sensor-group 56',
- 'no sensor-group 2',
- 'no destination-group 10',
- 'destination-group 2',
- 'no ip address 192.168.0.2 port 60001 protocol grpc encoding gpb',
- 'sensor-group 55',
- 'data-source NX-API',
- 'path sys/bgp depth 0 query-condition query_condition_xyz filter-condition filter_condition_xyz',
- 'subscription 10',
- 'dst-grp 2',
- 'snsr-grp 55 sample-interval 1000',
- 'subscription 7',
- 'snsr-grp 55 sample-interval 1000',
- 'no certificate /bootflash/server.key localhost',
- 'destination-profile',
- 'no use-compression gzip',
- 'no source-interface loopback55',
- 'use-vrf blue'
- ])
-
- def test_tms_replaced_idempotent_n9k(self):
- # Assumes feature telemetry is enabled
- # Modify vrf global config, remove default all other global config.
- # destination-group 2 destination '192.168.0.1' idempotent
- # destination-group 2 destination '192.168.0.2' remove
- # remove all other destination-groups
- # Modify sensor-group 55 and delete all others
- # Modify subscription 7, add 10 and delete all others
- self.execute_show_command.return_value = load_fixture('nxos_telemetry', 'N9K.cfg')
- self.get_platform_shortname.return_value = 'N9K'
- set_module_args({
- 'state': 'replaced',
- 'config': {
- 'certificate': {'key': '/bootflash/server.key', 'hostname': 'localhost'},
- 'compression': 'gzip',
- 'vrf': 'management',
- 'source_interface': 'loopback55',
- 'destination_groups': [
- {'id': 2,
- 'destination': {'ip': '192.168.0.1', 'port': 50001, 'protocol': 'GRPC', 'encoding': 'GPB'},
- },
- {'id': 2,
- 'destination': {'ip': '192.168.0.2', 'port': 60001, 'protocol': 'GRPC', 'encoding': 'GPB'},
- },
- {'id': 10,
- 'destination': {'ip': '192.168.0.1', 'port': 50001, 'protocol': 'GRPC', 'encoding': 'GPB'},
- },
- {'id': 10,
- 'destination': {'ip': '192.168.0.2', 'port': 60001, 'protocol': 'GRPC', 'encoding': 'GPB'},
- },
- ],
- 'sensor_groups': [
- {'id': 2,
- 'data_source': 'DME',
- 'path': {'name': 'boo', 'depth': 0},
- },
- {'id': 2,
- 'path': {'name': 'sys/ospf', 'depth': 0, 'query_condition': 'qc', 'filter_condition': 'fc'},
- },
- {'id': 2,
- 'path': {'name': 'interfaces', 'depth': 0},
- },
- {'id': 2,
- 'path': {'name': 'sys/bgp'},
- },
- {'id': 2,
- 'path': {'name': 'sys/bgp/inst', 'depth': 0, 'query_condition': 'foo', 'filter_condition': 'foo'},
- },
- {'id': 2,
- 'path': {'name': 'sys/bgp/inst/dom-default/peer-[10.10.10.11]/ent-[10.10.10.11]'},
- },
- {'id': 2,
- 'path': {'name': 'sys/bgp/inst/dom-default/peer-[20.20.20.11]/ent-[20.20.20.11]'},
- },
- {'id': 2,
- 'path': {'name': 'too', 'depth': 0, 'filter_condition': 'foo'},
- },
- {'id': 55},
- {'id': 56,
- 'data_source': 'DME',
- },
- {'id': 56,
- 'path': {'name': 'environment'},
- },
- {'id': 56,
- 'path': {'name': 'interface'},
- },
- {'id': 56,
- 'path': {'name': 'resources'},
- },
- {'id': 56,
- 'path': {'name': 'vxlan'},
- },
- ],
- 'subscriptions': [
- {'id': 3},
- {'id': 4,
- 'destination_group': 2,
- 'sensor_group': {'id': 2, 'sample_interval': 1000},
- },
- {'id': 5,
- 'destination_group': 2,
- },
- {'id': 5,
- 'sensor_group': {'id': 2, 'sample_interval': 1000},
- },
- {'id': 6,
- 'destination_group': 10,
- },
- {'id': 7,
- 'destination_group': 10,
- 'sensor_group': {'id': 2, 'sample_interval': 1000},
- },
- ],
- }
- }, ignore_provider_arg)
- self.execute_module(changed=False, commands=[])
-
-
-def build_args(data, type, state=None, check_mode=None):
- if state is None:
- state = 'merged'
- if check_mode is None:
- check_mode = False
- args = {
- 'state': state,
- '_ansible_check_mode': check_mode,
- 'config': {
- type: data
- }
- }
- return args
diff --git a/test/units/modules/network/nxos/test_nxos_vlan.py b/test/units/modules/network/nxos/test_nxos_vlan.py
deleted file mode 100644
index 30c9f076f5..0000000000
--- a/test/units/modules/network/nxos/test_nxos_vlan.py
+++ /dev/null
@@ -1,181 +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.nxos import _nxos_vlan
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosVlanModule(TestNxosModule):
-
- module = _nxos_vlan
-
- def setUp(self):
- super(TestNxosVlanModule, self).setUp()
-
- self.mock_run_commands = patch('ansible.modules.network.nxos._nxos_vlan.run_commands')
- self.run_commands = self.mock_run_commands.start()
-
- self.mock_load_config = patch('ansible.modules.network.nxos._nxos_vlan.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_get_config = patch('ansible.modules.network.nxos._nxos_vlan.get_config')
- self.get_config = self.mock_get_config.start()
-
- self.mock_get_capabilities = patch('ansible.modules.network.nxos._nxos_vlan.get_capabilities')
- self.get_capabilities = self.mock_get_capabilities.start()
- self.get_capabilities.return_value = {'device_info': {'network_os_platform': 'N9K-9000v'}, 'network_api': 'cliconf'}
-
- def tearDown(self):
- super(TestNxosVlanModule, self).tearDown()
- self.mock_run_commands.stop()
- self.mock_load_config.stop()
- self.mock_get_config.stop()
- self.mock_get_capabilities.stop()
-
- def load_fixtures(self, commands=None, device=''):
- def load_from_file(*args, **kwargs):
- module, commands = args
- output = list()
-
- for item in commands:
- try:
- obj = json.loads(item)
- command = obj['command']
- except ValueError:
- command = item
- filename = '%s.txt' % str(command).split(' | ')[0].replace(' ', '_')
- output.append(load_fixture('nxos_vlan', filename))
- return output
-
- def agg_load_from_file(*args, **kwargs):
- """Load vlan output for aggregate/purge tests"""
- return([load_fixture('nxos_vlan', 'agg_show_vlan_brief.txt')])
-
- if '_agg_' in self._testMethodName:
- self.run_commands.side_effect = agg_load_from_file
- else:
- self.run_commands.side_effect = load_from_file
-
- self.load_config.return_value = None
- self.get_config.return_value = load_fixture('nxos_vlan', 'config.cfg')
-
- def test_nxos_vlan_agg_1(self):
- # Aggregate: vlan 4/5 exist -> Add 6
- set_module_args(dict(aggregate=[
- {'name': '_5_', 'vlan_id': 5},
- {'name': '_6_', 'vlan_id': 6}
- ]))
- self.execute_module(changed=True, commands=[
- 'vlan 6',
- 'name _6_',
- 'state active',
- 'no shutdown',
- 'exit'
- ])
-
- def test_nxos_vlan_agg_2(self):
- # Aggregate: vlan 4/5 exist -> Add none (idempotence)
- set_module_args(dict(aggregate=[
- {'name': '_5_', 'vlan_id': 5},
- {'name': '_4_', 'vlan_id': 4}
- ]))
- self.execute_module(changed=False)
-
- def test_nxos_vlan_agg_3(self):
- # Aggregate/Purge: vlan 4/5 exist -> Add 6, Purge 4
- set_module_args(dict(aggregate=[
- {'name': '_5_', 'vlan_id': 5},
- {'name': '_6_', 'vlan_id': 6}
- ], purge=True))
- self.execute_module(changed=True, commands=[
- 'vlan 6',
- 'name _6_',
- 'state active',
- 'no shutdown',
- 'exit',
- 'no vlan 4'
- ])
-
- def test_nxos_vlan_agg_4(self):
- # Aggregate/Purge: vlan 4/5 exist -> Purge None (idempotence)
- set_module_args(dict(aggregate=[
- {'name': '_5_', 'vlan_id': 5},
- {'name': '_4_', 'vlan_id': 4}
- ]))
- self.execute_module(changed=False)
-
- def test_nxos_vlan_agg_5(self):
- # Purge with Single Vlan: vlan 4/5 exist -> Add 6, Purge 4/5
- set_module_args(dict(vlan_id=6, name='_6_', purge=True))
- self.execute_module(changed=True, commands=[
- 'vlan 6',
- 'name _6_',
- 'state active',
- 'no shutdown',
- 'exit',
- 'no vlan 4',
- 'no vlan 5'
- ])
-
- def test_nxos_vlan_agg_6(self):
- # Purge All: vlan 4/5 exist -> Purge 4/5
- set_module_args(dict(vlan_id=1, purge=True))
- self.execute_module(changed=True, commands=[
- 'no vlan 4',
- 'no vlan 5'
- ])
-
- def test_nxos_vlan_range(self):
- set_module_args(dict(vlan_range='6-10'))
- self.execute_module(changed=True, commands=['vlan 6', 'vlan 7', 'vlan 8', 'vlan 9', 'vlan 10'])
-
- def test_nxos_vlan_range_absent(self):
- set_module_args(dict(vlan_range='1-5', state='absent'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['no vlan 1'])
-
- def test_nxos_vlan_id(self):
- set_module_args(dict(vlan_id='15', state='present'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['vlan 15', 'state active', 'no shutdown', 'exit'])
-
- def test_nxos_vlan_id_absent(self):
- set_module_args(dict(vlan_id='1', state='absent'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['no vlan 1'])
-
- def test_nxos_vlan_named_vlan(self):
- set_module_args(dict(vlan_id='15', name='WEB'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['vlan 15', 'name WEB', 'state active', 'no shutdown', 'exit'])
-
- def test_nxos_vlan_shut_down(self):
- set_module_args(dict(vlan_id='1', admin_state='down'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['vlan 1', 'shutdown', 'exit'])
-
- def test_nxos_vlan_no_change(self):
- set_module_args(dict(vlan_id='1', name='default', vlan_state='active', admin_state='up'))
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
diff --git a/test/units/modules/network/nxos/test_nxos_vlans.py b/test/units/modules/network/nxos/test_nxos_vlans.py
deleted file mode 100644
index b8939c668d..0000000000
--- a/test/units/modules/network/nxos/test_nxos_vlans.py
+++ /dev/null
@@ -1,210 +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/>.
-
-# Make coding more python3-ish
-from __future__ import (absolute_import, division, print_function)
-__metaclass__ = type
-
-from textwrap import dedent
-from units.compat.mock import patch
-from units.modules.utils import AnsibleFailJson
-from ansible.modules.network.nxos import nxos_vlans
-from ansible.module_utils.network.nxos.config.vlans.vlans import Vlans
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-ignore_provider_arg = True
-
-
-class TestNxosVlansModule(TestNxosModule):
-
- module = nxos_vlans
-
- def setUp(self):
- super(TestNxosVlansModule, self).setUp()
-
- self.mock_FACT_LEGACY_SUBSETS = patch('ansible.module_utils.network.nxos.facts.facts.FACT_LEGACY_SUBSETS')
- self.FACT_LEGACY_SUBSETS = self.mock_FACT_LEGACY_SUBSETS.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.nxos.config.vlans.vlans.Vlans.edit_config')
- self.edit_config = self.mock_edit_config.start()
-
- self.mock_get_device_data = patch('ansible.module_utils.network.nxos.facts.vlans.vlans.VlansFacts.get_device_data')
- self.get_device_data = self.mock_get_device_data.start()
-
- def tearDown(self):
- super(TestNxosVlansModule, self).tearDown()
- self.mock_FACT_LEGACY_SUBSETS.stop()
- self.mock_get_resource_connection_config.stop()
- self.mock_get_resource_connection_facts.stop()
- self.mock_edit_config.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.mock_FACT_LEGACY_SUBSETS.return_value = dict()
- self.edit_config.return_value = None
-
- def load_from_file(*args, **kwargs):
- cmd = args[1]
- filename = str(cmd).split(' | ')[0].replace(' ', '_')
- return load_fixture('nxos_vlans', filename)
-
- def load_from_file_no_facts(*args, **kwargs):
- cmd = args[1]
- filename = str(cmd).split(' | ')[0].replace(' ', '_')
- filename += '_no_facts'
- return load_fixture('nxos_vlans', filename)
-
- def load_from_file_vlan_1(*args, **kwargs):
- cmd = args[1]
- filename = str(cmd).split(' | ')[0].replace(' ', '_')
- filename += '_vlan_1'
- return load_fixture('nxos_vlans', filename)
-
- if device == '':
- self.get_device_data.side_effect = load_from_file
- elif device == '_no_facts':
- self.get_device_data.side_effect = load_from_file_no_facts
- elif device == '_vlan_1':
- self.get_device_data.side_effect = load_from_file_vlan_1
-
- def test_1(self):
- '''
- **NOTE** This config is for reference only! See fixtures files for real data.
- vlan 1,3-5,8
- vlan 3
- name test-vlan3
- !Note:vlan 4 is present with default settings
- vlan 5
- shutdown
- name test-changeme
- mode fabricpath
- state suspend
- vn-segment 942
- !Note:vlan 7 is not present
- vlan 8
- shutdown
- name test-changeme-not
- state suspend
- '''
- playbook = dict(config=[
- dict(vlan_id=4),
- dict(vlan_id=5, mapped_vni=555, mode='ce'),
- dict(vlan_id=7, mapped_vni=777, name='test-vlan7', enabled=False),
- dict(vlan_id='8', state='active', name='test-changeme-not')
- # vlan 3 is not present in playbook.
- ])
-
- merged = [
- # Update existing device states with any differences in the playbook.
- 'vlan 5', 'vn-segment 555', 'mode ce',
- 'vlan 7', 'vn-segment 777', 'name test-vlan7', 'shutdown',
- 'vlan 8', 'state active'
- ]
- playbook['state'] = 'merged'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=merged)
-
- deleted = [
- # Reset existing device state to default values. Scope is limited to
- # objects in the play when the 'config' key is specified. For vlans
- # this means deleting each vlan listed in the playbook and ignoring
- # any play attrs other than 'vlan_id'.
- 'no vlan 4',
- 'no vlan 5',
- 'no vlan 8'
- ]
- playbook['state'] = 'deleted'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=deleted)
-
- overridden = [
- # The play is the source of truth. Similar to replaced but the scope
- # includes all objects on the device; i.e. it will also reset state
- # on objects not found in the play.
- 'no vlan 3',
- 'vlan 5', 'mode ce', 'vn-segment 555', 'no state', 'no shutdown', 'no name',
- 'vlan 8', 'no shutdown', 'state active',
- 'vlan 7', 'name test-vlan7', 'shutdown', 'vn-segment 777'
- ]
- playbook['state'] = 'overridden'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=overridden)
-
- replaced = [
- # Scope is limited to objects in the play.
- # replaced should ignore existing vlan 3.
- 'vlan 5', 'mode ce', 'vn-segment 555', 'no state', 'no shutdown', 'no name',
- 'vlan 7', 'shutdown', 'name test-vlan7', 'vn-segment 777',
- 'vlan 8', 'no shutdown', 'state active'
- ]
- playbook['state'] = 'replaced'
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=replaced)
-
- def test_2(self):
- # vlan 1 in playbook should raise
- playbook = dict(config=[dict(vlan_id=1)], state='merged')
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(failed=True)
-
- def test_3(self):
- # Test when no 'config' key is used in playbook.
- deleted = [
- # Reset existing device state for all vlans found on device other than vlan 1.
- 'no vlan 3',
- 'no vlan 4',
- 'no vlan 5',
- 'no vlan 8'
- ]
- playbook = dict(state='deleted')
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=deleted)
-
- for test_state in ['merged', 'replaced', 'overridden']:
- set_module_args(dict(state=test_state), ignore_provider_arg)
- self.execute_module(failed=True)
-
- def test_4(self):
- # Test only vlan 1 found
- playbook = dict(state='deleted')
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(device='_vlan_1', changed=False)
-
- def test_5(self):
- # Test no facts returned
- playbook = dict(state='deleted')
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(device='_no_facts', changed=False)
-
- def test_6(self):
- # Misc tests to hit codepaths highlighted by code coverage tool as missed.
- playbook = dict(config=[
- dict(vlan_id=8, enabled=True)
- ])
- replaced = [
- # Update existing device states with any differences in the playbook.
- 'vlan 8', 'no shutdown', 'no state', 'no name'
- ]
- playbook['state'] = 'replaced'
- playbook['_ansible_check_mode'] = True
- set_module_args(playbook, ignore_provider_arg)
- self.execute_module(changed=True, commands=replaced)
diff --git a/test/units/modules/network/nxos/test_nxos_vpc.py b/test/units/modules/network/nxos/test_nxos_vpc.py
deleted file mode 100644
index a65d14a6d0..0000000000
--- a/test/units/modules/network/nxos/test_nxos_vpc.py
+++ /dev/null
@@ -1,182 +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.nxos import nxos_vpc
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosVpcModule(TestNxosModule):
-
- module = nxos_vpc
-
- def setUp(self):
- super(TestNxosVpcModule, self).setUp()
-
- self.mock_get_config = patch('ansible.modules.network.nxos.nxos_vpc.get_config')
- self.get_config = self.mock_get_config.start()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_vpc.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_run_commands = patch('ansible.modules.network.nxos.nxos_vpc.run_commands')
- self.run_commands = self.mock_run_commands.start()
-
- def tearDown(self):
- super(TestNxosVpcModule, self).tearDown()
- self.mock_get_config.stop()
- self.mock_load_config.stop()
- self.mock_run_commands.stop()
-
- def load_fixtures(self, commands=None, device=''):
- def load_from_file(*args, **kwargs):
- module, commands = args
- output = list()
-
- for command in commands:
- filename = str(command).split(' | ')[0].replace(' ', '_')
- output.append(load_fixture('nxos_vpc', filename))
- return output
-
- def vrf_load_from_file(*args, **kwargs):
- """Load vpc output for vrf tests"""
- module, commands = args
- output = list()
- for command in commands:
- filename = 'vrf_test_' + str(command).split(' | ')[0].replace(' ', '_')
- output.append(load_fixture('nxos_vpc', filename))
- return output
-
- self.load_config.return_value = None
- if device == '_vrf_test':
- self.run_commands.side_effect = vrf_load_from_file
- else:
- self.run_commands.side_effect = load_from_file
-
- def test_nxos_vpc_present(self):
- set_module_args(dict(domain=100, role_priority=32667, system_priority=2000,
- pkl_dest='192.168.100.4', pkl_src='10.1.100.20',
- peer_gw=True, auto_recovery=True))
- self.execute_module(changed=True, commands=[
- 'vpc domain 100', 'terminal dont-ask', 'role priority 32667', 'system-priority 2000',
- 'peer-keepalive destination 192.168.100.4 source 10.1.100.20',
- 'peer-gateway', 'auto-recovery',
- ])
-
- def test_nxos_vpc_vrf_1(self):
- # No vrf -> vrf 'default'
- set_module_args(dict(
- domain=100,
- pkl_dest='192.168.1.1',
- pkl_src='10.1.1.1',
- pkl_vrf='default',
- ))
- self.execute_module(changed=True, commands=[
- 'vpc domain 100',
- 'peer-keepalive destination 192.168.1.1 source 10.1.1.1 vrf default'
- ])
-
- def test_nxos_vpc_vrf_2(self):
- # vrf 'my_vrf'-> vrf 'test-vrf'
- # All pkl commands should be present
- self.get_config.return_value = load_fixture('nxos_vpc', 'vrf_test_vpc_config')
- set_module_args(dict(
- domain=100,
- pkl_dest='192.168.1.1',
- pkl_src='10.1.1.1',
- pkl_vrf='test-vrf',
- ))
- self.execute_module(changed=True, device='_vrf_test', commands=[
- 'vpc domain 100',
- 'peer-keepalive destination 192.168.1.1 source 10.1.1.1 vrf test-vrf'
- ])
-
- def test_nxos_vpc_vrf_3(self):
- # vrf 'my_vrf' -> vrf 'obviously-different-vrf'
- # Existing pkl_src should be retained even though playbook does not specify it
- self.get_config.return_value = load_fixture('nxos_vpc', 'vrf_test_vpc_config')
- set_module_args(dict(
- domain=100,
- pkl_dest='192.168.1.1',
- pkl_vrf='obviously-different-vrf'
- ))
- self.execute_module(changed=True, device='_vrf_test', commands=[
- 'vpc domain 100',
- 'peer-keepalive destination 192.168.1.1 source 10.1.1.1 vrf obviously-different-vrf'
- ])
-
- def test_nxos_vpc_vrf_4(self):
- # vrf 'my_vrf'-> vrf 'management'
- # 'management' is the default value for vrf, it will not nvgen
- self.get_config.return_value = load_fixture('nxos_vpc', 'vrf_test_vpc_config')
- set_module_args(dict(
- domain=100,
- pkl_dest='192.168.1.1',
- pkl_vrf='management',
- ))
- self.execute_module(changed=True, device='_vrf_test', commands=[
- 'vpc domain 100',
- 'peer-keepalive destination 192.168.1.1 source 10.1.1.1 vrf management'
- ])
-
- def test_nxos_vpc_vrf_5(self):
- # vrf 'my_vrf' -> vrf 'my_vrf' (idempotence)
- self.get_config.return_value = load_fixture('nxos_vpc', 'vrf_test_vpc_config')
- set_module_args(dict(
- domain=100,
- pkl_dest='192.168.1.1',
- pkl_src='10.1.1.1',
- pkl_vrf='my_vrf',
- ))
- self.execute_module(changed=False, device='_vrf_test')
-
- def test_nxos_vpc_vrf_6(self):
- # vrf 'my_vrf' -> absent tests
- self.get_config.return_value = load_fixture('nxos_vpc', 'vrf_test_vpc_config')
- set_module_args(dict(
- domain=100,
- state='absent'
- ))
- self.execute_module(changed=True, device='_vrf_test', commands=[
- 'terminal dont-ask',
- 'no vpc domain 100',
- ])
-
- def test_nxos_vpc_vrf_7(self):
- # dest 192.168.1.1 source 10.1.1.1 vrf my_vrf -> (dest only) (idempotence)
- # pkl_src/pkl_vrf not in playbook but exists on device.
- self.get_config.return_value = load_fixture('nxos_vpc', 'vrf_test_vpc_config')
- set_module_args(dict(
- domain=100,
- pkl_dest='192.168.1.1',
- ))
- self.execute_module(changed=False, device='_vrf_test')
-
- def test_nxos_vpc_vrf_8(self):
- # dest 192.168.1.1 source 10.1.1.1 vrf my_vrf -> (optional vrf) (idempotence)
- # pkl_src not in playbook but exists on device.
- self.get_config.return_value = load_fixture('nxos_vpc', 'vrf_test_vpc_config')
- set_module_args(dict(
- domain=100,
- pkl_dest='192.168.1.1',
- pkl_vrf='my_vrf',
- ))
- self.execute_module(changed=False, device='_vrf_test')
diff --git a/test/units/modules/network/nxos/test_nxos_vpc_interface.py b/test/units/modules/network/nxos/test_nxos_vpc_interface.py
deleted file mode 100644
index d61dbbfc4f..0000000000
--- a/test/units/modules/network/nxos/test_nxos_vpc_interface.py
+++ /dev/null
@@ -1,69 +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.nxos import nxos_vpc_interface
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosVpcModule(TestNxosModule):
-
- module = nxos_vpc_interface
-
- def setUp(self):
- super(TestNxosVpcModule, self).setUp()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_vpc_interface.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_get_config = patch('ansible.modules.network.nxos.nxos_vpc_interface.get_config')
- self.get_config = self.mock_get_config.start()
-
- self.mock_run_commands = patch('ansible.modules.network.nxos.nxos_vpc_interface.run_commands')
- self.run_commands = self.mock_run_commands.start()
-
- def tearDown(self):
- super(TestNxosVpcModule, self).tearDown()
- self.mock_load_config.stop()
- self.mock_get_config.stop()
- self.mock_run_commands.stop()
-
- def load_fixtures(self, commands=None, device=''):
- def load_from_file(*args, **kwargs):
- module, commands = args
- output = list()
- for command in commands:
- filename = str(command).split(' | ')[0].replace(' ', '_')
- output.append(load_fixture('nxos_vpc_interface', filename))
- return output
-
- self.run_commands.side_effect = load_from_file
- self.load_config.return_value = None
-
- def test_nxos_vpc_interface_absent(self):
- set_module_args(dict(portchannel=10, vpc=100, state='absent'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['interface port-channel10', 'no vpc'])
-
- def test_nxos_vpc_interface_present(self):
- set_module_args(dict(portchannel=20, vpc=200, state='present'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['interface port-channel20', 'vpc 200'])
diff --git a/test/units/modules/network/nxos/test_nxos_vrf.py b/test/units/modules/network/nxos/test_nxos_vrf.py
deleted file mode 100644
index 6479a9f2ba..0000000000
--- a/test/units/modules/network/nxos/test_nxos_vrf.py
+++ /dev/null
@@ -1,79 +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.nxos import nxos_vrf
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosVrfModule(TestNxosModule):
-
- module = nxos_vrf
-
- def setUp(self):
- super(TestNxosVrfModule, self).setUp()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_vrf.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_run_commands = patch('ansible.modules.network.nxos.nxos_vrf.run_commands')
- self.run_commands = self.mock_run_commands.start()
-
- def tearDown(self):
- super(TestNxosVrfModule, self).tearDown()
- self.mock_load_config.stop()
- self.mock_run_commands.stop()
-
- def load_fixtures(self, commands=None, device=''):
- def load_from_file(*args, **kwargs):
- module, commands = args
- output = list()
-
- for command in commands:
- if isinstance(command, dict):
- command = command['command']
- filename = str(command).split(' | ')[0].replace(' ', '_')
- output.append(load_fixture('nxos_vrf', filename))
- return output
-
- self.load_config.return_value = None
- self.run_commands.side_effect = load_from_file
-
- def test_nxos_vrf_present(self):
- set_module_args(dict(vrf='ntc', state='present', admin_state='up'))
- self.execute_module(changed=True, commands=['vrf context ntc', 'no shutdown', 'exit'])
-
- def test_nxos_vrf_present_no_change(self):
- set_module_args(dict(vrf='management', state='present', admin_state='up'))
- self.execute_module(changed=False, commands=[])
-
- def test_nxos_vrf_absent(self):
- set_module_args(dict(vrf='management', state='absent'))
- self.execute_module(changed=True, commands=['no vrf context management'])
-
- def test_nxos_vrf_absent_no_change(self):
- set_module_args(dict(vrf='ntc', state='absent'))
- self.execute_module(changed=False, commands=[])
-
- def test_nxos_vrf_default(self):
- set_module_args(dict(vrf='default'))
- result = self.execute_module(failed=True)
- self.assertEqual(result['msg'], 'cannot use default as name of a VRF')
diff --git a/test/units/modules/network/nxos/test_nxos_vrf_af.py b/test/units/modules/network/nxos/test_nxos_vrf_af.py
deleted file mode 100644
index 296f5656bb..0000000000
--- a/test/units/modules/network/nxos/test_nxos_vrf_af.py
+++ /dev/null
@@ -1,791 +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.nxos import nxos_vrf_af
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosVrfafModule(TestNxosModule):
-
- module = nxos_vrf_af
-
- def setUp(self):
- super(TestNxosVrfafModule, self).setUp()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_vrf_af.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_get_config = patch('ansible.modules.network.nxos.nxos_vrf_af.get_config')
- self.get_config = self.mock_get_config.start()
-
- def tearDown(self):
- super(TestNxosVrfafModule, self).tearDown()
- self.mock_load_config.stop()
- self.mock_get_config.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.get_config.return_value = load_fixture('nxos_vrf_af', 'config.cfg')
- self.load_config.return_value = None
-
- def test_nxos_vrf_af_present_current_non_existing(self):
- set_module_args(dict(vrf='vrf0', afi='ipv4', state='present'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['vrf context vrf0',
- 'address-family ipv4 unicast'])
-
- def test_nxos_vrf_af_present_current_existing(self):
- set_module_args(dict(vrf='vrf1', afi='ipv4', state='present'))
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
-
- def test_nxos_vrf_af_absent_current_non_existing(self):
- set_module_args(dict(vrf='vrf0', afi='ipv4', state='absent'))
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
-
- def test_nxos_vrf_af_absent_current_existing(self):
- set_module_args(dict(vrf='vrf1', afi='ipv4', state='absent'))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['vrf context vrf1',
- 'no address-family ipv4 unicast'])
-
- def test_nxos_vrf_af_auto_evpn_route_target_present_current_existing(self):
- set_module_args(dict(vrf='vrf11', afi='ipv4', route_target_both_auto_evpn=True))
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
-
- def test_nxos_vrf_af_auto_evpn_route_target_present_current_non_existing(self):
- set_module_args(dict(vrf='vrf10', afi='ipv4', route_target_both_auto_evpn=True))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['vrf context vrf10',
- 'address-family ipv4 unicast',
- 'route-target both auto evpn'])
-
- def test_nxos_vrf_af_auto_evpn_route_target_absent_current_existing(self):
- set_module_args(dict(vrf='vrf11', afi='ipv4', route_target_both_auto_evpn=False))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['vrf context vrf11',
- 'address-family ipv4 unicast',
- 'no route-target both auto evpn'])
-
- def test_nxos_vrf_af_auto_evpn_route_target_absent_current_non_existing(self):
- set_module_args(dict(vrf='vrf1', afi='ipv4', route_target_both_auto_evpn=False))
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
-
- def test_nxos_vrf_af_route_target_import_present_current_non_existing(self):
- set_module_args(dict(vrf='vrf1',
- afi='ipv4',
- route_targets=[{"rt": "65000:1000",
- "direction": "import",
- "state": "present"}]))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['vrf context vrf1',
- 'address-family ipv4 unicast',
- 'route-target import 65000:1000'])
-
- def test_nxos_vrf_af_route_target_default_direction_present_current_non_existing(self):
- set_module_args(dict(vrf='vrf1',
- afi='ipv4',
- route_targets=[{"rt": "65000:1000",
- "state": "present"}]))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['vrf context vrf1',
- 'address-family ipv4 unicast',
- 'route-target import 65000:1000',
- 'route-target export 65000:1000'])
-
- def test_nxos_vrf_af_route_target_import_present_current_existing(self):
- set_module_args(dict(vrf='vrf21',
- afi='ipv4',
- route_targets=[{
- "rt": "65000:1000",
- "direction": "import",
- "state": "present"}
- ]))
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
-
- def test_nxos_vrf_af_route_target_default_direction_present_current_existing(self):
- set_module_args(dict(vrf='vrf21',
- afi='ipv4',
- route_targets=[{
- "rt": "65000:1000",
- "state": "present"}
- ]))
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
-
- def test_nxos_vrf_af_route_target_multi_import_present_current_non_existing(self):
- set_module_args(dict(vrf='vrf1',
- afi='ipv4',
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "import",
- "state": "present"
- },
- {
- "rt": "65001:1000",
- "direction": "import",
- "state": "present"
- },
- {
- "rt": "65002:1000",
- "direction": "import",
- "state": "present"
- }]))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['vrf context vrf1',
- 'address-family ipv4 unicast',
- 'route-target import 65000:1000',
- 'route-target import 65001:1000',
- 'route-target import 65002:1000'])
-
- def test_nxos_vrf_af_route_target_multi_import_present_current_existing(self):
- set_module_args(dict(vrf='vrf21',
- afi='ipv4',
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "import",
- "state": "present"
- },
- {
- "rt": "65001:1000",
- "direction": "import",
- "state": "present"
- },
- {
- "rt": "65002:1000",
- "direction": "import",
- "state": "present"
- }
- ]))
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
-
- def test_nxos_vrf_af_route_target_import_absent_current_non_existing(self):
- set_module_args(dict(vrf='vrf1',
- afi='ipv4',
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "import",
- "state": "absent"
- }
- ]))
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
-
- def test_nxos_vrf_af_route_target_import_absent_current_existing(self):
- set_module_args(dict(vrf='vrf21',
- afi='ipv4',
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "import",
- "state": "absent"
- }
- ]))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['vrf context vrf21',
- 'address-family ipv4 unicast',
- 'no route-target import 65000:1000'])
-
- def test_nxos_vrf_af_route_target_multi_import_absent_current_non_existing(self):
- set_module_args(dict(vrf='vrf1',
- afi='ipv4',
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "import",
- "state": "absent"
- },
- {
- "rt": "65001:1000",
- "direction": "import",
- "state": "absent"
- },
- {
- "rt": "65002:1000",
- "direction": "import",
- "state": "absent"
- }
- ]))
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
-
- def test_nxos_vrf_af_route_target_multi_import_absent_current_existing(self):
- set_module_args(dict(vrf='vrf21',
- afi='ipv4',
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "import",
- "state": "absent"
- },
- {
- "rt": "65001:1000",
- "direction": "import",
- "state": "absent"
- },
- {
- "rt": "65002:1000",
- "direction": "import",
- "state": "absent"
- }
- ]))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['vrf context vrf21',
- 'address-family ipv4 unicast',
- 'no route-target import 65000:1000',
- 'no route-target import 65001:1000',
- 'no route-target import 65002:1000'])
-
- def test_nxos_vrf_af_route_target_multi_import_absent_current_mix(self):
- set_module_args(dict(vrf='vrf21',
- afi='ipv4',
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "import",
- "state": "present"
- },
- {
- "rt": "65001:1000",
- "direction": "import",
- "state": "present"
- },
- {
- "rt": "65002:1000",
- "direction": "import",
- "state": "absent"
- },
- {
- "rt": "65003:1000",
- "direction": "import",
- "state": "present"
- },
- {
- "rt": "65004:1000",
- "direction": "import",
- "state": "absent"
- }
- ]))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['vrf context vrf21',
- 'address-family ipv4 unicast',
- 'no route-target import 65002:1000',
- 'route-target import 65003:1000'])
-
- def test_nxos_vrf_af_route_target_export_present_current_non_existing(self):
- set_module_args(dict(vrf='vrf1',
- afi='ipv4',
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "export",
- "state": "present"
- }
- ]))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['vrf context vrf1',
- 'address-family ipv4 unicast',
- 'route-target export 65000:1000'])
-
- def test_nxos_vrf_af_route_target_export_present_current_existing(self):
- set_module_args(dict(vrf='vrf21',
- afi='ipv4',
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "export",
- "state": "present"
- }
- ]))
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
-
- def test_nxos_vrf_af_route_target_multi_export_present_current_non_existing(self):
- set_module_args(dict(vrf='vrf1',
- afi='ipv4',
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "export",
- "state": "present"
- },
- {
- "rt": "65001:1000",
- "direction": "export",
- "state": "present"
- },
- {
- "rt": "65002:1000",
- "direction": "export",
- "state": "present"
- }
- ]))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['vrf context vrf1',
- 'address-family ipv4 unicast',
- 'route-target export 65000:1000',
- 'route-target export 65001:1000',
- 'route-target export 65002:1000'])
-
- def test_nxos_vrf_af_route_target_multi_export_present_current_existing(self):
- set_module_args(dict(vrf='vrf21',
- afi='ipv4',
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "export",
- "state": "present"
- },
- {
- "rt": "65001:1000",
- "direction": "export",
- "state": "present"
- },
- {
- "rt": "65002:1000",
- "direction": "export",
- "state": "present"
- }
- ]))
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
-
- def test_nxos_vrf_af_route_target_export_absent_current_non_existing(self):
- set_module_args(dict(vrf='vrf1',
- afi='ipv4',
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "export",
- "state": "absent"
- }
- ]))
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
-
- def test_nxos_vrf_af_route_target_export_absent_current_existing(self):
- set_module_args(dict(vrf='vrf21',
- afi='ipv4',
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "export",
- "state": "absent"
- }
- ]))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['vrf context vrf21',
- 'address-family ipv4 unicast',
- 'no route-target export 65000:1000'])
-
- def test_nxos_vrf_af_route_target_multi_export_absent_current_non_existing(self):
- set_module_args(dict(vrf='vrf1',
- afi='ipv4',
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "export",
- "state": "absent"
- },
- {
- "rt": "65001:1000",
- "direction": "export",
- "state": "absent"
- },
- {
- "rt": "65002:1000",
- "direction": "export",
- "state": "absent"
- }
- ]))
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
-
- def test_nxos_vrf_af_route_target_multi_export_absent_current_existing(self):
- set_module_args(dict(vrf='vrf21',
- afi='ipv4',
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "export",
- "state": "absent"
- },
- {
- "rt": "65001:1000",
- "direction": "export",
- "state": "absent"
- },
- {
- "rt": "65002:1000",
- "direction": "export",
- "state": "absent"
- }
- ]))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['vrf context vrf21',
- 'address-family ipv4 unicast',
- 'no route-target export 65000:1000',
- 'no route-target export 65001:1000',
- 'no route-target export 65002:1000'])
-
- def test_nxos_vrf_af_route_target_multi_export_absent_current_mix(self):
- set_module_args(dict(vrf='vrf21',
- afi='ipv4',
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "export",
- "state": "present"
- },
- {
- "rt": "65001:1000",
- "direction": "export",
- "state": "present"
- },
- {
- "rt": "65002:1000",
- "direction": "export",
- "state": "absent"
- },
- {
- "rt": "65003:1000",
- "direction": "export",
- "state": "present"
- },
- {
- "rt": "65004:1000",
- "direction": "export",
- "state": "absent"
- }
- ]))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['vrf context vrf21',
- 'address-family ipv4 unicast',
- 'no route-target export 65002:1000',
- 'route-target export 65003:1000'])
-
- def test_nxos_vrf_af_route_target_both_present_current_non_existing(self):
- set_module_args(dict(vrf='vrf1',
- afi='ipv4',
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "both",
- "state": "present"
- }
- ]))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['vrf context vrf1',
- 'address-family ipv4 unicast',
- 'route-target import 65000:1000',
- 'route-target export 65000:1000'])
-
- def test_nxos_vrf_af_route_target_both_present_current_existing(self):
- set_module_args(dict(vrf='vrf21',
- afi='ipv4',
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "both",
- "state": "present"
- }
- ]))
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
-
- def test_nxos_vrf_af_route_target_multi_both_present_current_non_existing(self):
- set_module_args(dict(vrf='vrf1',
- afi='ipv4',
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "both",
- "state": "present"
- },
- {
- "rt": "65001:1000",
- "direction": "both",
- "state": "present"
- },
- {
- "rt": "65002:1000",
- "direction": "both",
- "state": "present"
- }
- ]))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['vrf context vrf1',
- 'address-family ipv4 unicast',
- 'route-target import 65000:1000',
- 'route-target export 65000:1000',
- 'route-target import 65001:1000',
- 'route-target export 65001:1000',
- 'route-target import 65002:1000',
- 'route-target export 65002:1000'])
-
- def test_nxos_vrf_af_route_target_multi_both_present_current_existing(self):
- set_module_args(dict(vrf='vrf21',
- afi='ipv4',
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "both",
- "state": "present"
- },
- {
- "rt": "65001:1000",
- "direction": "both",
- "state": "present"
- },
- {
- "rt": "65002:1000",
- "direction": "both",
- "state": "present"
- }
- ]))
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
-
- def test_nxos_vrf_af_route_target_both_absent_current_non_existing(self):
- set_module_args(dict(vrf='vrf1',
- afi='ipv4',
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "both",
- "state": "absent"
- }
- ]))
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
-
- def test_nxos_vrf_af_route_target_both_absent_current_existing(self):
- set_module_args(dict(vrf='vrf21',
- afi='ipv4',
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "both",
- "state": "absent"
- }
- ]))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['vrf context vrf21',
- 'address-family ipv4 unicast',
- 'no route-target import 65000:1000',
- 'no route-target export 65000:1000'])
-
- def test_nxos_vrf_af_route_target_multi_both_absent_current_non_existing(self):
- set_module_args(dict(vrf='vrf1',
- afi='ipv4',
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "both",
- "state": "absent"
- },
- {
- "rt": "65001:1000",
- "direction": "both",
- "state": "absent"
- },
- {
- "rt": "65002:1000",
- "direction": "both",
- "state": "absent"
- }
- ]))
- result = self.execute_module(changed=False)
- self.assertEqual(result['commands'], [])
-
- def test_nxos_vrf_af_route_target_multi_both_absent_current_existing(self):
- set_module_args(dict(vrf='vrf21',
- afi='ipv4',
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "both",
- "state": "absent"
- },
- {
- "rt": "65001:1000",
- "direction": "both",
- "state": "absent"
- },
- {
- "rt": "65002:1000",
- "direction": "both",
- "state": "absent"
- }
- ]))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['vrf context vrf21',
- 'address-family ipv4 unicast',
- 'no route-target import 65000:1000',
- 'no route-target export 65000:1000',
- 'no route-target import 65001:1000',
- 'no route-target export 65001:1000',
- 'no route-target import 65002:1000',
- 'no route-target export 65002:1000'])
-
- def test_nxos_vrf_af_route_target_multi_both_absent_current_mix(self):
- set_module_args(dict(vrf='vrf21',
- afi='ipv4',
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "both",
- "state": "present"
- },
- {
- "rt": "65001:1000",
- "direction": "both",
- "state": "present"
- },
- {
- "rt": "65002:1000",
- "direction": "both",
- "state": "absent"
- },
- {
- "rt": "65003:1000",
- "direction": "both",
- "state": "present"
- },
- {
- "rt": "65004:1000",
- "direction": "both",
- "state": "absent"
- }
- ]))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['vrf context vrf21',
- 'address-family ipv4 unicast',
- 'no route-target import 65002:1000',
- 'no route-target export 65002:1000',
- 'route-target import 65003:1000',
- 'route-target export 65003:1000'])
-
- def test_nxos_vrf_af_route_target_multi_both_current_only_import_or_export(self):
- set_module_args(dict(vrf='vrf31',
- afi='ipv4',
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "both",
- "state": "present"
- },
- {
- "rt": "65001:1000",
- "direction": "both",
- "state": "present"
- },
- {
- "rt": "65002:1000",
- "direction": "both",
- "state": "absent"
- },
- {
- "rt": "65003:1000",
- "direction": "both",
- "state": "absent"
- }
- ]))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['vrf context vrf31',
- 'address-family ipv4 unicast',
- 'route-target export 65000:1000',
- 'route-target import 65001:1000',
- 'no route-target import 65002:1000',
- 'no route-target export 65003:1000'])
-
- def test_nxos_vrf_af_route_target_multi_direction_current_only_import_or_export(self):
- set_module_args(dict(vrf='vrf31',
- afi='ipv4',
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "both",
- "state": "present"
- },
- {
- "rt": "65001:1000",
- "state": "present"
- },
- {
- "rt": "65002:1000",
- "direction": "export",
- "state": "absent"
- },
- {
- "rt": "65003:1000",
- "direction": "export",
- "state": "absent"
- }
- ]))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['vrf context vrf31',
- 'address-family ipv4 unicast',
- 'route-target export 65000:1000',
- 'route-target import 65001:1000',
- 'no route-target export 65003:1000'])
-
- def test_nxos_vrf_af_auto_evpn_route_target_and_manual_route_target(self):
- set_module_args(dict(vrf='vrf1',
- afi='ipv4',
- route_target_both_auto_evpn=True,
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "both",
- "state": "present"
- }
- ]))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['vrf context vrf1',
- 'address-family ipv4 unicast',
- 'route-target both auto evpn',
- 'route-target import 65000:1000',
- 'route-target export 65000:1000'])
-
- def test_nxos_vrf_af_auto_evpn_route_target_and_manual_route_targets_with_absent_vrf(self):
- set_module_args(dict(vrf='vrf1',
- afi='ipv4',
- state='absent',
- route_target_both_auto_evpn=True,
- route_targets=[
- {
- "rt": "65000:1000",
- "direction": "both",
- "state": "present"
- }
- ]))
- result = self.execute_module(changed=True)
- self.assertEqual(result['commands'], ['vrf context vrf1',
- 'no address-family ipv4 unicast'])
diff --git a/test/units/modules/network/nxos/test_nxos_vxlan_vtep.py b/test/units/modules/network/nxos/test_nxos_vxlan_vtep.py
deleted file mode 100644
index c609f515e6..0000000000
--- a/test/units/modules/network/nxos/test_nxos_vxlan_vtep.py
+++ /dev/null
@@ -1,63 +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.nxos import nxos_vxlan_vtep
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosVxlanVtepVniModule(TestNxosModule):
-
- module = nxos_vxlan_vtep
-
- def setUp(self):
- super(TestNxosVxlanVtepVniModule, self).setUp()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_vxlan_vtep.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_get_config = patch('ansible.modules.network.nxos.nxos_vxlan_vtep.get_config')
- self.get_config = self.mock_get_config.start()
-
- def tearDown(self):
- super(TestNxosVxlanVtepVniModule, self).tearDown()
- self.mock_get_config.stop()
- self.mock_load_config.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.get_config.return_value = load_fixture('nxos_vxlan_vtep', 'config.cfg')
- self.load_config.return_value = None
-
- def test_nxos_vxlan_vtep(self):
- set_module_args(dict(interface='nve1', description='simple description'))
- self.execute_module(changed=True, commands=['interface nve1', 'terminal dont-ask', 'description simple description'])
-
- def test_nxos_vxlan_vtep_present_no_change(self):
- set_module_args(dict(interface='nve1'))
- self.execute_module(changed=False, commands=[])
-
- def test_nxos_vxlan_vtep_absent(self):
- set_module_args(dict(interface='nve1', state='absent'))
- self.execute_module(changed=True, commands=['no interface nve1'])
-
- def test_nxos_vxlan_vtep_absent_no_change(self):
- set_module_args(dict(interface='nve2', state='absent'))
- self.execute_module(changed=False, commands=[])
diff --git a/test/units/modules/network/nxos/test_nxos_vxlan_vtep_vni.py b/test/units/modules/network/nxos/test_nxos_vxlan_vtep_vni.py
deleted file mode 100644
index 798dd7ae05..0000000000
--- a/test/units/modules/network/nxos/test_nxos_vxlan_vtep_vni.py
+++ /dev/null
@@ -1,63 +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.nxos import nxos_vxlan_vtep_vni
-from .nxos_module import TestNxosModule, load_fixture, set_module_args
-
-
-class TestNxosVxlanVtepVniModule(TestNxosModule):
-
- module = nxos_vxlan_vtep_vni
-
- def setUp(self):
- super(TestNxosVxlanVtepVniModule, self).setUp()
-
- self.mock_load_config = patch('ansible.modules.network.nxos.nxos_vxlan_vtep_vni.load_config')
- self.load_config = self.mock_load_config.start()
-
- self.mock_get_config = patch('ansible.modules.network.nxos.nxos_vxlan_vtep_vni.get_config')
- self.get_config = self.mock_get_config.start()
-
- def tearDown(self):
- super(TestNxosVxlanVtepVniModule, self).tearDown()
- self.mock_get_config.stop()
- self.mock_load_config.stop()
-
- def load_fixtures(self, commands=None, device=''):
- self.get_config.return_value = load_fixture('nxos_vxlan_vtep_vni', 'config.cfg')
- self.load_config.return_value = None
-
- def test_nxos_vxlan_vtep_vni_present_no_change(self):
- set_module_args(dict(interface='nve1', vni=6000))
- self.execute_module(changed=False, commands=[])
-
- def test_nxos_vxlan_vtep_vni(self):
- set_module_args(dict(interface='nve1', vni=5000))
- self.execute_module(changed=True, commands=['interface nve1', 'member vni 5000'])
-
- def test_nxos_vxlan_vtep_vni_absent(self):
- set_module_args(dict(interface='nve1', vni=6000, state='absent'))
- self.execute_module(changed=True, commands=['interface nve1', 'no member vni 6000'])
-
- def test_nxos_vxlan_vtep_vni_absent_no_change(self):
- set_module_args(dict(interface='nve2', vni=6000, state='absent'))
- self.execute_module(changed=False, commands=[])