summaryrefslogtreecommitdiff
path: root/test/integration/targets
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets')
-rw-r--r--test/integration/targets/junos_banner/defaults/main.yaml3
-rw-r--r--test/integration/targets/junos_banner/meta/main.yml2
-rw-r--r--test/integration/targets/junos_banner/tasks/main.yaml2
-rw-r--r--test/integration/targets/junos_banner/tasks/netconf.yaml21
-rw-r--r--test/integration/targets/junos_banner/tests/netconf/basic.yaml208
-rw-r--r--test/integration/targets/junos_banner/tests/netconf/net_banner.yml35
-rw-r--r--test/integration/targets/junos_command/defaults/main.yaml3
-rw-r--r--test/integration/targets/junos_command/meta/main.yml2
-rw-r--r--test/integration/targets/junos_command/tasks/cli.yaml16
-rw-r--r--test/integration/targets/junos_command/tasks/main.yaml5
-rw-r--r--test/integration/targets/junos_command/tasks/netconf_json.yaml22
-rw-r--r--test/integration/targets/junos_command/tasks/netconf_text.yaml22
-rw-r--r--test/integration/targets/junos_command/tasks/netconf_xml.yaml22
-rw-r--r--test/integration/targets/junos_command/tests/cli/cli_commmand.yaml64
-rw-r--r--test/integration/targets/junos_command/tests/netconf_json/bad_operator.yaml21
-rw-r--r--test/integration/targets/junos_command/tests/netconf_json/contains.yaml21
-rw-r--r--test/integration/targets/junos_command/tests/netconf_json/equal.yaml38
-rw-r--r--test/integration/targets/junos_command/tests/netconf_json/greaterthan.yaml38
-rw-r--r--test/integration/targets/junos_command/tests/netconf_json/greaterthanorequal.yaml38
-rw-r--r--test/integration/targets/junos_command/tests/netconf_json/lessthan.yaml38
-rw-r--r--test/integration/targets/junos_command/tests/netconf_json/lessthanorequal.yaml38
-rw-r--r--test/integration/targets/junos_command/tests/netconf_json/notequal.yaml38
-rw-r--r--test/integration/targets/junos_command/tests/netconf_json/output.yaml63
-rw-r--r--test/integration/targets/junos_command/tests/netconf_text/bad_operator.yaml21
-rw-r--r--test/integration/targets/junos_command/tests/netconf_text/contains.yaml21
-rw-r--r--test/integration/targets/junos_command/tests/netconf_text/invalid.yaml34
-rw-r--r--test/integration/targets/junos_command/tests/netconf_text/output.yaml62
-rw-r--r--test/integration/targets/junos_command/tests/netconf_text/timeout.yaml20
-rw-r--r--test/integration/targets/junos_command/tests/netconf_xml/bad_operator.yaml21
-rw-r--r--test/integration/targets/junos_command/tests/netconf_xml/contains.yaml21
-rw-r--r--test/integration/targets/junos_command/tests/netconf_xml/equal.yaml38
-rw-r--r--test/integration/targets/junos_command/tests/netconf_xml/greaterthan.yaml38
-rw-r--r--test/integration/targets/junos_command/tests/netconf_xml/greaterthanorequal.yaml38
-rw-r--r--test/integration/targets/junos_command/tests/netconf_xml/invalid.yaml31
-rw-r--r--test/integration/targets/junos_command/tests/netconf_xml/lessthan.yaml38
-rw-r--r--test/integration/targets/junos_command/tests/netconf_xml/lessthanorequal.yaml38
-rw-r--r--test/integration/targets/junos_command/tests/netconf_xml/notequal.yaml38
-rw-r--r--test/integration/targets/junos_command/tests/netconf_xml/output.yaml63
-rw-r--r--test/integration/targets/junos_command/tests/netconf_xml/timeout.yaml19
-rw-r--r--test/integration/targets/junos_config/defaults/main.yaml2
-rw-r--r--test/integration/targets/junos_config/meta/main.yml2
-rw-r--r--test/integration/targets/junos_config/tasks/cli_config.yaml16
-rw-r--r--test/integration/targets/junos_config/tasks/main.yaml3
-rw-r--r--test/integration/targets/junos_config/tasks/netconf.yaml22
-rw-r--r--test/integration/targets/junos_config/templates/basic/config.j210
-rw-r--r--test/integration/targets/junos_config/templates/basic/config.set1
-rw-r--r--test/integration/targets/junos_config/templates/basic/config.xml15
-rw-r--r--test/integration/targets/junos_config/tests/cli_config/cli_backup.yaml109
-rw-r--r--test/integration/targets/junos_config/tests/cli_config/cli_basic.yaml61
-rw-r--r--test/integration/targets/junos_config/tests/cli_config/cli_replace.yaml60
-rw-r--r--test/integration/targets/junos_config/tests/netconf/backup.yaml121
-rw-r--r--test/integration/targets/junos_config/tests/netconf/bad_action.yaml16
-rw-r--r--test/integration/targets/junos_config/tests/netconf/invalid.yaml29
-rw-r--r--test/integration/targets/junos_config/tests/netconf/multiple.yaml49
-rw-r--r--test/integration/targets/junos_config/tests/netconf/single.yaml82
-rw-r--r--test/integration/targets/junos_config/tests/netconf/src_basic.yaml104
-rw-r--r--test/integration/targets/junos_config/tests/netconf/src_invalid.yaml19
-rw-r--r--test/integration/targets/junos_facts/defaults/main.yaml3
-rw-r--r--test/integration/targets/junos_facts/meta/main.yml2
-rw-r--r--test/integration/targets/junos_facts/tasks/main.yaml2
-rw-r--r--test/integration/targets/junos_facts/tasks/netconf.yaml21
-rw-r--r--test/integration/targets/junos_facts/tests/netconf/facts.yaml110
-rw-r--r--test/integration/targets/junos_interface/aliases0
-rw-r--r--test/integration/targets/junos_interface/defaults/main.yaml2
-rw-r--r--test/integration/targets/junos_interface/meta/main.yml2
-rw-r--r--test/integration/targets/junos_interface/tasks/main.yaml2
-rw-r--r--test/integration/targets/junos_interface/tasks/netconf.yaml22
-rw-r--r--test/integration/targets/junos_interface/tests/netconf/basic.yaml299
-rw-r--r--test/integration/targets/junos_interface/tests/netconf/intent.yaml96
-rw-r--r--test/integration/targets/junos_interface/tests/netconf/net_interface.yaml41
-rw-r--r--test/integration/targets/junos_interfaces/defaults/main.yaml3
-rw-r--r--test/integration/targets/junos_interfaces/meta/main.yaml2
-rw-r--r--test/integration/targets/junos_interfaces/tasks/main.yaml2
-rw-r--r--test/integration/targets/junos_interfaces/tasks/netconf.yaml17
-rw-r--r--test/integration/targets/junos_interfaces/tests/netconf/_remove_config.yaml14
-rw-r--r--test/integration/targets/junos_interfaces/tests/netconf/deleted.yaml85
-rw-r--r--test/integration/targets/junos_interfaces/tests/netconf/groups.yaml49
-rw-r--r--test/integration/targets/junos_interfaces/tests/netconf/merged.yaml70
-rw-r--r--test/integration/targets/junos_interfaces/tests/netconf/overridden.yaml64
-rw-r--r--test/integration/targets/junos_interfaces/tests/netconf/replaced.yaml77
-rw-r--r--test/integration/targets/junos_interfaces/tests/netconf/rtt.yaml98
-rw-r--r--test/integration/targets/junos_l2_interface/defaults/main.yaml2
-rw-r--r--test/integration/targets/junos_l2_interface/meta/main.yml2
-rw-r--r--test/integration/targets/junos_l2_interface/tasks/main.yaml2
-rw-r--r--test/integration/targets/junos_l2_interface/tasks/netconf.yaml22
-rw-r--r--test/integration/targets/junos_l2_interface/tests/netconf/basic.yaml311
-rw-r--r--test/integration/targets/junos_l2_interface/tests/netconf/net_l2_interface.yaml57
-rw-r--r--test/integration/targets/junos_l2_interfaces/defaults/main.yaml3
-rw-r--r--test/integration/targets/junos_l2_interfaces/meta/main.yaml2
-rw-r--r--test/integration/targets/junos_l2_interfaces/tasks/main.yaml2
-rw-r--r--test/integration/targets/junos_l2_interfaces/tasks/netconf.yaml17
-rw-r--r--test/integration/targets/junos_l2_interfaces/tests/netconf/_base_config.yaml14
-rw-r--r--test/integration/targets/junos_l2_interfaces/tests/netconf/_remove_config.yaml18
-rw-r--r--test/integration/targets/junos_l2_interfaces/tests/netconf/deleted.yaml81
-rw-r--r--test/integration/targets/junos_l2_interfaces/tests/netconf/merged.yaml58
-rw-r--r--test/integration/targets/junos_l2_interfaces/tests/netconf/overridden.yaml63
-rw-r--r--test/integration/targets/junos_l2_interfaces/tests/netconf/replaced.yaml58
-rw-r--r--test/integration/targets/junos_l2_interfaces/tests/netconf/rtt.yml70
-rw-r--r--test/integration/targets/junos_l3_interface/defaults/main.yaml2
-rw-r--r--test/integration/targets/junos_l3_interface/meta/main.yml2
-rw-r--r--test/integration/targets/junos_l3_interface/tasks/main.yaml2
-rw-r--r--test/integration/targets/junos_l3_interface/tasks/netconf.yaml22
-rw-r--r--test/integration/targets/junos_l3_interface/tests/netconf/basic.yaml257
-rw-r--r--test/integration/targets/junos_l3_interface/tests/netconf/net_l3_interface.yaml46
-rw-r--r--test/integration/targets/junos_l3_interfaces/defaults/main.yaml3
-rw-r--r--test/integration/targets/junos_l3_interfaces/meta/main.yaml2
-rw-r--r--test/integration/targets/junos_l3_interfaces/tasks/main.yaml2
-rw-r--r--test/integration/targets/junos_l3_interfaces/tasks/netconf.yaml16
-rw-r--r--test/integration/targets/junos_l3_interfaces/tests/netconf/junos_l3_interfaces.yml99
-rw-r--r--test/integration/targets/junos_lacp/defaults/main.yaml3
-rw-r--r--test/integration/targets/junos_lacp/meta/main.yml2
-rw-r--r--test/integration/targets/junos_lacp/tasks/main.yaml2
-rw-r--r--test/integration/targets/junos_lacp/tasks/netconf.yaml17
-rw-r--r--test/integration/targets/junos_lacp/tests/netconf/_remove_config.yaml11
-rw-r--r--test/integration/targets/junos_lacp/tests/netconf/deleted.yaml43
-rw-r--r--test/integration/targets/junos_lacp/tests/netconf/merged.yaml39
-rw-r--r--test/integration/targets/junos_lacp/tests/netconf/replaced.yaml44
-rw-r--r--test/integration/targets/junos_lacp/tests/netconf/rtt.yaml53
-rw-r--r--test/integration/targets/junos_lacp_interfaces/defaults/main.yaml3
-rw-r--r--test/integration/targets/junos_lacp_interfaces/meta/main.yaml2
-rw-r--r--test/integration/targets/junos_lacp_interfaces/tasks/main.yaml2
-rw-r--r--test/integration/targets/junos_lacp_interfaces/tasks/netconf.yaml17
-rw-r--r--test/integration/targets/junos_lacp_interfaces/tests/netconf/_base_config.yaml16
-rw-r--r--test/integration/targets/junos_lacp_interfaces/tests/netconf/_remove_config.yaml17
-rw-r--r--test/integration/targets/junos_lacp_interfaces/tests/netconf/deleted.yaml97
-rw-r--r--test/integration/targets/junos_lacp_interfaces/tests/netconf/merged.yaml56
-rw-r--r--test/integration/targets/junos_lacp_interfaces/tests/netconf/overridden.yml76
-rw-r--r--test/integration/targets/junos_lacp_interfaces/tests/netconf/replaced.yaml100
-rw-r--r--test/integration/targets/junos_lacp_interfaces/tests/netconf/rtt.yaml90
-rw-r--r--test/integration/targets/junos_lag_interfaces/defaults/main.yaml3
-rw-r--r--test/integration/targets/junos_lag_interfaces/meta/main.yaml2
-rw-r--r--test/integration/targets/junos_lag_interfaces/tasks/main.yaml2
-rw-r--r--test/integration/targets/junos_lag_interfaces/tasks/netconf.yaml17
-rw-r--r--test/integration/targets/junos_lag_interfaces/tests/netconf/_base_config.yaml12
-rw-r--r--test/integration/targets/junos_lag_interfaces/tests/netconf/_remove_config.yaml16
-rw-r--r--test/integration/targets/junos_lag_interfaces/tests/netconf/deleted.yaml86
-rw-r--r--test/integration/targets/junos_lag_interfaces/tests/netconf/merged.yaml62
-rw-r--r--test/integration/targets/junos_lag_interfaces/tests/netconf/overridden.yaml62
-rw-r--r--test/integration/targets/junos_lag_interfaces/tests/netconf/replaced.yaml70
-rw-r--r--test/integration/targets/junos_linkagg/defaults/main.yaml2
-rw-r--r--test/integration/targets/junos_linkagg/meta/main.yml2
-rw-r--r--test/integration/targets/junos_linkagg/tasks/main.yaml2
-rw-r--r--test/integration/targets/junos_linkagg/tasks/netconf.yaml22
-rw-r--r--test/integration/targets/junos_linkagg/tests/netconf/basic.yaml240
-rw-r--r--test/integration/targets/junos_linkagg/tests/netconf/net_linkagg.yaml55
-rw-r--r--test/integration/targets/junos_lldp/defaults/main.yaml2
-rw-r--r--test/integration/targets/junos_lldp/meta/main.yml2
-rw-r--r--test/integration/targets/junos_lldp/tasks/main.yaml2
-rw-r--r--test/integration/targets/junos_lldp/tasks/netconf.yaml22
-rw-r--r--test/integration/targets/junos_lldp/tests/netconf/basic.yaml138
-rw-r--r--test/integration/targets/junos_lldp/tests/netconf/net_lldp.yaml44
-rw-r--r--test/integration/targets/junos_lldp_global/defaults/main.yaml3
-rw-r--r--test/integration/targets/junos_lldp_global/meta/main.yml2
-rw-r--r--test/integration/targets/junos_lldp_global/tasks/main.yaml2
-rw-r--r--test/integration/targets/junos_lldp_global/tasks/netconf.yaml17
-rw-r--r--test/integration/targets/junos_lldp_global/tests/netconf/_remove_config.yaml11
-rw-r--r--test/integration/targets/junos_lldp_global/tests/netconf/deleted.yaml63
-rw-r--r--test/integration/targets/junos_lldp_global/tests/netconf/merged.yaml61
-rw-r--r--test/integration/targets/junos_lldp_global/tests/netconf/replaced.yaml72
-rw-r--r--test/integration/targets/junos_lldp_global/tests/netconf/rtt.yaml79
-rw-r--r--test/integration/targets/junos_lldp_interface/defaults/main.yaml2
-rw-r--r--test/integration/targets/junos_lldp_interface/meta/main.yml2
-rw-r--r--test/integration/targets/junos_lldp_interface/tasks/main.yaml2
-rw-r--r--test/integration/targets/junos_lldp_interface/tasks/netconf.yaml25
-rw-r--r--test/integration/targets/junos_lldp_interface/tests/netconf/basic.yaml124
-rw-r--r--test/integration/targets/junos_lldp_interface/tests/netconf/net_lldp_interface.yaml49
-rw-r--r--test/integration/targets/junos_lldp_interfaces/defaults/main.yaml3
-rw-r--r--test/integration/targets/junos_lldp_interfaces/meta/main.yaml2
-rw-r--r--test/integration/targets/junos_lldp_interfaces/tasks/main.yaml2
-rw-r--r--test/integration/targets/junos_lldp_interfaces/tasks/netconf.yaml17
-rw-r--r--test/integration/targets/junos_lldp_interfaces/tests/netconf/_remove_config.yaml11
-rw-r--r--test/integration/targets/junos_lldp_interfaces/tests/netconf/deleted.yaml87
-rw-r--r--test/integration/targets/junos_lldp_interfaces/tests/netconf/merged.yaml58
-rw-r--r--test/integration/targets/junos_lldp_interfaces/tests/netconf/overridden.yaml63
-rw-r--r--test/integration/targets/junos_lldp_interfaces/tests/netconf/replaced.yaml66
-rw-r--r--test/integration/targets/junos_lldp_interfaces/tests/netconf/rtt.yaml72
-rw-r--r--test/integration/targets/junos_logging/aliases0
-rw-r--r--test/integration/targets/junos_logging/defaults/main.yaml2
-rw-r--r--test/integration/targets/junos_logging/meta/main.yml2
-rw-r--r--test/integration/targets/junos_logging/tasks/main.yaml2
-rw-r--r--test/integration/targets/junos_logging/tasks/netconf.yaml22
-rw-r--r--test/integration/targets/junos_logging/tests/netconf/basic.yaml394
-rw-r--r--test/integration/targets/junos_logging/tests/netconf/net_logging.yaml48
-rw-r--r--test/integration/targets/junos_netconf/defaults/main.yaml3
-rw-r--r--test/integration/targets/junos_netconf/tasks/cli.yaml22
-rw-r--r--test/integration/targets/junos_netconf/tasks/main.yaml2
-rw-r--r--test/integration/targets/junos_netconf/tests/cli/changeport.yaml104
-rw-r--r--test/integration/targets/junos_netconf/tests/cli/netconf.yaml120
-rw-r--r--test/integration/targets/junos_netconf/tests/utils/junos_command.yaml6
-rw-r--r--test/integration/targets/junos_rpc/defaults/main.yaml3
-rw-r--r--test/integration/targets/junos_rpc/meta/main.yml2
-rw-r--r--test/integration/targets/junos_rpc/tasks/main.yaml2
-rw-r--r--test/integration/targets/junos_rpc/tasks/netconf.yaml21
-rw-r--r--test/integration/targets/junos_rpc/tests/netconf/rpc.yaml73
-rw-r--r--test/integration/targets/junos_smoke/defaults/main.yaml3
-rw-r--r--test/integration/targets/junos_smoke/meta/main.yml2
-rw-r--r--test/integration/targets/junos_smoke/tasks/cli.yaml15
-rw-r--r--test/integration/targets/junos_smoke/tasks/main.yaml3
-rw-r--r--test/integration/targets/junos_smoke/tasks/netconf.yaml21
-rw-r--r--test/integration/targets/junos_smoke/tests/cli/reboot.yaml14
-rw-r--r--test/integration/targets/junos_smoke/tests/netconf/common_utils.yaml56
-rw-r--r--test/integration/targets/junos_smoke/tests/netconf/module_utils_junos.yaml99
-rw-r--r--test/integration/targets/junos_static_route/defaults/main.yaml2
-rw-r--r--test/integration/targets/junos_static_route/meta/main.yml2
-rw-r--r--test/integration/targets/junos_static_route/tasks/main.yaml2
-rw-r--r--test/integration/targets/junos_static_route/tasks/netconf.yaml22
-rw-r--r--test/integration/targets/junos_static_route/tests/netconf/basic.yaml251
-rw-r--r--test/integration/targets/junos_static_route/tests/netconf/net_static_route.yaml46
-rw-r--r--test/integration/targets/junos_static_routes/defaults/main.yaml3
-rw-r--r--test/integration/targets/junos_static_routes/meta/main.yaml2
-rw-r--r--test/integration/targets/junos_static_routes/tasks/main.yaml2
-rw-r--r--test/integration/targets/junos_static_routes/tasks/netconf.yaml17
-rw-r--r--test/integration/targets/junos_static_routes/tests/netconf/_base_config.yaml21
-rw-r--r--test/integration/targets/junos_static_routes/tests/netconf/_remove_config.yaml14
-rw-r--r--test/integration/targets/junos_static_routes/tests/netconf/deleted.yaml37
-rw-r--r--test/integration/targets/junos_static_routes/tests/netconf/merged.yaml72
-rw-r--r--test/integration/targets/junos_static_routes/tests/netconf/overridden.yaml51
-rw-r--r--test/integration/targets/junos_static_routes/tests/netconf/replaced.yaml54
-rw-r--r--test/integration/targets/junos_system/aliases0
-rw-r--r--test/integration/targets/junos_system/defaults/main.yaml3
-rw-r--r--test/integration/targets/junos_system/meta/main.yml2
-rw-r--r--test/integration/targets/junos_system/tasks/main.yaml2
-rw-r--r--test/integration/targets/junos_system/tasks/netconf.yaml22
-rw-r--r--test/integration/targets/junos_system/tests/netconf/basic.yaml407
-rw-r--r--test/integration/targets/junos_system/tests/netconf/net_system.yaml37
-rw-r--r--test/integration/targets/junos_user/defaults/main.yaml3
-rw-r--r--test/integration/targets/junos_user/meta/main.yml2
-rw-r--r--test/integration/targets/junos_user/tasks/main.yaml2
-rw-r--r--test/integration/targets/junos_user/tasks/netconf.yaml22
-rw-r--r--test/integration/targets/junos_user/tests/netconf/basic.yaml197
-rw-r--r--test/integration/targets/junos_user/tests/netconf/net_user.yaml41
-rw-r--r--test/integration/targets/junos_vlan/defaults/main.yaml3
-rw-r--r--test/integration/targets/junos_vlan/meta/main.yml2
-rw-r--r--test/integration/targets/junos_vlan/tasks/main.yaml2
-rw-r--r--test/integration/targets/junos_vlan/tasks/netconf.yaml21
-rw-r--r--test/integration/targets/junos_vlan/tests/netconf/basic.yaml192
-rw-r--r--test/integration/targets/junos_vlan/tests/netconf/net_vlan.yaml30
-rw-r--r--test/integration/targets/junos_vlans/defaults/main.yaml3
-rw-r--r--test/integration/targets/junos_vlans/meta/main.yaml2
-rw-r--r--test/integration/targets/junos_vlans/tasks/main.yaml2
-rw-r--r--test/integration/targets/junos_vlans/tasks/netconf.yaml17
-rw-r--r--test/integration/targets/junos_vlans/tests/netconf/_base_config.yaml12
-rw-r--r--test/integration/targets/junos_vlans/tests/netconf/_remove_config.yaml12
-rw-r--r--test/integration/targets/junos_vlans/tests/netconf/deleted.yaml33
-rw-r--r--test/integration/targets/junos_vlans/tests/netconf/merged.yaml43
-rw-r--r--test/integration/targets/junos_vlans/tests/netconf/overridden.yaml40
-rw-r--r--test/integration/targets/junos_vlans/tests/netconf/replaced.yaml42
-rw-r--r--test/integration/targets/junos_vrf/defaults/main.yaml3
-rw-r--r--test/integration/targets/junos_vrf/meta/main.yml2
-rw-r--r--test/integration/targets/junos_vrf/tasks/main.yaml2
-rw-r--r--test/integration/targets/junos_vrf/tasks/netconf.yaml21
-rw-r--r--test/integration/targets/junos_vrf/tests/netconf/basic.yaml324
-rw-r--r--test/integration/targets/junos_vrf/tests/netconf/net_vrf.yaml43
253 files changed, 0 insertions, 10020 deletions
diff --git a/test/integration/targets/junos_banner/defaults/main.yaml b/test/integration/targets/junos_banner/defaults/main.yaml
deleted file mode 100644
index 9ef5ba5165..0000000000
--- a/test/integration/targets/junos_banner/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "*"
-test_items: []
diff --git a/test/integration/targets/junos_banner/meta/main.yml b/test/integration/targets/junos_banner/meta/main.yml
deleted file mode 100644
index 191a0f2ea1..0000000000
--- a/test/integration/targets/junos_banner/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_junos_tests
diff --git a/test/integration/targets/junos_banner/tasks/main.yaml b/test/integration/targets/junos_banner/tasks/main.yaml
deleted file mode 100644
index cc27f174fd..0000000000
--- a/test/integration/targets/junos_banner/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: netconf.yaml, tags: ['netconf'] }
diff --git a/test/integration/targets/junos_banner/tasks/netconf.yaml b/test/integration/targets/junos_banner/tasks/netconf.yaml
deleted file mode 100644
index 9550210102..0000000000
--- a/test/integration/targets/junos_banner/tasks/netconf.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
-- name: collect netconf test cases
- find:
- paths: "{{ role_path }}/tests/netconf"
- 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 case (connection=netconf)
- include: "{{ test_case_to_run }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_banner/tests/netconf/basic.yaml b/test/integration/targets/junos_banner/tests/netconf/basic.yaml
deleted file mode 100644
index de1e0ed523..0000000000
--- a/test/integration/targets/junos_banner/tests/netconf/basic.yaml
+++ /dev/null
@@ -1,208 +0,0 @@
----
-- debug: msg="START junos_banner netconf/basic.yaml on connection={{ ansible_connection }}"
-
-- name: setup - remove login banner
- junos_banner:
- banner: login
- state: absent
- provider: "{{ netconf }}"
-
-- name: Create login banner
- junos_banner:
- banner: login
- text: this is my login banner
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<message>this is my login banner</message>' in config.xml"
-
-- name: Create login banner (idempotent)
- junos_banner:
- banner: login
- text: this is my login banner
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Deactivate login banner
- junos_banner:
- banner: login
- text: this is my login banner
- state: present
- active: False
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<message inactive=\"inactive\">this is my login banner</message>' in config.xml"
-
-- name: Activate login banner
- junos_banner:
- banner: login
- text: this is my login banner
- state: present
- active: True
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<message>this is my login banner</message>' in config.xml"
-
-- name: check mode
- junos_banner:
- banner: login
- text: this is not the login banner you're looking for
- state: present
- provider: "{{ netconf }}"
- register: result
- check_mode: yes
-
-- assert:
- that:
- - "result.changed == true"
- - "result.failed == false"
-
-- name: delete login banner
- junos_banner:
- banner: login
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<message>this is my login banner</message>' not in config.xml"
-
-- name: setup - remove motd banner
- junos_banner:
- banner: motd
- state: absent
- provider: "{{ netconf }}"
-
-- name: Create motd banner
- junos_banner:
- banner: motd
- text: this is my motd banner
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<announcement>this is my motd banner</announcement>' in config.xml"
-
-- name: Create motd banner (idempotent)
- junos_banner:
- banner: motd
- text: this is my motd banner
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Deactivate motd banner
- junos_banner:
- banner: motd
- text: this is my motd banner
- state: present
- active: False
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<announcement inactive=\"inactive\">this is my motd banner</announcement>' in config.xml"
-
-- name: Activate motd banner
- junos_banner:
- banner: motd
- text: this is my motd banner
- state: present
- active: True
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<announcement>this is my motd banner</announcement>' in config.xml"
-
-- name: delete motd banner
- junos_banner:
- banner: motd
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<announcement>this is my motd banner</announcement>' not in config.xml"
-
-- debug: msg="END junos_banner netconf/basic.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_banner/tests/netconf/net_banner.yml b/test/integration/targets/junos_banner/tests/netconf/net_banner.yml
deleted file mode 100644
index a59c0d70af..0000000000
--- a/test/integration/targets/junos_banner/tests/netconf/net_banner.yml
+++ /dev/null
@@ -1,35 +0,0 @@
----
-- debug: msg="START junos net_banner netconf/net_banner.yaml on connection={{ ansible_connection }}"
-
-- name: setup - remove login banner
- net_banner:
- banner: login
- state: absent
- provider: "{{ netconf }}"
-
-- name: Create login banner
- net_banner:
- banner: login
- text: this is my login banner configured by net_banner
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<message>this is my login banner configured by net_banner</message>' in config.xml"
-
-- name: teardown - remove login banner
- net_banner:
- banner: login
- state: absent
- provider: "{{ netconf }}"
-
-- debug: msg="END junos net_banner netconf/net_banner.yaml on connection={{ ansible_connection }}" \ No newline at end of file
diff --git a/test/integration/targets/junos_command/defaults/main.yaml b/test/integration/targets/junos_command/defaults/main.yaml
deleted file mode 100644
index 9ef5ba5165..0000000000
--- a/test/integration/targets/junos_command/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "*"
-test_items: []
diff --git a/test/integration/targets/junos_command/meta/main.yml b/test/integration/targets/junos_command/meta/main.yml
deleted file mode 100644
index 191a0f2ea1..0000000000
--- a/test/integration/targets/junos_command/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_junos_tests
diff --git a/test/integration/targets/junos_command/tasks/cli.yaml b/test/integration/targets/junos_command/tasks/cli.yaml
deleted file mode 100644
index 3f93a4f369..0000000000
--- a/test/integration/targets/junos_command/tasks/cli.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- delegate_to: localhost
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- name: run test 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/junos_command/tasks/main.yaml b/test/integration/targets/junos_command/tasks/main.yaml
deleted file mode 100644
index a2851f636f..0000000000
--- a/test/integration/targets/junos_command/tasks/main.yaml
+++ /dev/null
@@ -1,5 +0,0 @@
----
-- { include: netconf_xml.yaml, tags: ['netconf', 'xml'] }
-- { include: netconf_text.yaml, tags: ['netconf', 'text'] }
-- { include: netconf_json.yaml, tags: ['netconf', 'json'] }
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/junos_command/tasks/netconf_json.yaml b/test/integration/targets/junos_command/tasks/netconf_json.yaml
deleted file mode 100644
index 5859e29d18..0000000000
--- a/test/integration/targets/junos_command/tasks/netconf_json.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-- name: collect netconf_json test cases with json encoding
- find:
- paths: "{{ role_path }}/tests/netconf_json"
- 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 case (connection=netconf)
- include: "{{ test_case_to_run }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_command/tasks/netconf_text.yaml b/test/integration/targets/junos_command/tasks/netconf_text.yaml
deleted file mode 100644
index 5ecf68d768..0000000000
--- a/test/integration/targets/junos_command/tasks/netconf_text.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-- name: collect netconf_text test cases with text encoding
- find:
- paths: "{{ role_path }}/tests/netconf_text"
- 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 case (connection=netconf)
- include: "{{ test_case_to_run }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_command/tasks/netconf_xml.yaml b/test/integration/targets/junos_command/tasks/netconf_xml.yaml
deleted file mode 100644
index 288bed2e50..0000000000
--- a/test/integration/targets/junos_command/tasks/netconf_xml.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-- name: collect netconf_xml test cases with xml encoding
- find:
- paths: "{{ role_path }}/tests/netconf_xml"
- 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 case (connection=netconf)
- include: "{{ test_case_to_run }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_command/tests/cli/cli_commmand.yaml b/test/integration/targets/junos_command/tests/cli/cli_commmand.yaml
deleted file mode 100644
index 64022023c1..0000000000
--- a/test/integration/targets/junos_command/tests/cli/cli_commmand.yaml
+++ /dev/null
@@ -1,64 +0,0 @@
----
-- debug:
- msg: "START cli/cli_command.yaml on connection={{ ansible_connection }}"
-
-- block:
- - name: get output for single command
- cli_command:
- command: show version
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
-
- - name: test with prompt and answer
- cli_command:
- command: "{{ item }}"
- prompt:
- - "Exit with uncommitted changes"
- answer: yes
- loop:
- - configure
- - set system syslog file test any any
- - rollback
- - exit
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- - cli_command:
- command: "{{item}}"
- prompt:
- - "New password"
- - "Retype new password"
- answer:
- - "Test1234"
- - "Test1234"
- check_all: True
- loop:
- - "configure"
- - "rollback"
- - "set system login user ansible_test class operator authentication plain-text-password"
- - "commit"
- register: result
- ignore_errors: True
-
- - assert:
- that:
- - "'failed' not in result"
-
- - junos_netconf:
- register: result
- ignore_errors: True
-
- - assert:
- that:
- - "result.failed == false"
-
- when: ansible_connection == 'network_cli'
-
-- debug: msg="END cli/cli_command.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_command/tests/netconf_json/bad_operator.yaml b/test/integration/targets/junos_command/tests/netconf_json/bad_operator.yaml
deleted file mode 100644
index cac62f8781..0000000000
--- a/test/integration/targets/junos_command/tests/netconf_json/bad_operator.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-- debug: msg="START netconf_json/bad_operator.yaml on connection={{ ansible_connection }}"
-
-- name: test bad operator with json encoding
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- wait_for:
- - "result[0]['software-information'][0]['host-name'][0]['data'] foo lo0"
- format: json
- provider: "{{ netconf }}"
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - "result.failed == true"
- - "result.msg is defined"
-
-- debug: msg="END netconf_json/bad_operator.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_command/tests/netconf_json/contains.yaml b/test/integration/targets/junos_command/tests/netconf_json/contains.yaml
deleted file mode 100644
index 18eee0fcf9..0000000000
--- a/test/integration/targets/junos_command/tests/netconf_json/contains.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-- debug: msg="START netconf_json/contains.yaml on connection={{ ansible_connection }}"
-
-- name: test contains operator with json encoding
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- format: json
- wait_for:
- - "result[1]['interface-information'][0]['physical-interface'][0]['name'][0]['data'] contains lo0"
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- debug: msg="END netconf_json/contains.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_command/tests/netconf_json/equal.yaml b/test/integration/targets/junos_command/tests/netconf_json/equal.yaml
deleted file mode 100644
index 397e04728d..0000000000
--- a/test/integration/targets/junos_command/tests/netconf_json/equal.yaml
+++ /dev/null
@@ -1,38 +0,0 @@
----
-- debug: msg="START netconf_json/equal.yaml on connection={{ ansible_connection }}"
-
-- name: test == operator with xml encoding
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- wait_for:
- - "result[1]['interface-information'][0]['physical-interface'][0]['name'][0]['data'] == lo0"
- format: json
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- name: test eq operator with json encoding
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- wait_for:
- - "result[1]['interface-information'][0]['physical-interface'][0]['name'][0]['data'] eq lo0"
- format: json
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- debug: msg="END netconf_json/equal.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_command/tests/netconf_json/greaterthan.yaml b/test/integration/targets/junos_command/tests/netconf_json/greaterthan.yaml
deleted file mode 100644
index 7f756fd603..0000000000
--- a/test/integration/targets/junos_command/tests/netconf_json/greaterthan.yaml
+++ /dev/null
@@ -1,38 +0,0 @@
----
-- debug: msg="START netconf_json/greaterthan.yaml on connection={{ ansible_connection }}"
-
-- name: test gt operator
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- format: json
- wait_for:
- - "result[1]['interface-information'][0]['physical-interface'][0]['local-index'][0]['data'] gt 5"
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- name: test > operator
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- format: json
- wait_for:
- - "result[1]['interface-information'][0]['physical-interface'][0]['local-index'][0]['data'] > 5"
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- debug: msg="END netconf_json/greaterthan.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_command/tests/netconf_json/greaterthanorequal.yaml b/test/integration/targets/junos_command/tests/netconf_json/greaterthanorequal.yaml
deleted file mode 100644
index c0e4ebf4b5..0000000000
--- a/test/integration/targets/junos_command/tests/netconf_json/greaterthanorequal.yaml
+++ /dev/null
@@ -1,38 +0,0 @@
----
-- debug: msg="START netconf_json/greaterthanorequal.yaml on connection={{ ansible_connection }}"
-
-- name: test ge operator
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- format: json
- wait_for:
- - "result[1]['interface-information'][0]['physical-interface'][0]['local-index'][0]['data'] ge 6"
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- name: test >= operator
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- format: json
- wait_for:
- - "result[1]['interface-information'][0]['physical-interface'][0]['local-index'][0]['data'] >= 6"
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- debug: msg="END netconf_json/greaterthanorequal.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_command/tests/netconf_json/lessthan.yaml b/test/integration/targets/junos_command/tests/netconf_json/lessthan.yaml
deleted file mode 100644
index 0d912a9ef8..0000000000
--- a/test/integration/targets/junos_command/tests/netconf_json/lessthan.yaml
+++ /dev/null
@@ -1,38 +0,0 @@
----
-- debug: msg="START netconf_json/lessthan.yaml on connection={{ ansible_connection }}"
-
-- name: test lt operator
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- format: json
- wait_for:
- - "result[1]['interface-information'][0]['physical-interface'][0]['local-index'][0]['data'] lt 7"
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- name: test < operator
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- format: json
- wait_for:
- - "result[1]['interface-information'][0]['physical-interface'][0]['local-index'][0]['data'] lt 7"
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- debug: msg="END netconf_json/lessthan.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_command/tests/netconf_json/lessthanorequal.yaml b/test/integration/targets/junos_command/tests/netconf_json/lessthanorequal.yaml
deleted file mode 100644
index e865605e3a..0000000000
--- a/test/integration/targets/junos_command/tests/netconf_json/lessthanorequal.yaml
+++ /dev/null
@@ -1,38 +0,0 @@
----
-- debug: msg="START netconf_json/lessthanorequal.yaml on connection={{ ansible_connection }}"
-
-- name: test le operator
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- format: json
- wait_for:
- - "result[1]['interface-information'][0]['physical-interface'][0]['local-index'][0][data] le 6"
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- name: test <= operator
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- format: json
- wait_for:
- - "result[1]['interface-information'][0]['physical-interface'][0]['local-index'][0][data] <= 6"
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- debug: msg="END netconf_json/lessthanorequal.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_command/tests/netconf_json/notequal.yaml b/test/integration/targets/junos_command/tests/netconf_json/notequal.yaml
deleted file mode 100644
index e3ed4c2ed4..0000000000
--- a/test/integration/targets/junos_command/tests/netconf_json/notequal.yaml
+++ /dev/null
@@ -1,38 +0,0 @@
----
-- debug: msg="START netconf_json/notequal.yaml on connection={{ ansible_connection }}"
-
-- name: test neq operator
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- format: json
- wait_for:
- - "result[1]['interface-information'][0]['physical-interface'][0]['name'][0]['data'] neq em0"
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- name: test != operator
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- format: json
- wait_for:
- - "result[1]['interface-information'][0]['physical-interface'][0]['name'][0]['data'] neq em0"
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- debug: msg="END netconf_json/notequal.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_command/tests/netconf_json/output.yaml b/test/integration/targets/junos_command/tests/netconf_json/output.yaml
deleted file mode 100644
index 5f38978dd4..0000000000
--- a/test/integration/targets/junos_command/tests/netconf_json/output.yaml
+++ /dev/null
@@ -1,63 +0,0 @@
----
-- debug: msg="START netconf_json/output.yaml on connection={{ ansible_connection }}"
-
-- name: get output for single command
- junos_command:
- commands: ['show version']
- format: json
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- name: get output for multiple commands
- junos_command:
- commands:
- - show version
- - show route
- format: json
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- name: get output for single command with cli transport
- junos_command:
- commands: ['show version | display json']
- provider:
- transport: cli
- register: result
- connection: network_cli
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- name: get output for multiple commands with cli transport
- junos_command:
- commands:
- - show version
- - show route
- format: json
- provider:
- transport: cli
- register: result
- connection: network_cli
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- debug: msg="END netconf_json/output.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_command/tests/netconf_text/bad_operator.yaml b/test/integration/targets/junos_command/tests/netconf_text/bad_operator.yaml
deleted file mode 100644
index e763259ef4..0000000000
--- a/test/integration/targets/junos_command/tests/netconf_text/bad_operator.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-- debug: msg="START netconf_text/bad_operator.yaml on connection={{ ansible_connection }}"
-
-- name: test bad operator with text encoding
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- wait_for:
- - "result[1].interface-information[0].physical-interface[0].name[0].data foo lo0"
- encoding: text
- provider: "{{ netconf }}"
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - "result.failed == true"
- - "result.msg is defined"
-
-- debug: msg="END netconf_text/bad_operator.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_command/tests/netconf_text/contains.yaml b/test/integration/targets/junos_command/tests/netconf_text/contains.yaml
deleted file mode 100644
index b13d5cd7a0..0000000000
--- a/test/integration/targets/junos_command/tests/netconf_text/contains.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-- debug: msg="START netconf_text/contains.yaml on connection={{ ansible_connection }}"
-
-- name: test contains operator with text encoding
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- display: text
- wait_for:
- - "result[1] contains lo0"
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- debug: msg="END netconf_text/contains.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_command/tests/netconf_text/invalid.yaml b/test/integration/targets/junos_command/tests/netconf_text/invalid.yaml
deleted file mode 100644
index d5afca290b..0000000000
--- a/test/integration/targets/junos_command/tests/netconf_text/invalid.yaml
+++ /dev/null
@@ -1,34 +0,0 @@
----
-- debug: msg="START netconf_text/invalid.yaml on connection={{ ansible_connection }}"
-
-- name: run invalid command
- junos_command:
- commands: show foo
- display: text
- provider: "{{ netconf }}"
- register: result
- ignore_errors: yes
-
-- debug: var=result
-
-- assert:
- that:
- - "result.failed == true"
- - "result.msg is defined"
-
-- name: run commands that include invalid command
- junos_command:
- commands:
- - show version
- - show foo
- display: text
- provider: "{{ netconf }}"
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - "result.failed == true"
- - "result.msg is defined"
-
-- debug: msg="END netconf_text/invalid.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_command/tests/netconf_text/output.yaml b/test/integration/targets/junos_command/tests/netconf_text/output.yaml
deleted file mode 100644
index 44c4362c14..0000000000
--- a/test/integration/targets/junos_command/tests/netconf_text/output.yaml
+++ /dev/null
@@ -1,62 +0,0 @@
----
-- debug: msg="START netconf_text/output.yaml on connection={{ ansible_connection }}"
-
-- name: get output for single command
- junos_command:
- commands: show version
- display: text
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- name: get output for multiple commands
- junos_command:
- commands:
- - show version
- - show route
- display: text
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- name: get output for single command with cli transport
- junos_command:
- commands: show version
- display: text
- provider:
- transport: cli
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- name: get output for multiple commands with cli transport
- junos_command:
- commands:
- - show version
- - show route
- display: text
- provider:
- transport: cli
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- debug: msg="END netconf_text/output.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_command/tests/netconf_text/timeout.yaml b/test/integration/targets/junos_command/tests/netconf_text/timeout.yaml
deleted file mode 100644
index 7e63d45b28..0000000000
--- a/test/integration/targets/junos_command/tests/netconf_text/timeout.yaml
+++ /dev/null
@@ -1,20 +0,0 @@
----
-- debug: msg="START netconf_text/timeout.yaml on connection={{ ansible_connection }}"
-
-- name: test bad condition
- junos_command:
- commands:
- - show version
- wait_for:
- - "result[0] contains bad_value_string"
- display: text
- provider: "{{ netconf }}"
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - "result.failed == true"
- - "result.msg is defined"
-
-- debug: msg="END netconf_text/timeout.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_command/tests/netconf_xml/bad_operator.yaml b/test/integration/targets/junos_command/tests/netconf_xml/bad_operator.yaml
deleted file mode 100644
index 01fda594ba..0000000000
--- a/test/integration/targets/junos_command/tests/netconf_xml/bad_operator.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-- debug: msg="START netconf_xml/bad_operator.yaml on connection={{ ansible_connection }}"
-
-- name: test bad operator with xml encoding
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- wait_for:
- - "result[1].rpc-reply.interface-information[0].physical-interface[0].name[0].data foo lo0"
- format: xml
- provider: "{{ netconf }}"
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - "result.failed == true"
- - "result.msg is defined"
-
-- debug: msg="END netconf_xml/bad_operator.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_command/tests/netconf_xml/contains.yaml b/test/integration/targets/junos_command/tests/netconf_xml/contains.yaml
deleted file mode 100644
index d6f0d53dfb..0000000000
--- a/test/integration/targets/junos_command/tests/netconf_xml/contains.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-- debug: msg="START netconf_xml/contains.yaml on connection={{ ansible_connection }}"
-
-- name: test contains operator with xml encoding
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- format: xml
- wait_for:
- - "result[1].rpc-reply.interface-information.physical-interface.name contains lo0"
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- debug: msg="END netconf_xml/contains.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_command/tests/netconf_xml/equal.yaml b/test/integration/targets/junos_command/tests/netconf_xml/equal.yaml
deleted file mode 100644
index 6547f3de8a..0000000000
--- a/test/integration/targets/junos_command/tests/netconf_xml/equal.yaml
+++ /dev/null
@@ -1,38 +0,0 @@
----
-- debug: msg="START netconf_xml/equal.yaml on connection={{ ansible_connection }}"
-
-- name: test == operator with xml encoding
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- wait_for:
- - "result[1].rpc-reply.interface-information.physical-interface.name == lo0"
- format: xml
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- name: test eq operator with json encoding
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- wait_for:
- - "result[1].rpc-reply.interface-information.physical-interface.name eq lo0"
- format: xml
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- debug: msg="END netconf_xml/equal.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_command/tests/netconf_xml/greaterthan.yaml b/test/integration/targets/junos_command/tests/netconf_xml/greaterthan.yaml
deleted file mode 100644
index 1ed736d518..0000000000
--- a/test/integration/targets/junos_command/tests/netconf_xml/greaterthan.yaml
+++ /dev/null
@@ -1,38 +0,0 @@
----
-- debug: msg="START netconf_xml/greaterthan.yaml on connection={{ ansible_connection }}"
-
-- name: test gt operator
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- format: xml
- wait_for:
- - "result[1].rpc-reply.interface-information.physical-interface.local-index gt 5"
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- name: test > operator
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- format: xml
- wait_for:
- - "result[1].rpc-reply.interface-information.physical-interface.local-index > 5"
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- debug: msg="END netconf_xml/greaterthan.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_command/tests/netconf_xml/greaterthanorequal.yaml b/test/integration/targets/junos_command/tests/netconf_xml/greaterthanorequal.yaml
deleted file mode 100644
index 866de9b21c..0000000000
--- a/test/integration/targets/junos_command/tests/netconf_xml/greaterthanorequal.yaml
+++ /dev/null
@@ -1,38 +0,0 @@
----
-- debug: msg="START netconf_xml/greaterthanorequal.yaml on connection={{ ansible_connection }}"
-
-- name: test ge operator
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- format: xml
- wait_for:
- - "result[1].rpc-reply.interface-information.physical-interface.local-index ge 6"
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- name: test >= operator
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- format: xml
- wait_for:
- - "result[1].rpc-reply.interface-information.physical-interface.local-index >= 6"
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- debug: msg="END netconf_xml/greaterthanorequal.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_command/tests/netconf_xml/invalid.yaml b/test/integration/targets/junos_command/tests/netconf_xml/invalid.yaml
deleted file mode 100644
index 43df80b4cf..0000000000
--- a/test/integration/targets/junos_command/tests/netconf_xml/invalid.yaml
+++ /dev/null
@@ -1,31 +0,0 @@
----
-- debug: msg="START netconf_xml/invalid.yaml on connection={{ ansible_connection }}"
-
-- name: run invalid command
- junos_command:
- commands: ['show foo']
- provider: "{{ netconf }}"
- register: result
- ignore_errors: yes
-- debug: var=result
-
-- assert:
- that:
- - "result.failed == true"
- - "result.msg is defined"
-
-- name: run commands that include invalid command
- junos_command:
- commands:
- - show version
- - show foo
- provider: "{{ netconf }}"
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - "result.failed == true"
- - "result.msg is defined"
-
-- debug: msg="END netconf_xml/invalid.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_command/tests/netconf_xml/lessthan.yaml b/test/integration/targets/junos_command/tests/netconf_xml/lessthan.yaml
deleted file mode 100644
index 03d8d91ee7..0000000000
--- a/test/integration/targets/junos_command/tests/netconf_xml/lessthan.yaml
+++ /dev/null
@@ -1,38 +0,0 @@
----
-- debug: msg="START netconf_xml/lessthan.yaml on connection={{ ansible_connection }}"
-
-- name: test lt operator
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- format: xml
- wait_for:
- - "result[1].rpc-reply.interface-information.physical-interface.local-index lt 7"
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- name: test < operator
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- format: xml
- wait_for:
- - "result[1].rpc-reply.interface-information.physical-interface.local-index lt 7"
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- debug: msg="END netconf_xml/lessthan.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_command/tests/netconf_xml/lessthanorequal.yaml b/test/integration/targets/junos_command/tests/netconf_xml/lessthanorequal.yaml
deleted file mode 100644
index 25643ae030..0000000000
--- a/test/integration/targets/junos_command/tests/netconf_xml/lessthanorequal.yaml
+++ /dev/null
@@ -1,38 +0,0 @@
----
-- debug: msg="START netconf_xml/lessthanorequal.yaml on connection={{ ansible_connection }}"
-
-- name: test le operator
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- format: xml
- wait_for:
- - "result[1].rpc-reply.interface-information.physical-interface.local-index le 6"
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- name: test <= operator
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- format: xml
- wait_for:
- - "result[1].rpc-reply.interface-information.physical-interface.local-index <= 6"
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- debug: msg="END netconf_xml/lessthanorequal.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_command/tests/netconf_xml/notequal.yaml b/test/integration/targets/junos_command/tests/netconf_xml/notequal.yaml
deleted file mode 100644
index 983177162e..0000000000
--- a/test/integration/targets/junos_command/tests/netconf_xml/notequal.yaml
+++ /dev/null
@@ -1,38 +0,0 @@
----
-- debug: msg="START netconf_xml/notequal.yaml on connection={{ ansible_connection }}"
-
-- name: test neq operator
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- format: xml
- wait_for:
- - "result[1].rpc-reply.interface-information.physical-interface.name neq em0"
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- name: test != operator
- junos_command:
- commands:
- - show version
- - show interfaces lo0
- format: xml
- wait_for:
- - "result[1].rpc-reply.interface-information.physical-interface.name neq em0"
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- debug: msg="END netconf_xml/notequal.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_command/tests/netconf_xml/output.yaml b/test/integration/targets/junos_command/tests/netconf_xml/output.yaml
deleted file mode 100644
index 36c63959f6..0000000000
--- a/test/integration/targets/junos_command/tests/netconf_xml/output.yaml
+++ /dev/null
@@ -1,63 +0,0 @@
----
-- debug: msg="START netconf_xml/output.yaml on connection={{ ansible_connection }}"
-
-- name: get output for single command
- junos_command:
- commands: ['show version']
- format: xml
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- name: get output for multiple commands
- junos_command:
- commands:
- - show version
- - show route
- format: xml
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- name: get output for single command with cli transport
- junos_command:
- commands: show version | display xml
- provider:
- transport: cli
- register: result
- connection: network_cli
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- name: get output for multiple commands with cli transport
- junos_command:
- commands:
- - show version
- - show route
- display: xml
- provider:
- transport: cli
- register: result
- connection: network_cli
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-- debug: msg="END netconf_xml/output.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_command/tests/netconf_xml/timeout.yaml b/test/integration/targets/junos_command/tests/netconf_xml/timeout.yaml
deleted file mode 100644
index 2b0ba88d79..0000000000
--- a/test/integration/targets/junos_command/tests/netconf_xml/timeout.yaml
+++ /dev/null
@@ -1,19 +0,0 @@
----
-- debug: msg="START netconf_xml/timeout.yaml on connection={{ ansible_connection }}"
-
-- name: test bad condition
- junos_command:
- commands:
- - show version
- wait_for:
- - "result[0] contains bad_value_string"
- provider: "{{ netconf }}"
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - "result.failed == true"
- - "result.msg is defined"
-
-- debug: msg="END netconf_xml/timeout.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_config/defaults/main.yaml b/test/integration/targets/junos_config/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/junos_config/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/junos_config/meta/main.yml b/test/integration/targets/junos_config/meta/main.yml
deleted file mode 100644
index 191a0f2ea1..0000000000
--- a/test/integration/targets/junos_config/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_junos_tests
diff --git a/test/integration/targets/junos_config/tasks/cli_config.yaml b/test/integration/targets/junos_config/tasks/cli_config.yaml
deleted file mode 100644
index a12f077120..0000000000
--- a/test/integration/targets/junos_config/tasks/cli_config.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
----
-- name: collect all cli 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/junos_config/tasks/main.yaml b/test/integration/targets/junos_config/tasks/main.yaml
deleted file mode 100644
index 31f5504714..0000000000
--- a/test/integration/targets/junos_config/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: netconf.yaml, tags: ['netconf'] }
-- { include: cli_config.yaml, tags: ['cli_config'] }
diff --git a/test/integration/targets/junos_config/tasks/netconf.yaml b/test/integration/targets/junos_config/tasks/netconf.yaml
deleted file mode 100644
index 59ef55adcd..0000000000
--- a/test/integration/targets/junos_config/tasks/netconf.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-- name: collect netconf test cases
- find:
- paths: "{{ role_path }}/tests/netconf"
- 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 case (connection=netconf)
- include: "{{ test_case_to_run }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_config/templates/basic/config.j2 b/test/integration/targets/junos_config/templates/basic/config.j2
deleted file mode 100644
index 5301504220..0000000000
--- a/test/integration/targets/junos_config/templates/basic/config.j2
+++ /dev/null
@@ -1,10 +0,0 @@
-interfaces {
- lo0 {
- unit 0 {
- family inet {
- address 192.0.2.1/32;
- }
- }
- }
-}
-
diff --git a/test/integration/targets/junos_config/templates/basic/config.set b/test/integration/targets/junos_config/templates/basic/config.set
deleted file mode 100644
index df436bba95..0000000000
--- a/test/integration/targets/junos_config/templates/basic/config.set
+++ /dev/null
@@ -1 +0,0 @@
-set interfaces lo0 unit 0 family inet address 192.0.2.1/32
diff --git a/test/integration/targets/junos_config/templates/basic/config.xml b/test/integration/targets/junos_config/templates/basic/config.xml
deleted file mode 100644
index a120d4bc4b..0000000000
--- a/test/integration/targets/junos_config/templates/basic/config.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-<interfaces>
- <interface>
- <name>lo0</name>
- <unit>
- <name>0</name>
- <family>
- <inet>
- <address>
- <name>192.0.2.1/32</name>
- </address>
- </inet>
- </family>
- </unit>
- </interface>
-</interfaces>
diff --git a/test/integration/targets/junos_config/tests/cli_config/cli_backup.yaml b/test/integration/targets/junos_config/tests/cli_config/cli_backup.yaml
deleted file mode 100644
index 1d43ba8198..0000000000
--- a/test/integration/targets/junos_config/tests/cli_config/cli_backup.yaml
+++ /dev/null
@@ -1,109 +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
- 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 }}"
- 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
- 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 }}"
- 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/junos_config/tests/cli_config/cli_basic.yaml b/test/integration/targets/junos_config/tests/cli_config/cli_basic.yaml
deleted file mode 100644
index 1aa64b6812..0000000000
--- a/test/integration/targets/junos_config/tests/cli_config/cli_basic.yaml
+++ /dev/null
@@ -1,61 +0,0 @@
----
-- debug: msg="START cli_config/cli_basic.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- cli_config: &rm1
- config: delete interfaces ge-0/0/1
-
-- name: setup
- cli_config: &rm2
- config: delete interfaces ge-0/0/2
-
-- name: configure device with config
- cli_config: &conf1
- config: set interfaces ge-0/0/1 description 'test-interface'
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: Idempotence
- cli_config: *conf1
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: configure device with config
- cli_config: &conf2
- config: set interfaces ge-0/0/2 description 'test-interface'
- register: result
-
-- name: test rollabck
- cli_config:
- rollback: 1
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'ge-0/0/2' in result.diff.prepared"
-
-- name: remove root-authethication (test error scenario)
- cli_config:
- config: "delete system root-authentication"
- ignore_errors: True
- register: result
-
-- assert:
- that:
- - "result.failed == true"
- - "'Missing mandatory statement' in result.msg"
-
-- name: teardown
- cli_config: *rm1
-
-- name: teardown
- cli_config: *rm2
-
-- debug: msg="END cli_config/cli_basic.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_config/tests/cli_config/cli_replace.yaml b/test/integration/targets/junos_config/tests/cli_config/cli_replace.yaml
deleted file mode 100644
index d395804650..0000000000
--- a/test/integration/targets/junos_config/tests/cli_config/cli_replace.yaml
+++ /dev/null
@@ -1,60 +0,0 @@
----
-- debug: msg="START cli_config/cli_replace.yaml on connection={{ ansible_connection }}"
-
-- name: set interface config
- cli_config:
- config: "{{ item }}"
- loop:
- - "delete interfaces ge-0/0/11"
- - set interfaces ge-0/0/11 description "test cli_config"
-
-- name: get running configuration
- cli_command:
- command: show configuration
- register: result
-
-- name: copy configuration to file
- copy:
- content: "{{ result['stdout'] }}"
- dest: /tmp/junos01.cfg
-
-- name: "modify interface ge-0/0/11 configuration"
- replace:
- path: /tmp/junos01.cfg
- regexp: 'test cli_config'
- replace: 'test cli_config replaced'
-
-- name: copy config file to remote host
- net_put:
- src: /tmp/junos01.cfg
- dest: /var/home/{{ ansible_user }}/junos01.cfg
-
-- name: replace syslog test file configuration
- cli_config:
- replace: "/var/home/{{ ansible_user }}/junos01.cfg"
-
-- name: get interface configuration
- cli_command:
- command: show configuration interfaces ge-0/0/11
- register: result
-
-- name: assert that interface config change is reflected on device
- assert:
- that:
- - "'test cli_config replaced' in result.stdout"
-
-- name: replace interface configuration (idempotent)
- cli_config:
- replace: "/var/home/{{ ansible_user }}/junos01.cfg"
- register: result
-
-- name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
-- name: delete interface config
- cli_config:
- config: "delete interfaces ge-0/0/11"
-
-- debug: msg="END cli_config/cli_replace.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_config/tests/netconf/backup.yaml b/test/integration/targets/junos_config/tests/netconf/backup.yaml
deleted file mode 100644
index a0d6bf9efe..0000000000
--- a/test/integration/targets/junos_config/tests/netconf/backup.yaml
+++ /dev/null
@@ -1,121 +0,0 @@
----
-- debug: msg="START netconf/backup.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- junos_config:
- lines:
- - set system host-name {{ inventory_hostname_short }}
- - delete interfaces lo0
- provider: "{{ netconf }}"
-
-- 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
- connection: local
- with_items: "{{backup_files.files|default([])}}"
-
-- name: configure device with config
- junos_config:
- src: basic/config.j2
- backup: yes
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "result.updates is not defined"
-
-- name: collect any backup files
- find:
- paths: "{{ role_path }}/backup"
- pattern: "{{ inventory_hostname_short }}_config*"
- register: backup_files
- connection: local
-
-- assert:
- that:
- - "backup_files.files is defined"
-
-- name: delete configurable backup file path
- file:
- path: "{{ item }}"
- state: absent
- with_items:
- - "{{ role_path }}/backup_test_dir/"
- - "{{ role_path }}/backup/backup.cfg"
-
-- name: take configuration backup in custom filename and directory path
- junos_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
- junos_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
- junos_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 netconf/backup.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_config/tests/netconf/bad_action.yaml b/test/integration/targets/junos_config/tests/netconf/bad_action.yaml
deleted file mode 100644
index 9012f3c846..0000000000
--- a/test/integration/targets/junos_config/tests/netconf/bad_action.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
----
-- debug: msg="START netconf/bad_action.yaml on connection={{ ansible_connection }}"
-
-- name: configure single bad_action command
- junos_config:
- lines:
- - 'invalid system foo'
- provider: "{{ netconf }}"
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - "result.failed == true"
-
-- debug: msg="END netconf/bad_action.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_config/tests/netconf/invalid.yaml b/test/integration/targets/junos_config/tests/netconf/invalid.yaml
deleted file mode 100644
index 26a2346422..0000000000
--- a/test/integration/targets/junos_config/tests/netconf/invalid.yaml
+++ /dev/null
@@ -1,29 +0,0 @@
----
-- debug: msg="START netconf/invalid.yaml on connection={{ ansible_connection }}"
-
-- name: configure single invalid command
- junos_config:
- lines:
- - 'set system foo'
- provider: "{{ netconf }}"
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - "result.failed == true"
-
-- name: configure multiple invalid command
- junos_config:
- lines:
- - 'set system host-name {{ inventory_hostname_short }}'
- - 'set system foo'
- provider: "{{ netconf }}"
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - "result.failed == true"
-
-- debug: msg="END netconf/invalid.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_config/tests/netconf/multiple.yaml b/test/integration/targets/junos_config/tests/netconf/multiple.yaml
deleted file mode 100644
index 1b59e580c3..0000000000
--- a/test/integration/targets/junos_config/tests/netconf/multiple.yaml
+++ /dev/null
@@ -1,49 +0,0 @@
----
-- debug: msg="START netconf/multiple.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- junos_config:
- lines:
- - "set system host-name {{ inventory_hostname_short }}"
- - "delete interfaces lo0"
- provider: "{{ netconf }}"
- register: test
-
-- name: configure multiple commands
- junos_config:
- lines:
- - 'set system host-name {{ inventory_hostname_short }}'
- - 'set interfaces lo0 unit 0 family inet address 192.0.2.1/32'
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- # Ensure host-name *hasn't* been updated
- - "'host-name;' not in result.diff.prepared"
- # Ensure interface has *been* updated
- - "'address 192.0.2.1/32' in result.diff.prepared"
-
-- name: check multiple commands idempotent
- junos_config:
- lines:
- - 'set system host-name {{ inventory_hostname_short }}'
- - 'set interfaces lo0 unit 0 family inet address 192.0.2.1/32'
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.diff is not defined"
-
-- name: teardown
- junos_config:
- lines:
- - "set system host-name {{ inventory_hostname_short }}"
- - "delete interfaces lo0"
- provider: "{{ netconf }}"
- register: test
-
-- debug: msg="END netconf/multiple.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_config/tests/netconf/single.yaml b/test/integration/targets/junos_config/tests/netconf/single.yaml
deleted file mode 100644
index 70eccfe372..0000000000
--- a/test/integration/targets/junos_config/tests/netconf/single.yaml
+++ /dev/null
@@ -1,82 +0,0 @@
----
-- debug: msg="START netconf/single.yaml on connection={{ ansible_connection }}"
-
-# Ensure that when we change the hostname to `localhost` we cause a change
-- name: setup
- junos_config:
- lines:
- - set system host-name {{ inventory_hostname_short }}
- provider: "{{ netconf }}"
-
-- name: configure single command
- junos_config:
- lines:
- - set system host-name localhost
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'+ host-name localhost;' in result.diff.prepared"
-
-- name: check single command idempotent
- junos_config:
- lines:
- - set system host-name localhost
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: confirm previous commit
- junos_config:
- confirm_commit: yes
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: teardown for rollback test
- junos_config:
- lines:
- - delete system syslog file test1
- provider: "{{ netconf }}"
-
-- name: Configure syslog file
- junos_config:
- lines:
- - set system syslog file test1 any any
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - result.diff.prepared is search("\+ *file test1")
- - result.diff.prepared is search("\+ *any any")
-
-- name: Rollback junos config
- junos_config:
- rollback: 1
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - result.diff.prepared is search("\+ *file test1")
- - result.diff.prepared is search("\+ *any any")
-
-- name: teardown
- junos_config:
- lines:
- - set system host-name {{ inventory_hostname_short }}
- provider: "{{ netconf }}"
-
-
-- debug: msg="END netconf/single.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_config/tests/netconf/src_basic.yaml b/test/integration/targets/junos_config/tests/netconf/src_basic.yaml
deleted file mode 100644
index 59a80890b6..0000000000
--- a/test/integration/targets/junos_config/tests/netconf/src_basic.yaml
+++ /dev/null
@@ -1,104 +0,0 @@
----
-- debug: msg="START netconf/src_basic.yaml on connection={{ ansible_connection }}"
-
-- name: setup
- junos_config:
- lines:
- - set system host-name {{ inventory_hostname_short }}
- - delete interfaces lo0
- provider: "{{ netconf }}"
-
-- name: configure device with text config
- junos_config:
- src: basic/config.j2
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: check device with config
- junos_config:
- src: basic/config.j2
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- junos_config:
- lines:
- - delete interfaces lo0
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: configure device with set config
- junos_config:
- src: basic/config.set
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'address 192.0.2.1/32' in result.diff.prepared"
-
-- name: check device with config
- junos_config:
- src: basic/config.set
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- junos_config:
- lines:
- - delete interfaces lo0
- provider: "{{ netconf }}"
- register: result
-- assert:
- that:
- - "result.changed == true"
-
-- name: configure device with xml config
- junos_config:
- src: basic/config.xml
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'address 192.0.2.1/32' in result.diff.prepared"
-
-- name: check device with config
- junos_config:
- src: basic/config.xml
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: teardown
- junos_config:
- lines:
- - delete interfaces lo0
- provider: "{{ netconf }}"
- register: result
-- assert:
- that:
- - "result.changed == true"
-
-- debug: msg="END netconf/src_basic.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_config/tests/netconf/src_invalid.yaml b/test/integration/targets/junos_config/tests/netconf/src_invalid.yaml
deleted file mode 100644
index f3ae2270ff..0000000000
--- a/test/integration/targets/junos_config/tests/netconf/src_invalid.yaml
+++ /dev/null
@@ -1,19 +0,0 @@
----
-- debug: msg="START netconf/src_invalid.yaml on connection={{ ansible_connection }}"
-
-
-# Defend https://github.com/ansible/ansible-modules-core/issues/4797
-- name: configure with invalid src
- junos_config:
- src: basic/foobar.j2
- provider: "{{ netconf }}"
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - "result.changed == false"
- - "result.failed == true"
- - "result.msg == 'path specified in src not found'"
-
-- debug: msg="END netconf/src_invalid.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_facts/defaults/main.yaml b/test/integration/targets/junos_facts/defaults/main.yaml
deleted file mode 100644
index 9ef5ba5165..0000000000
--- a/test/integration/targets/junos_facts/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "*"
-test_items: []
diff --git a/test/integration/targets/junos_facts/meta/main.yml b/test/integration/targets/junos_facts/meta/main.yml
deleted file mode 100644
index 191a0f2ea1..0000000000
--- a/test/integration/targets/junos_facts/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_junos_tests
diff --git a/test/integration/targets/junos_facts/tasks/main.yaml b/test/integration/targets/junos_facts/tasks/main.yaml
deleted file mode 100644
index cc27f174fd..0000000000
--- a/test/integration/targets/junos_facts/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: netconf.yaml, tags: ['netconf'] }
diff --git a/test/integration/targets/junos_facts/tasks/netconf.yaml b/test/integration/targets/junos_facts/tasks/netconf.yaml
deleted file mode 100644
index 9550210102..0000000000
--- a/test/integration/targets/junos_facts/tasks/netconf.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
-- name: collect netconf test cases
- find:
- paths: "{{ role_path }}/tests/netconf"
- 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 case (connection=netconf)
- include: "{{ test_case_to_run }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_facts/tests/netconf/facts.yaml b/test/integration/targets/junos_facts/tests/netconf/facts.yaml
deleted file mode 100644
index e687f32cd3..0000000000
--- a/test/integration/targets/junos_facts/tests/netconf/facts.yaml
+++ /dev/null
@@ -1,110 +0,0 @@
----
-- debug: msg="START netconf/facts.yaml on connection={{ ansible_connection }}"
-
-
-- name: Collect default facts from device
- junos_facts:
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "'ansible_net_hostname' in result['ansible_facts']"
- - "'ansible_net_interfaces' in result['ansible_facts']"
- - "'ansible_net_memfree_mb' in result['ansible_facts']"
-
-- name: Collect config facts from device
- junos_facts:
- gather_subset: config
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "'ansible_net_config' in result['ansible_facts']"
- - "'ansible_net_interfaces' not in result['ansible_facts']"
- - "'ansible_net_memfree_mb' not in result['ansible_facts']"
-
-- name: Collect all facts from device except hardware
- junos_facts:
- gather_subset: "!hardware"
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "'ansible_net_config' in result['ansible_facts']"
- - "'ansible_net_interfaces' in result['ansible_facts']"
- - "'ansible_net_memfree_mb' not in result['ansible_facts']"
-
-- name: Invalid facts subset value
- junos_facts:
- gather_subset: test
- provider: "{{ netconf }}"
- ignore_errors: yes
- register: result
-
-- assert:
- that:
- - "result.failed == true"
- - "'Subset must be one of' in result.msg"
-
-- name: Collect config facts from device in set format
- junos_facts:
- gather_subset: config
- config_format: set
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "'set system services netconf ssh' in result['ansible_facts']['ansible_net_config']"
-
-- name: Collect config facts from device in xml format
- junos_facts:
- gather_subset: config
- config_format: xml
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "'<netconf>' in result['ansible_facts']['ansible_net_config']"
-
-- name: Collect config facts from device in json format
- junos_facts:
- gather_subset: config
- config_format: json
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "'{{ result['ansible_facts']['ansible_net_config']['configuration'][0]['system'][0]['service'][0]['netconf'] }}' is defined"
- when: ansible_net_version == "15.1X49-D15.4"
-
-- assert:
- that:
- - "result.changed == false"
- - "'ssh' in result['ansible_facts']['ansible_net_config']['configuration']['system']['services']['netconf']"
- when: ansible_net_version == "17.3R1.10"
-
-- name: Collect config facts from device in text format
- junos_facts:
- gather_subset: config
- config_format: text
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "'netconf {' in result['ansible_facts']['ansible_net_config']"
-
-- debug: msg="END netconf/facts.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_interface/aliases b/test/integration/targets/junos_interface/aliases
deleted file mode 100644
index e69de29bb2..0000000000
--- a/test/integration/targets/junos_interface/aliases
+++ /dev/null
diff --git a/test/integration/targets/junos_interface/defaults/main.yaml b/test/integration/targets/junos_interface/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/junos_interface/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/junos_interface/meta/main.yml b/test/integration/targets/junos_interface/meta/main.yml
deleted file mode 100644
index 191a0f2ea1..0000000000
--- a/test/integration/targets/junos_interface/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_junos_tests
diff --git a/test/integration/targets/junos_interface/tasks/main.yaml b/test/integration/targets/junos_interface/tasks/main.yaml
deleted file mode 100644
index cc27f174fd..0000000000
--- a/test/integration/targets/junos_interface/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: netconf.yaml, tags: ['netconf'] }
diff --git a/test/integration/targets/junos_interface/tasks/netconf.yaml b/test/integration/targets/junos_interface/tasks/netconf.yaml
deleted file mode 100644
index 8c95360c6b..0000000000
--- a/test/integration/targets/junos_interface/tasks/netconf.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-- name: collect all netconf test cases
- find:
- paths: "{{ role_path }}/tests/netconf"
- 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 case (connection=netconf)
- include: "{{ test_case_to_run }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_interface/tests/netconf/basic.yaml b/test/integration/targets/junos_interface/tests/netconf/basic.yaml
deleted file mode 100644
index ff2990db74..0000000000
--- a/test/integration/targets/junos_interface/tests/netconf/basic.yaml
+++ /dev/null
@@ -1,299 +0,0 @@
----
-- debug: msg="START junos_interface netconf/basic.yaml on connection={{ ansible_connection }}"
-
-- name: setup remove interface
- junos_interface:
- name: ge-0/0/1
- description: test-interface
- state: absent
- provider: "{{ netconf }}"
-
-- name: Create interface
- junos_interface:
- name: ge-0/0/1
- description: test-interface
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>ge-0/0/1</name>' in config.xml"
- - "'<description>test-interface</description>' in config.xml"
-
-- name: Create interface (idempotent)
- junos_interface:
- name: ge-0/0/1
- description: test-interface
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Deactivate interface configuration
- junos_interface:
- name: ge-0/0/1
- description: test-interface
- state: present
- active: False
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<interface inactive=\"inactive\">' in config.xml"
- - "'<name>ge-0/0/1</name>' in config.xml"
-
-- name: Activate interface configuration
- junos_interface:
- name: ge-0/0/1
- description: test-interface
- state: present
- active: True
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>ge-0/0/1</name>' in config.xml"
-
-- name: Configure interface attributes
- junos_interface:
- name: ge-0/0/1
- description: test-interface
- state: present
- speed: 1g
- mtu: 256
- duplex: full
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>ge-0/0/1</name>' in config.xml"
- - "'<link-mode>full-duplex</link-mode>' in config.xml"
- - "'<mtu>256</mtu>' in config.xml"
- - "'<speed>1g</speed>' in config.xml"
- - "'<description>test-interface</description>' in config.xml"
-
-- name: Disable interface
- junos_interface:
- name: ge-0/0/1
- description: test-interface
- enabled: False
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - result.diff.prepared is search("\+ *disable")
-
-- name: Enable interface
- junos_interface:
- name: ge-0/0/1
- description: test-interface
- enabled: True
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - result.diff.prepared is search("\- *disable")
-
-- name: Delete interface
- junos_interface:
- name: ge-0/0/1
- description: test-interface
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>ge-0/0/1</name>' not in config.xml"
-
-- name: Aggregate setup- delete interface ge-0/0/1
- junos_interface:
- name: ge-0/0/1
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- name: Aggregate setup- delete interface ge-0/0/2
- junos_interface:
- name: ge-0/0/2
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- name: Set interface on aggregate
- junos_interface:
- aggregate:
- - { name: ge-0/0/1, description: test-interface-1, speed: 1g, mtu: 512}
- - { name: ge-0/0/2, description: test-interface-2, speed: 10m, mtu: 256}
- duplex: full
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - result.diff.prepared is search("\+ *ge-0/0/1")
- - result.diff.prepared is search("\+ *description test-interface-1")
- - result.diff.prepared is search("\+ *speed 1g")
- - result.diff.prepared is search("\+ *mtu 512")
- - result.diff.prepared is search("\+ *link-mode full-duplex")
- - result.diff.prepared is search("\+ *description test-interface-2")
- - result.diff.prepared is search("\+ *speed 10m")
- - result.diff.prepared is search("\+ * mtu 256")
- - result.diff.prepared is search("\+ *link-mode full-duplex")
-
-- name: Set interface on aggregate (idempotent)
- junos_interface:
- aggregate:
- - { name: ge-0/0/1, description: test-interface-1, speed: 1g, mtu: 512 }
- - { name: ge-0/0/2, description: test-interface-2, speed: 10m, mtu: 256 }
- duplex: full
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- name: Disable interface on aggregate
- junos_interface:
- aggregate:
- - name: ge-0/0/1
- - name: ge-0/0/2
- enabled: False
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - result.diff.prepared is search("\+ *disable")
-
-- name: Enable interface on aggregate
- junos_interface:
- aggregate:
- - name: ge-0/0/1
- - name: ge-0/0/2
- enabled: True
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - result.diff.prepared is search("\- *disable")
-
-- name: Deactivate interface configuration on aggregate
- junos_interface:
- aggregate:
- - { name: ge-0/0/1, description: test-interface-1, speed: 1g, mtu: 512 }
- - { name: ge-0/0/2, description: test-interface-2, speed: 10m, mtu: 256 }
- duplex: full
- active: False
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - result.diff.prepared is search("! *inactive[:] ge-0/0/1")
- - result.diff.prepared is search("! *inactive[:] ge-0/0/2")
-
-- name: Activate interface configuration on aggregate
- junos_interface:
- aggregate:
- - { name: ge-0/0/1, description: test-interface-1, speed: 1g, mtu: 512 }
- - { name: ge-0/0/2, description: test-interface-2, speed: 10m, mtu: 256 }
- duplex: full
- active: True
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - result.diff.prepared is search("! *active[:] ge-0/0/1")
- - result.diff.prepared is search("! *active[:] ge-0/0/2")
-
-- name: Delete interface on aggregate
- junos_interface:
- aggregate:
- - name: ge-0/0/1
- - name: ge-0/0/2
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - result.diff.prepared is search("\- *ge-0/0/1")
- - result.diff.prepared is search("\- *description test-interface-1")
- - result.diff.prepared is search("\- *speed 1g")
- - result.diff.prepared is search("\- *mtu 512")
- - result.diff.prepared is search("\- *link-mode full-duplex")
- - result.diff.prepared is search("\- *description test-interface-2")
- - result.diff.prepared is search("\- *speed 10m")
- - result.diff.prepared is search("\- * mtu 256")
- - result.diff.prepared is search("\- *link-mode full-duplex")
-
-- name: Delete interface on aggregate (idempotent)
- junos_interface:
- aggregate:
- - name: ge-0/0/1
- - name: ge-0/0/2
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- debug: msg="END junos_interface netconf/basic.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_interface/tests/netconf/intent.yaml b/test/integration/targets/junos_interface/tests/netconf/intent.yaml
deleted file mode 100644
index 91104afbde..0000000000
--- a/test/integration/targets/junos_interface/tests/netconf/intent.yaml
+++ /dev/null
@@ -1,96 +0,0 @@
----
-- debug: msg="START junos_interface netconf/intent.yaml on connection={{ ansible_connection }}"
-
-- name: get facts
- junos_facts:
- provider: "{{ netconf }}"
- register: result
-
-
-- name: Define interface name for vSRX
- set_fact:
- intf_name: pp0
- when: result['ansible_facts']['ansible_net_model'] is search("vSRX*")
-
-- name: Define interface name for vsrx
- set_fact:
- intf_name: pp0
- when: result['ansible_facts']['ansible_net_model'] is search("vsrx")
-
-- name: Define interface name for vQFX
- set_fact:
- intf_name: gr-0/0/0
- when: result['ansible_facts']['ansible_net_model'] is search("vqfx*")
-
-- name: Check intent arguments
- junos_interface:
- name: "{{ intf_name }}"
- state: up
- tx_rate: ge(0)
- rx_rate: le(0)
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.failed == false"
-
-- name: Check intent arguments (failed condition)
- junos_interface:
- name: "{{ intf_name }}"
- state: down
- tx_rate: gt(0)
- rx_rate: lt(0)
- provider: "{{ netconf }}"
- ignore_errors: yes
- register: result
-
-- assert:
- that:
- - "result.failed == true"
- - "'state eq(down)' in result.failed_conditions"
- - "'tx_rate gt(0)' in result.failed_conditions"
- - "'rx_rate lt(0)' in result.failed_conditions"
-
-- name: Config + intent
- junos_interface:
- name: "{{ intf_name }}"
- enabled: False
- state: down
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.failed == false"
- - result.diff.prepared is search("\+ *disable")
-
-- name: Config + intent (fail)
- junos_interface:
- name: "{{ intf_name }}"
- enabled: False
- state: up
- provider: "{{ netconf }}"
- ignore_errors: yes
- register: result
-
-- assert:
- that:
- - "result.failed == true"
- - "'state eq(up)' in result.failed_conditions"
-
-- name: Aggregate config + intent (pass)
- junos_interface:
- aggregate:
- - name: "{{ intf_name }}"
- enabled: True
- state: up
- provider: "{{ netconf }}"
- ignore_errors: yes
- register: result
-
-- assert:
- that:
- - "result.failed == false"
-
-- debug: msg="END junos_interface netconf/intent.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_interface/tests/netconf/net_interface.yaml b/test/integration/targets/junos_interface/tests/netconf/net_interface.yaml
deleted file mode 100644
index 5b3bba2ba6..0000000000
--- a/test/integration/targets/junos_interface/tests/netconf/net_interface.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
----
-- debug: msg="START junos netconf/net_interface.yaml on connection={{ ansible_connection }}"
-
-# Add minimal testcase to check args are passed correctly to
-# implementation module and module run is successful
-
-- name: setup remove interface
- net_interface:
- name: ge-0/0/1
- description: test-interface
- state: absent
- provider: "{{ netconf }}"
-
-- name: Create interface using platform agnostic module
- net_interface:
- name: ge-0/0/1
- description: test-interface
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>ge-0/0/1</name>' in config.xml"
- - "'<description>test-interface</description>' in config.xml"
-
-- name: teardown remove interface
- net_interface:
- name: ge-0/0/1
- description: test-interface
- state: absent
- provider: "{{ netconf }}"
-
-- debug: msg="END junos netconf/net_interface.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_interfaces/defaults/main.yaml b/test/integration/targets/junos_interfaces/defaults/main.yaml
deleted file mode 100644
index 164afead28..0000000000
--- a/test/integration/targets/junos_interfaces/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "[^_].*"
-test_items: []
diff --git a/test/integration/targets/junos_interfaces/meta/main.yaml b/test/integration/targets/junos_interfaces/meta/main.yaml
deleted file mode 100644
index 191a0f2ea1..0000000000
--- a/test/integration/targets/junos_interfaces/meta/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_junos_tests
diff --git a/test/integration/targets/junos_interfaces/tasks/main.yaml b/test/integration/targets/junos_interfaces/tasks/main.yaml
deleted file mode 100644
index cc27f174fd..0000000000
--- a/test/integration/targets/junos_interfaces/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: netconf.yaml, tags: ['netconf'] }
diff --git a/test/integration/targets/junos_interfaces/tasks/netconf.yaml b/test/integration/targets/junos_interfaces/tasks/netconf.yaml
deleted file mode 100644
index 73b91adfaa..0000000000
--- a/test/integration/targets/junos_interfaces/tasks/netconf.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-- name: collect all netconf test cases
- find:
- paths: "{{ role_path }}/tests/netconf"
- patterns: "{{ testcase }}.yaml"
- use_regex: true
- connection: local
- register: test_cases
-
-- 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 }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_interfaces/tests/netconf/_remove_config.yaml b/test/integration/targets/junos_interfaces/tests/netconf/_remove_config.yaml
deleted file mode 100644
index 24e673c05e..0000000000
--- a/test/integration/targets/junos_interfaces/tests/netconf/_remove_config.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
----
-- debug:
- msg: "Start junos_nterfaces deleted remove interface config ansible_connection={{ ansible_connection }}"
-
-- name: "Setup - remove interface config"
- junos_config:
- lines:
- - delete interfaces ge-0/0/1
- - delete interfaces ge-0/0/2
- - delete interfaces ge-0/0/3
- - delete interfaces lo0
-
-- debug:
- msg: "End junos_nterfaces deleted remove interface config ansible_connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_interfaces/tests/netconf/deleted.yaml b/test/integration/targets/junos_interfaces/tests/netconf/deleted.yaml
deleted file mode 100644
index 985b62f92b..0000000000
--- a/test/integration/targets/junos_interfaces/tests/netconf/deleted.yaml
+++ /dev/null
@@ -1,85 +0,0 @@
----
-- debug:
- msg: "START junos_interfaces deleted integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- set_fact:
- expected_deleted_output:
- - name: fxp0
- enabled: true
-
-- block:
- - name: Configure initial state for interface
- junos_interfaces: &initial
- config:
- - name: ge-0/0/1
- description: "Configured by Ansible - Interface 1"
- mtu: 1024
- speed: 100m
- enabled: False
- duplex: full-duplex
- hold_time:
- up: 2000
- down: 2200
- - name: ge-0/0/2
- description: "Configured by Ansible - Interface 2"
- mtu: 2048
- speed: 10m
- hold_time:
- up: 3000
- down: 3200
- state: merged
- register: result
-
- - name: Delete the provided interface configuration from running configuration
- junos_interfaces: &deleted
- config:
- - name: ge-0/0/1
- - name: ge-0/0/2
- state: deleted
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_deleted_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Delete the provided interface configuration from running configuration (IDEMPOTENT)
- junos_interfaces: *deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- - name: Configure initial state for interface
- junos_interfaces: *initial
- register: result
-
- - name: Delete the all interface configuration from running configuration
- junos_interfaces:
- state: deleted
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_deleted_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Delete the all interface configuration from running configuration (IDEMPOTENT)
- junos_interfaces:
- state: deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_interfaces deleted integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_interfaces/tests/netconf/groups.yaml b/test/integration/targets/junos_interfaces/tests/netconf/groups.yaml
deleted file mode 100644
index 7c1330bc3c..0000000000
--- a/test/integration/targets/junos_interfaces/tests/netconf/groups.yaml
+++ /dev/null
@@ -1,49 +0,0 @@
----
-- debug:
- msg: "START junos_interfaces groups integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- set_fact:
- expected_group_output:
- - name: ge-0/0/11
- description: "within test group"
- enabled: true
- - name: ge-0/0/12
- description: "global interface config"
- enabled: true
- - name: fxp0
- enabled: true
-
-- name: "Teardown delete interface configuration"
- junos_config: &delete_interface_config
- lines:
- - delete apply-groups test
- - delete groups test interfaces ge-0/0/11
- - delete interfaces ge-0/0/12
-
-- block:
- - name: "Setup interface configuration"
- junos_config:
- lines:
- - set groups test interfaces ge-0/0/11 description "within test group"
- - set apply-groups test
- - set interfaces ge-0/0/12 description "global interface config"
-
- - name: "get junos interfaces facts"
- junos_facts:
- gather_subset: min
- gather_network_resources: interfaces
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_group_output | symmetric_difference(result['ansible_facts']['ansible_network_resources']['interfaces'])|length == 0 }}"
-
- always:
- - name: "Teardown delete interface configuration"
- junos_config: *delete_interface_config
-
-- debug:
- msg: "END junos_interfaces merged integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_interfaces/tests/netconf/merged.yaml b/test/integration/targets/junos_interfaces/tests/netconf/merged.yaml
deleted file mode 100644
index 1370fad7f8..0000000000
--- a/test/integration/targets/junos_interfaces/tests/netconf/merged.yaml
+++ /dev/null
@@ -1,70 +0,0 @@
----
-- debug:
- msg: "START junos_interfaces merged integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- set_fact:
- expected_merged_output:
- - name: ge-0/0/1
- description: "Configured by Ansible - Interface 1"
- mtu: 1024
- speed: 100m
- enabled: false
- duplex: full-duplex
- hold_time:
- up: 2000
- down: 2200
- - name: ge-0/0/2
- description: "Configured by Ansible - Interface 2"
- mtu: 2048
- speed: 10m
- enabled: true
- hold_time:
- up: 3000
- down: 3200
- - name: fxp0
- enabled: true
-
-- block:
- - name: Merge the provided configuration with the exisiting running configuration
- junos_interfaces: &merged
- config:
- - name: ge-0/0/1
- description: "Configured by Ansible - Interface 1"
- mtu: 1024
- speed: 100m
- enabled: False
- duplex: full-duplex
- hold_time:
- up: 2000
- down: 2200
- - name: ge-0/0/2
- description: "Configured by Ansible - Interface 2"
- mtu: 2048
- speed: 10m
- hold_time:
- up: 3000
- down: 3200
- state: merged
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_merged_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Merge the provided configuration with the existing running configuration (IDEMPOTENT)
- junos_interfaces: *merged
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_interfaces merged integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_interfaces/tests/netconf/overridden.yaml b/test/integration/targets/junos_interfaces/tests/netconf/overridden.yaml
deleted file mode 100644
index 150561d1ff..0000000000
--- a/test/integration/targets/junos_interfaces/tests/netconf/overridden.yaml
+++ /dev/null
@@ -1,64 +0,0 @@
----
-- debug:
- msg: "START junos_interfaces overridden integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- set_fact:
- expected_overridden_output:
- - name: ge-0/0/1
- description: "Overridden by Ansible - Interface 1"
- enabled: true
- - name: fxp0
- enabled: true
-
-- block:
- - name: Configure initial state for interface
- junos_interfaces:
- config:
- - name: ge-0/0/1
- description: "Configured by Ansible - Interface 1"
- mtu: 1024
- speed: 100m
- enabled: False
- duplex: full-duplex
- hold_time:
- up: 2000
- down: 2200
- - name: ge-0/0/2
- description: "Configured by Ansible - Interface 2"
- mtu: 2048
- speed: 10m
- hold_time:
- up: 3000
- down: 3200
- state: merged
- register: result
-
- - name: Override the provided configuration with the exisiting running configuration
- junos_interfaces: &overridden
- config:
- - name: ge-0/0/1
- description: "Overridden by Ansible - Interface 1"
- state: overridden
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_overridden_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Override the provided configuration with the existing running configuration (IDEMPOTENT)
- junos_interfaces: *overridden
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_interfaces overridden integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_interfaces/tests/netconf/replaced.yaml b/test/integration/targets/junos_interfaces/tests/netconf/replaced.yaml
deleted file mode 100644
index 886a6066e8..0000000000
--- a/test/integration/targets/junos_interfaces/tests/netconf/replaced.yaml
+++ /dev/null
@@ -1,77 +0,0 @@
----
-- debug:
- msg: "START junos_interfaces replaced integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- set_fact:
- expected_replaced_output:
- - name: ge-0/0/1
- description: "Replaced by Ansible - Interface 1"
- mtu: 2048
- speed: 10m
- enabled: true
- - name: ge-0/0/2
- description: "Configured by Ansible - Interface 2"
- mtu: 2048
- speed: 10m
- enabled: true
- hold_time:
- up: 3000
- down: 3200
- - name: fxp0
- enabled: true
-
-- block:
- - name: Configure initial state for interface
- junos_interfaces:
- config:
- - name: ge-0/0/1
- description: "Configured by Ansible - Interface 1"
- mtu: 1024
- speed: 100m
- enabled: False
- duplex: full-duplex
- hold_time:
- up: 2000
- down: 2200
- - name: ge-0/0/2
- description: "Configured by Ansible - Interface 2"
- mtu: 2048
- speed: 10m
- hold_time:
- up: 3000
- down: 3200
- state: merged
- register: result
-
- - name: Replace the provided configuration with the exisiting running configuration
- junos_interfaces: &replaced
- config:
- - name: ge-0/0/1
- description: "Replaced by Ansible - Interface 1"
- mtu: 2048
- speed: 10m
- enabled: True
- state: replaced
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_replaced_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Replace the provided configuration with the existing running configuration (IDEMPOTENT)
- junos_interfaces: *replaced
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_interfaces replaced integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_interfaces/tests/netconf/rtt.yaml b/test/integration/targets/junos_interfaces/tests/netconf/rtt.yaml
deleted file mode 100644
index 5590810391..0000000000
--- a/test/integration/targets/junos_interfaces/tests/netconf/rtt.yaml
+++ /dev/null
@@ -1,98 +0,0 @@
----
-- debug:
- msg: "START junos_interfaces round trip integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- set_fact:
- expected_revert_output:
- - name: ge-0/0/1
- description: "Configured by Ansible - Interface 1"
- mtu: 1024
- speed: 100m
- enabled: false
- duplex: full-duplex
- hold_time:
- up: 2000
- down: 2200
- - name: ge-0/0/2
- description: "Configured by Ansible - Interface 2"
- mtu: 2048
- speed: 10m
- enabled: true
- hold_time:
- up: 3000
- down: 3200
- - name: fxp0
- enabled: true
-
-- block:
- - name: Apply the provided configuration (base config)
- junos_interfaces:
- config:
- - name: ge-0/0/1
- description: "Configured by Ansible - Interface 1"
- mtu: 1024
- speed: 100m
- enabled: False
- duplex: full-duplex
- hold_time:
- up: 2000
- down: 2200
- - name: ge-0/0/2
- description: "Configured by Ansible - Interface 2"
- mtu: 2048
- speed: 10m
- enabled: True
- hold_time:
- up: 3000
- down: 3200
- state: merged
- register: base_config
-
- - name: Gather interfaces facts
- junos_facts:
- gather_subset:
- - default
- gather_network_resources:
- - interfaces
-
- - name: Apply the provided configuration (config to be reverted)
- junos_interfaces:
- config:
- - name: ge-0/0/1
- description: "Configured by Ansible - Interface 1 modified"
- mtu: 3048
- speed: 10m
- enabled: True
- duplex: half-duplex
- hold_time:
- up: 3000
- down: 2200
- - name: ge-0/0/2
- description: "Configured by Ansible - Interface 2 modified"
- mtu: 4048
- speed: 100m
- enabled: False
- hold_time:
- up: 4000
- down: 5200
- state: merged
- register: result
-
- - name: Assert that changes were applied
- assert:
- that: "result['changed'] == true"
-
- - name: Revert back to base config using facts round trip
- junos_interfaces:
- config: "{{ ansible_facts['network_resources']['interfaces'] }}"
- state: replaced
- register: revert
-
- - name: Assert that config was reverted
- assert:
- that: "{{ expected_revert_output | symmetric_difference(revert['after']) |length == 0 }}"
-
- always:
- - include_tasks: _remove_config.yaml
diff --git a/test/integration/targets/junos_l2_interface/defaults/main.yaml b/test/integration/targets/junos_l2_interface/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/junos_l2_interface/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/junos_l2_interface/meta/main.yml b/test/integration/targets/junos_l2_interface/meta/main.yml
deleted file mode 100644
index 191a0f2ea1..0000000000
--- a/test/integration/targets/junos_l2_interface/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_junos_tests
diff --git a/test/integration/targets/junos_l2_interface/tasks/main.yaml b/test/integration/targets/junos_l2_interface/tasks/main.yaml
deleted file mode 100644
index cc27f174fd..0000000000
--- a/test/integration/targets/junos_l2_interface/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: netconf.yaml, tags: ['netconf'] }
diff --git a/test/integration/targets/junos_l2_interface/tasks/netconf.yaml b/test/integration/targets/junos_l2_interface/tasks/netconf.yaml
deleted file mode 100644
index fc9c0e248d..0000000000
--- a/test/integration/targets/junos_l2_interface/tasks/netconf.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-- name: collect all netconf test cases
- find:
- paths: "{{ role_path }}/tests/netconf"
- 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 case (connection=netconf)
- include: "{{ test_case_to_run }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_first_found: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_l2_interface/tests/netconf/basic.yaml b/test/integration/targets/junos_l2_interface/tests/netconf/basic.yaml
deleted file mode 100644
index c922596fef..0000000000
--- a/test/integration/targets/junos_l2_interface/tests/netconf/basic.yaml
+++ /dev/null
@@ -1,311 +0,0 @@
----
-- debug: msg="START junos_l2_interface netconf/basic.yaml on connection={{ ansible_connection }}"
-
-- name: setup - remove interface address
- junos_l2_interface:
- name: ge-0/0/1
- state: absent
- provider: "{{ netconf }}"
-
-- name: setup - remove interface address
- junos_l2_interface:
- name: ge-0/0/2
- state: absent
- provider: "{{ netconf }}"
-
-- name: Setup create vlans
- junos_vlan:
- vlan_id: "{{ item.vlan_id }}"
- name: "{{ item.name }}"
- state: present
- provider: "{{ netconf }}"
- with_items:
- - { vlan_id: 100, name: red }
- - { vlan_id: 200, name: blue }
- - { vlan_id: 300, name: green }
-
-- name: Configure interface in access mode
- junos_l2_interface:
- name: ge-0/0/1
- description: test-interface-access
- mode: access
- access_vlan: red
- active: True
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - result.diff.prepared is search("\+ *ge-0/0/1")
- - result.diff.prepared is search("\+ *description test-interface-access")
- - result.diff.prepared is search("\+ *unit 0")
- - result.diff.prepared is search("\+ *family ethernet-switching")
- - result.diff.prepared is search("\+ *interface-mode access")
- - result.diff.prepared is search("\+ *members red")
-
-- name: Configure interface in access mode (idempotent)
- junos_l2_interface:
- name: ge-0/0/1
- description: test-interface-access
- mode: access
- access_vlan: red
- active: True
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Deactivate interface in access mode
- junos_l2_interface:
- name: ge-0/0/1
- description: test-interface-access
- mode: access
- access_vlan: red
- active: False
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - result.diff.prepared is search("! *inactive[:] ge-0/0/1")
- - result.diff.prepared is search("! *inactive[:] unit 0")
- - result.diff.prepared is search("! *inactive[:] family ethernet-switching")
- - result.diff.prepared is search("! *inactive[:] vlan")
-
-- name: Activate interface in access mode
- junos_l2_interface:
- name: ge-0/0/1
- description: test-interface-access
- mode: access
- access_vlan: red
- active: True
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - result.diff.prepared is search("! *active[:] ge-0/0/1")
- - result.diff.prepared is search("! *active[:] unit 0")
- - result.diff.prepared is search("! *active[:] family ethernet-switching")
- - result.diff.prepared is search("! *active[:] vlan")
-
-- name: Change interface to trunk mode
- junos_l2_interface:
- name: ge-0/0/1
- description: test-interface-trunk
- mode: trunk
- trunk_vlans:
- - blue
- - green
- native_vlan: 100
- active: True
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - result.diff.prepared is search("\- *description test-interface-access")
- - result.diff.prepared is search("\+ *description test-interface-trunk")
- - result.diff.prepared is search("\+ *native-vlan-id 100")
- - result.diff.prepared is search("\- *interface-mode access")
- - result.diff.prepared is search("\+ *interface-mode trunk")
- - result.diff.prepared is search("\- *members red")
- - result.diff.prepared is search("\+ *members \[ blue green \]")
-
-- name: Change interface to trunk mode (idempotent)
- junos_l2_interface:
- name: ge-0/0/1
- description: test-interface-trunk
- mode: trunk
- trunk_vlans:
- - blue
- - green
- native_vlan: 100
- active: True
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Delete l2 interface
- junos_l2_interface:
- name: ge-0/0/1
- description: test-interface-trunk
- mode: trunk
- trunk_vlans:
- - blue
- - green
- native_vlan: 100
- active: True
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - result.diff.prepared is search("\- *description test-interface-trunk")
- - result.diff.prepared is search("\- *native-vlan-id 100")
- - result.diff.prepared is search("\- *unit 0")
- - result.diff.prepared is search("\- *family ethernet-switching")
- - result.diff.prepared is search("\- *interface-mode trunk")
- - result.diff.prepared is search("\- *members \[ blue green \]")
-
-- name: Delete l2 interface (idempotent)
- junos_l2_interface:
- name: ge-0/0/1
- description: test-interface-trunk
- mode: trunk
- trunk_vlans:
- - blue
- - green
- native_vlan: 100
- active: True
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Configure interface in access and trunk mode using aggregate
- junos_l2_interface:
- aggregate:
- - name: ge-0/0/1
- description: test-interface-access
- mode: access
- access_vlan: red
- - name: ge-0/0/2
- description: test-interface-trunk
- mode: trunk
- trunk_vlans:
- - blue
- - green
- native_vlan: 100
- active: True
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - result.diff.prepared is search("\+ *ge-0/0/1")
- - result.diff.prepared is search("\+ *description test-interface-access")
- - result.diff.prepared is search("\+ *unit 0")
- - result.diff.prepared is search("\+ *family ethernet-switching")
- - result.diff.prepared is search("\+ *interface-mode access")
- - result.diff.prepared is search("\+ *members red")
- - result.diff.prepared is search("\+ *ge-0/0/2")
- - result.diff.prepared is search("\+ *description test-interface-trunk")
- - result.diff.prepared is search("\+ *native-vlan-id 100")
- - result.diff.prepared is search("\+ *interface-mode trunk")
- - result.diff.prepared is search("\+ *members \[ blue green \]")
-
-- name: Configure interface in access and trunk mode using aggregate (idempotent)
- junos_l2_interface:
- aggregate:
- - name: ge-0/0/1
- description: test-interface-access
- mode: access
- access_vlan: red
- - name: ge-0/0/2
- description: test-interface-trunk
- mode: trunk
- trunk_vlans:
- - blue
- - green
- native_vlan: 100
- active: True
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Delete interface in access and trunk mode using aggregate
- junos_l2_interface:
- aggregate:
- - name: ge-0/0/1
- description: test-interface-access
- mode: access
- access_vlan: red
- - name: ge-0/0/2
- description: test-interface-trunk
- mode: trunk
- trunk_vlans:
- - blue
- - green
- native_vlan: 100
- active: True
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-
-- assert:
- that:
- - 'result.changed == true'
- - result.diff.prepared is search("\- *ge-0/0/1")
- - result.diff.prepared is search("\- *description test-interface-access")
- - result.diff.prepared is search("\- *unit 0")
- - result.diff.prepared is search("\- *family ethernet-switching")
- - result.diff.prepared is search("\- *interface-mode access")
- - result.diff.prepared is search("\- *members red")
- - result.diff.prepared is search("\- *ge-0/0/2")
- - result.diff.prepared is search("\- *description test-interface-trunk")
- - result.diff.prepared is search("\- *native-vlan-id 100")
- - result.diff.prepared is search("\- *interface-mode trunk")
- - result.diff.prepared is search("\- *members \[ blue green \]")
-
-- name: Delete interface in access and trunk mode using aggregate (idempotent)
- junos_l2_interface:
- aggregate:
- - name: ge-0/0/1
- description: test-interface-access
- mode: access
- access_vlan: red
- - name: ge-0/0/2
- description: test-interface-trunk
- mode: trunk
- trunk_vlans:
- - blue
- - green
- native_vlan: 100
- active: True
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Teradown delete vlans
- junos_vlan:
- vlan_id: "{{ item.vlan_id }}"
- name: "{{ item.name }}"
- state: absent
- provider: "{{ netconf }}"
- with_items:
- - { vlan_id: 100, name: red }
- - { vlan_id: 200, name: blue }
- - { vlan_id: 300, name: green }
-
-- debug: msg="END junos_l2_interface netconf/basic.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_l2_interface/tests/netconf/net_l2_interface.yaml b/test/integration/targets/junos_l2_interface/tests/netconf/net_l2_interface.yaml
deleted file mode 100644
index f2f0d7b285..0000000000
--- a/test/integration/targets/junos_l2_interface/tests/netconf/net_l2_interface.yaml
+++ /dev/null
@@ -1,57 +0,0 @@
----
-- debug: msg="START junos netconf/net_l2_interface.yaml on connection={{ ansible_connection }}"
-
-# Add minimal testcase to check args are passed correctly to
-# implementation module and module run is successful.
-
-- name: setup - remove interface address
- net_l2_interface:
- name: ge-0/0/1
- state: absent
- provider: "{{ netconf }}"
-
-- name: Setup create vlan 100
- junos_vlan:
- vlan_id: 100
- name: red
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- name: Configure interface in access mode using platform agnostic module
- net_l2_interface:
- name: ge-0/0/1
- description: l2 interface configured by Ansible
- mode: access
- access_vlan: red
- active: True
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - result.diff.prepared is search("\+ *ge-0/0/1")
- - result.diff.prepared is search("\+ *description \"l2 interface configured by Ansible\"")
- - result.diff.prepared is search("\+ *unit 0")
- - result.diff.prepared is search("\+ *family ethernet-switching")
- - result.diff.prepared is search("\+ *interface-mode access")
- - result.diff.prepared is search("\+ *members red")
-
-- name: teardown - remove interface address
- net_l2_interface:
- name: ge-0/0/1
- state: absent
- provider: "{{ netconf }}"
-
-
-- name: teardown delete vlan 100
- junos_vlan:
- vlan_id: 100
- name: red
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-
-- debug: msg="END junos netconf/net_l3_interface.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_l2_interfaces/defaults/main.yaml b/test/integration/targets/junos_l2_interfaces/defaults/main.yaml
deleted file mode 100644
index 164afead28..0000000000
--- a/test/integration/targets/junos_l2_interfaces/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "[^_].*"
-test_items: []
diff --git a/test/integration/targets/junos_l2_interfaces/meta/main.yaml b/test/integration/targets/junos_l2_interfaces/meta/main.yaml
deleted file mode 100644
index 191a0f2ea1..0000000000
--- a/test/integration/targets/junos_l2_interfaces/meta/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_junos_tests
diff --git a/test/integration/targets/junos_l2_interfaces/tasks/main.yaml b/test/integration/targets/junos_l2_interfaces/tasks/main.yaml
deleted file mode 100644
index cc27f174fd..0000000000
--- a/test/integration/targets/junos_l2_interfaces/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: netconf.yaml, tags: ['netconf'] }
diff --git a/test/integration/targets/junos_l2_interfaces/tasks/netconf.yaml b/test/integration/targets/junos_l2_interfaces/tasks/netconf.yaml
deleted file mode 100644
index 3f3ca7832d..0000000000
--- a/test/integration/targets/junos_l2_interfaces/tasks/netconf.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-- name: collect all netconf test cases
- find:
- paths: "{{ role_path }}/tests/netconf"
- patterns: "{{ testcase }}.yml"
- use_regex: true
- connection: local
- register: test_cases
-
-- 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 }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_l2_interfaces/tests/netconf/_base_config.yaml b/test/integration/targets/junos_l2_interfaces/tests/netconf/_base_config.yaml
deleted file mode 100644
index afb39ef977..0000000000
--- a/test/integration/targets/junos_l2_interfaces/tests/netconf/_base_config.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
----
-- debug:
- msg: "Start junos_l2_interfaces base config ansible_connection={{ ansible_connection }}"
-
-- name: Configure vlan
- junos_config:
- lines:
- - set vlans vlan100 vlan-id 100
- - set vlans vlan200 vlan-id 200
- - set vlans vlan300 vlan-id 300
- - set vlans vlan400 vlan-id 400
-
-- debug:
- msg: "End junos_l2_interfaces base config ansible_connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_l2_interfaces/tests/netconf/_remove_config.yaml b/test/integration/targets/junos_l2_interfaces/tests/netconf/_remove_config.yaml
deleted file mode 100644
index b570ef8966..0000000000
--- a/test/integration/targets/junos_l2_interfaces/tests/netconf/_remove_config.yaml
+++ /dev/null
@@ -1,18 +0,0 @@
----
-- debug:
- msg: "Start junos_l2_interfaces deleted remove l2 interface config ansible_connection={{ ansible_connection }}"
-
-- name: "Setup - remove interface config"
- junos_config:
- lines:
- - delete interfaces ge-0/0/1
- - delete interfaces ge-0/0/2
- - delete interfaces ge-0/0/3
- - delete interfaces lo0
- - delete vlans vlan100
- - delete vlans vlan200
- - delete vlans vlan300
- - delete vlans vlan400
-
-- debug:
- msg: "End junos_l2_interfaces deleted remove l2 interface config ansible_connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_l2_interfaces/tests/netconf/deleted.yaml b/test/integration/targets/junos_l2_interfaces/tests/netconf/deleted.yaml
deleted file mode 100644
index 66f50c5cb8..0000000000
--- a/test/integration/targets/junos_l2_interfaces/tests/netconf/deleted.yaml
+++ /dev/null
@@ -1,81 +0,0 @@
----
-- debug:
- msg: "START junos_l2_interfaces deleted integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-- include_tasks: _base_config.yaml
-
-- set_fact:
- expected_deleted_output:
- - name: ge-0/0/1
- unit: 0
- enhanced_layer: True
- access:
- vlan: vlan100
-
-- block:
- - name: Configure initial state for l2 interface
- junos_l2_interfaces: &initial
- config:
- - name: ge-0/0/1
- access:
- vlan: vlan100
- - name: ge-0/0/2
- trunk:
- allowed_vlans:
- - vlan200
- - vlan300
- native_vlan: "400"
- state: merged
- register: result
-
- - name: Delete the provided l2 interface configuration from running configuration
- junos_l2_interfaces: &deleted
- config:
- - name: ge-0/0/2
- state: deleted
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_deleted_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Delete the provided l2 interface configuration from running configuration (IDEMPOTENT)
- junos_l2_interfaces: *deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- - name: Configure initial state for interface
- junos_l2_interfaces: *initial
- register: result
-
- - name: Delete the all l2 interface configuration from running configuration
- junos_l2_interfaces:
- state: deleted
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ result['after'] == [] }}"
-
- - name: Delete the all l2 interface configuration from running configuration (IDEMPOTENT)
- junos_l2_interfaces:
- state: deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_l2_interfaces deleted integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_l2_interfaces/tests/netconf/merged.yaml b/test/integration/targets/junos_l2_interfaces/tests/netconf/merged.yaml
deleted file mode 100644
index e6fcefa50d..0000000000
--- a/test/integration/targets/junos_l2_interfaces/tests/netconf/merged.yaml
+++ /dev/null
@@ -1,58 +0,0 @@
----
-- debug:
- msg: "START junos_l2_interfaces merged integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-- include_tasks: _base_config.yaml
-
-- set_fact:
- expected_merged_output:
- - name: ge-0/0/1
- access:
- vlan: vlan100
- enhanced_layer: True
- unit: 0
- - name: ge-0/0/2
- trunk:
- allowed_vlans:
- - vlan200
- - vlan300
- native_vlan: "400"
- enhanced_layer: True
- unit: 0
-
-- block:
- - name: Merge the provided configuration with the exisiting running configuration
- junos_l2_interfaces: &merged
- config:
- - name: ge-0/0/1
- access:
- vlan: vlan100
- - name: ge-0/0/2
- trunk:
- allowed_vlans:
- - vlan200
- - vlan300
- native_vlan: "400"
- state: merged
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_merged_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Merge the provided l2 interface configuration from running configuration (IDEMPOTENT)
- junos_l2_interfaces: *merged
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_l2_interfaces merged integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_l2_interfaces/tests/netconf/overridden.yaml b/test/integration/targets/junos_l2_interfaces/tests/netconf/overridden.yaml
deleted file mode 100644
index 12133e1803..0000000000
--- a/test/integration/targets/junos_l2_interfaces/tests/netconf/overridden.yaml
+++ /dev/null
@@ -1,63 +0,0 @@
----
-- debug:
- msg: "START junos_l2_interfaces override integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-- include_tasks: _base_config.yaml
-
-- set_fact:
- expected_overridden_output:
- - name: ge-0/0/2
- trunk:
- allowed_vlans:
- - vlan100
- native_vlan: "200"
- enhanced_layer: True
- unit: 0
-
-- block:
- - name: Setup initial l2 configuration
- junos_l2_interfaces:
- config:
- - name: ge-0/0/1
- access:
- vlan: vlan100
- - name: ge-0/0/2
- trunk:
- allowed_vlans:
- - vlan200
- - vlan300
- native_vlan: "400"
- state: overridden
- register: result
-
- - name: Override the provided configuration with the exisiting running configuration
- junos_l2_interfaces: &overridden
- config:
- - name: ge-0/0/2
- trunk:
- allowed_vlans:
- - vlan100
- native_vlan: "200"
- state: overridden
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_overridden_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Override the provided l2 interface configuration from running configuration (IDEMPOTENT)
- junos_l2_interfaces: *overridden
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_l2_interfaces override integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_l2_interfaces/tests/netconf/replaced.yaml b/test/integration/targets/junos_l2_interfaces/tests/netconf/replaced.yaml
deleted file mode 100644
index b73e8ae8d1..0000000000
--- a/test/integration/targets/junos_l2_interfaces/tests/netconf/replaced.yaml
+++ /dev/null
@@ -1,58 +0,0 @@
----
-- debug:
- msg: "START junos_l2_interfaces replaced integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-- include_tasks: _base_config.yaml
-
-- set_fact:
- expected_replaced_output:
- - name: ge-0/0/1
- trunk:
- allowed_vlans:
- - vlan100
- - vlan300
- native_vlan: "400"
- enhanced_layer: True
- unit: 0
- - name: ge-0/0/2
- access:
- vlan: vlan200
- enhanced_layer: True
- unit: 0
-
-- block:
- - name: Replace the provided configuration with the exisiting running configuration
- junos_l2_interfaces: &replaced
- config:
- - name: ge-0/0/1
- trunk:
- allowed_vlans:
- - vlan100
- - vlan300
- native_vlan: "400"
- - name: ge-0/0/2
- access:
- vlan: vlan200
- state: replaced
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_replaced_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Replace the provided interface configuration from running configuration (IDEMPOTENT)
- junos_l2_interfaces: *replaced
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_l2_interfaces replaced integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_l2_interfaces/tests/netconf/rtt.yml b/test/integration/targets/junos_l2_interfaces/tests/netconf/rtt.yml
deleted file mode 100644
index 5ee829103f..0000000000
--- a/test/integration/targets/junos_l2_interfaces/tests/netconf/rtt.yml
+++ /dev/null
@@ -1,70 +0,0 @@
----
-- debug:
- msg: "START junos_l2_interfaces round trip integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-- include_tasks: _base_config.yaml
-
-- set_fact:
- expected_revert_output:
- - name: ge-0/0/2
- trunk:
- allowed_vlans:
- - vlan100
- native_vlan: "200"
- enhanced_layer: True
- unit: 0
-
-- block:
- - name: Apply the provided configuration (base config)
- junos_l2_interfaces:
- config:
- - name: ge-0/0/2
- trunk:
- allowed_vlans:
- - vlan100
- native_vlan: "200"
- state: merged
- register: base_config
-
- - name: Gather interfaces facts
- junos_facts:
- gather_subset:
- - default
- gather_network_resources:
- - l2_interfaces
-
- - name: Apply the provided configuration (config to be reverted)
- junos_l2_interfaces:
- config:
- - name: ge-0/0/1
- trunk:
- allowed_vlans:
- - vlan100
- - vlan300
- native_vlan: "400"
- - name: ge-0/0/2
- access:
- vlan: vlan200
- state: replaced
- register: result
-
- - name: Assert that changes were applied
- assert:
- that: "result['changed'] == true"
-
- - name: Revert back to base config using facts round trip
- junos_l2_interfaces:
- config: "{{ ansible_facts['network_resources']['l2_interfaces'] }}"
- state: overridden
- register: revert
-
- - name: Assert that config was reverted
- assert:
- that: "{{ expected_revert_output | symmetric_difference(revert['after']) |length == 0 }}"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_l2_interfaces round trip integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_l3_interface/defaults/main.yaml b/test/integration/targets/junos_l3_interface/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/junos_l3_interface/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/junos_l3_interface/meta/main.yml b/test/integration/targets/junos_l3_interface/meta/main.yml
deleted file mode 100644
index 191a0f2ea1..0000000000
--- a/test/integration/targets/junos_l3_interface/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_junos_tests
diff --git a/test/integration/targets/junos_l3_interface/tasks/main.yaml b/test/integration/targets/junos_l3_interface/tasks/main.yaml
deleted file mode 100644
index cc27f174fd..0000000000
--- a/test/integration/targets/junos_l3_interface/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: netconf.yaml, tags: ['netconf'] }
diff --git a/test/integration/targets/junos_l3_interface/tasks/netconf.yaml b/test/integration/targets/junos_l3_interface/tasks/netconf.yaml
deleted file mode 100644
index 8c95360c6b..0000000000
--- a/test/integration/targets/junos_l3_interface/tasks/netconf.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-- name: collect all netconf test cases
- find:
- paths: "{{ role_path }}/tests/netconf"
- 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 case (connection=netconf)
- include: "{{ test_case_to_run }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_l3_interface/tests/netconf/basic.yaml b/test/integration/targets/junos_l3_interface/tests/netconf/basic.yaml
deleted file mode 100644
index 672fda6b78..0000000000
--- a/test/integration/targets/junos_l3_interface/tests/netconf/basic.yaml
+++ /dev/null
@@ -1,257 +0,0 @@
----
-- debug: msg="START junos_l3_interface netconf/basic.yaml on connection={{ ansible_connection }}"
-
-- name: setup - remove interface address
- junos_l3_interface:
- name: ge-0/0/1
- ipv4: 192.0.2.1
- ipv6: fd5d:12c9:2201:1::1
- state: absent
- provider: "{{ netconf }}"
-
-- name: Configure interface address
- junos_l3_interface:
- name: ge-0/0/1
- ipv4: 192.0.2.1
- ipv6: fd5d:12c9:2201:1::1
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>192.0.2.1/32</name>' in config.xml"
- - "'<name>fd5d:12c9:2201:1::1/128</name>' in config.xml"
- - result.diff.prepared is search("\+ *address 192.0.2.1/32")
- - result.diff.prepared is search("\+ *address fd5d:12c9:2201:1::1/128")
-
-- name: Configure interface address (idempotent)
- junos_l3_interface:
- name: ge-0/0/1
- ipv4: 192.0.2.1
- ipv6: fd5d:12c9:2201:1::1
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Deactivate interface address
- junos_l3_interface:
- name: ge-0/0/1
- ipv4: 192.0.2.1
- ipv6: fd5d:12c9:2201:1::1
- state: present
- active: False
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<address inactive=\"inactive\">' in config.xml"
- - result.diff.prepared is search("! *inactive[:] address 192.0.2.1/32")
- - result.diff.prepared is search("! *inactive[:] address fd5d:12c9:2201:1::1/128")
-
-- name: Activate interface address
- junos_l3_interface:
- name: ge-0/0/1
- ipv4: 192.0.2.1
- ipv6: fd5d:12c9:2201:1::1
- state: present
- active: True
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - result.diff.prepared is search("! *active[:] address 192.0.2.1/32")
- - result.diff.prepared is search("! *active[:] address fd5d:12c9:2201:1::1/128")
-
-- name: Delete interface address
- junos_l3_interface:
- name: ge-0/0/1
- ipv4: 192.0.2.1
- ipv6: fd5d:12c9:2201:1::1
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - result.diff.prepared is search("\- *address 192.0.2.1/32")
- - result.diff.prepared is search("\- *address fd5d:12c9:2201:1::1/128")
-
-- name: Delete interface address (idempotent)
- junos_l3_interface:
- name: ge-0/0/1
- ipv4: 192.0.2.1
- ipv6: fd5d:12c9:2201:1::1
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Aggregate setup- delete interface ge-0/0/1
- junos_l3_interface:
- name: ge-0/0/1
- ipv4: 192.0.2.1
- ipv6: fd5d:12c9:2201:1::1
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- name: Aggregate setup- delete interface ge-0/0/2
- junos_l3_interface:
- name: ge-0/0/2
- ipv4: 192.0.2.2
- ipv6: fd5d:12c9:2201:2::2
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- name: Configure l3 interface in aggregate
- junos_l3_interface:
- aggregate:
- - name: ge-0/0/1
- ipv4: 192.0.2.1
- ipv6: fd5d:12c9:2201:1::1
- - name: ge-0/0/2
- ipv4: 192.0.2.2
- ipv6: fd5d:12c9:2201:2::2
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - "'edit interfaces ge-0/0/1 unit 0 family inet' in result.diff.prepared"
- - result.diff.prepared is search("\+ *address 192.0.2.1/32")
- - "'edit interfaces ge-0/0/1 unit 0 family inet6' in result.diff.prepared"
- - result.diff.prepared is search("\+ *address fd5d:12c9:2201:1::1/128")
- - "'edit interfaces ge-0/0/2 unit 0 family inet' in result.diff.prepared"
- - result.diff.prepared is search("\+ *address 192.0.2.2/32")
- - "'edit interfaces ge-0/0/2 unit 0 family inet6' in result.diff.prepared"
- - result.diff.prepared is search("\+ *address fd5d:12c9:2201:2::2/128")
-
-- name: Configure l3 interface in aggregate (idempotent)
- junos_l3_interface:
- aggregate:
- - name: ge-0/0/1
- ipv4: 192.0.2.1
- ipv6: fd5d:12c9:2201:1::1
- - name: ge-0/0/2
- ipv4: 192.0.2.2
- ipv6: fd5d:12c9:2201:2::2
- active: True
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- name: Deactivate l3 interface configuration
- junos_l3_interface:
- aggregate:
- - name: ge-0/0/1
- ipv4: 192.0.2.1
- ipv6: fd5d:12c9:2201:1::1
- - name: ge-0/0/2
- ipv4: 192.0.2.2
- ipv6: fd5d:12c9:2201:2::2
- active: False
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - result.diff.prepared is search("! *inactive[:] address 192.0.2.1/32")
- - result.diff.prepared is search("! *inactive[:] address fd5d:12c9:2201:1::1/128")
- - result.diff.prepared is search("! *inactive[:] address 192.0.2.2/32")
- - result.diff.prepared is search("! *inactive[:] address fd5d:12c9:2201:2::2/128")
-
-- name: Activate l3 interface configuration
- junos_l3_interface:
- aggregate:
- - name: ge-0/0/1
- ipv4: 192.0.2.1
- ipv6: fd5d:12c9:2201:1::1
- - name: ge-0/0/2
- ipv4: 192.0.2.2
- ipv6: fd5d:12c9:2201:2::2
- active: True
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - result.diff.prepared is search("! *active[:] address 192.0.2.1/32")
- - result.diff.prepared is search("! *active[:] address fd5d:12c9:2201:1::1/128")
- - result.diff.prepared is search("! *active[:] address 192.0.2.2/32")
- - result.diff.prepared is search("! *active[:] address fd5d:12c9:2201:2::2/128")
-
-- name: Delete l3 interface configuration
- junos_l3_interface:
- aggregate:
- - name: ge-0/0/1
- ipv4: 192.0.2.1
- ipv6: fd5d:12c9:2201:1::1
- - name: ge-0/0/2
- ipv4: 192.0.2.2
- ipv6: fd5d:12c9:2201:2::2
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - "'edit interfaces ge-0/0/1 unit 0 family inet' in result.diff.prepared"
- - result.diff.prepared is search("\- *address 192.0.2.1/32")
- - "'edit interfaces ge-0/0/1 unit 0 family inet6' in result.diff.prepared"
- - result.diff.prepared is search("\- *address fd5d:12c9:2201:1::1/128")
- - "'edit interfaces ge-0/0/2 unit 0 family inet' in result.diff.prepared"
- - result.diff.prepared is search("\- *address 192.0.2.2/32")
- - "'edit interfaces ge-0/0/2 unit 0 family inet6' in result.diff.prepared"
- - result.diff.prepared is search("\- *address fd5d:12c9:2201:2::2/128")
-
-- name: Delete l3 interface configuration (idempotent)
- junos_l3_interface:
- aggregate:
- - name: ge-0/0/1
- ipv4: 192.0.2.1
- ipv6: fd5d:12c9:2201:1::1
- - name: ge-0/0/2
- ipv4: 192.0.2.2
- ipv6: fd5d:12c9:2201:2::2
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- debug: msg="END junos_l3_interface netconf/basic.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_l3_interface/tests/netconf/net_l3_interface.yaml b/test/integration/targets/junos_l3_interface/tests/netconf/net_l3_interface.yaml
deleted file mode 100644
index 7897d18c96..0000000000
--- a/test/integration/targets/junos_l3_interface/tests/netconf/net_l3_interface.yaml
+++ /dev/null
@@ -1,46 +0,0 @@
----
-- debug: msg="START junos netconf/net_l3_interface.yaml on connection={{ ansible_connection }}"
-
-# Add minimal testcase to check args are passed correctly to
-# implementation module and module run is successful.
-
-- name: setup - remove interface address
- net_l3_interface:
- name: ge-0/0/1
- ipv4: 192.0.2.1
- ipv6: fd5d:12c9:2201:1::1
- state: absent
- provider: "{{ netconf }}"
-
-- name: Configure interface address using platform agnostic module
- net_l3_interface:
- name: ge-0/0/1
- ipv4: 192.0.2.1
- ipv6: fd5d:12c9:2201:1::1
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>192.0.2.1/32</name>' in config.xml"
- - "'<name>fd5d:12c9:2201:1::1/128</name>' in config.xml"
- - result.diff.prepared is search("\+ *address 192.0.2.1/32")
- - result.diff.prepared is search("\+ *address fd5d:12c9:2201:1::1/128")
-
-- name: teardown - remove interface address
- net_l3_interface:
- name: ge-0/0/1
- ipv4: 192.0.2.1
- ipv6: fd5d:12c9:2201:1::1
- state: absent
- provider: "{{ netconf }}"
-
-- debug: msg="END junos netconf/net_l3_interface.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_l3_interfaces/defaults/main.yaml b/test/integration/targets/junos_l3_interfaces/defaults/main.yaml
deleted file mode 100644
index 164afead28..0000000000
--- a/test/integration/targets/junos_l3_interfaces/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "[^_].*"
-test_items: []
diff --git a/test/integration/targets/junos_l3_interfaces/meta/main.yaml b/test/integration/targets/junos_l3_interfaces/meta/main.yaml
deleted file mode 100644
index 191a0f2ea1..0000000000
--- a/test/integration/targets/junos_l3_interfaces/meta/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_junos_tests
diff --git a/test/integration/targets/junos_l3_interfaces/tasks/main.yaml b/test/integration/targets/junos_l3_interfaces/tasks/main.yaml
deleted file mode 100644
index cc27f174fd..0000000000
--- a/test/integration/targets/junos_l3_interfaces/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: netconf.yaml, tags: ['netconf'] }
diff --git a/test/integration/targets/junos_l3_interfaces/tasks/netconf.yaml b/test/integration/targets/junos_l3_interfaces/tasks/netconf.yaml
deleted file mode 100644
index 3bb73b248e..0000000000
--- a/test/integration/targets/junos_l3_interfaces/tasks/netconf.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
----
-- name: collect all netconf test cases
- find:
- paths: "{{ role_path }}/tests/netconf"
- 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 case (connection=netconf)
- include: "{{ test_case_to_run }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_l3_interfaces/tests/netconf/junos_l3_interfaces.yml b/test/integration/targets/junos_l3_interfaces/tests/netconf/junos_l3_interfaces.yml
deleted file mode 100644
index f74691d338..0000000000
--- a/test/integration/targets/junos_l3_interfaces/tests/netconf/junos_l3_interfaces.yml
+++ /dev/null
@@ -1,99 +0,0 @@
----
-- name: bootstrap interfaces
- junos_l3_interfaces:
- config:
- - name: ge-1/0/0
- ipv4:
- - address: 192.168.100.1/24
- - address: 10.200.16.20/24
- - name: ge-2/0/0
- ipv4:
- - address: 192.168.100.2/24
- - address: 10.200.16.21/24
- - name: ge-3/0/0
- ipv4:
- - address: 192.168.100.3/24
- - address: 10.200.16.22/24
- state: replaced
- register: result
-
-- assert:
- that:
- - result is changed
- - "'<nc:address><nc:name>192.168.100.1/24</nc:name></nc:address>' in result.commands[0]"
- - "'<nc:address><nc:name>10.200.16.20/24</nc:name></nc:address>' in result.commands[0]"
- - "result.after[0].name == 'ge-1/0/0'"
- - "result.after[0].ipv4[0]['address'] == '192.168.100.1/24'"
- - "result.after[0].ipv4[1]['address'] == '10.200.16.20/24'"
-
-- name: bootstrap interfaces (idempotent)
- junos_l3_interfaces:
- config:
- - name: ge-1/0/0
- ipv4:
- - address: 192.168.100.1/24
- - address: 10.200.16.20/24
- - name: ge-2/0/0
- ipv4:
- - address: 192.168.100.2/24
- - address: 10.200.16.21/24
- - name: ge-3/0/0
- ipv4:
- - address: 192.168.100.3/24
- - address: 10.200.16.22/24
- state: replaced
- register: result
-
-- assert:
- that:
- - result is not changed
-
-- name: Add another interface ip
- junos_l3_interfaces:
- config:
- - name: ge-1/0/0
- ipv4:
- - address: 100.64.0.1/10
- - address: 100.64.0.2/10
- state: merged
- register: result
-
-- assert:
- that:
- - result is changed
- - "'<nc:address><nc:name>100.64.0.1/10</nc:name></nc:address>' in result.commands[0]"
- - "'<nc:address><nc:name>100.64.0.2/10</nc:name></nc:address>' in result.commands[0]"
- - "result.after[0].name == 'ge-1/0/0'"
- - "result.after[0].ipv4[0]['address'] == '192.168.100.1/24'"
- - "result.after[0].ipv4[1]['address'] == '10.200.16.20/24'"
- - "result.after[0].ipv4[2]['address'] == '100.64.0.1/10'"
- - "result.after[0].ipv4[3]['address'] == '100.64.0.2/10'"
-
-- name: Delete ge-2/0/0 interface config
- junos_l3_interfaces:
- config:
- - name: ge-2/0/0
- state: deleted
- register: result
-
-- assert:
- that:
- - result is changed
- - "'<nc:name>ge-2/0/0</nc:name><nc:unit><nc:name>0</nc:name><nc:family><nc:inet><nc:address delete=\"delete\"/>' in result.commands[0]"
-
-- name: Override all config
- junos_l3_interfaces:
- config:
- - name: ge-1/0/0
- ipv4:
- - address: dhcp
- - name: fxp0
- ipv4:
- - address: dhcp
- state: overridden
- register: result
-
-- assert:
- that:
- - result is changed
- - "'<nc:name>fxp0</nc:name><nc:unit><nc:name>0</nc:name><nc:family><nc:inet><nc:dhcp/></nc:inet>' in result.commands[0]"
diff --git a/test/integration/targets/junos_lacp/defaults/main.yaml b/test/integration/targets/junos_lacp/defaults/main.yaml
deleted file mode 100644
index 164afead28..0000000000
--- a/test/integration/targets/junos_lacp/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "[^_].*"
-test_items: []
diff --git a/test/integration/targets/junos_lacp/meta/main.yml b/test/integration/targets/junos_lacp/meta/main.yml
deleted file mode 100644
index 191a0f2ea1..0000000000
--- a/test/integration/targets/junos_lacp/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_junos_tests
diff --git a/test/integration/targets/junos_lacp/tasks/main.yaml b/test/integration/targets/junos_lacp/tasks/main.yaml
deleted file mode 100644
index cc27f174fd..0000000000
--- a/test/integration/targets/junos_lacp/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: netconf.yaml, tags: ['netconf'] }
diff --git a/test/integration/targets/junos_lacp/tasks/netconf.yaml b/test/integration/targets/junos_lacp/tasks/netconf.yaml
deleted file mode 100644
index 73b91adfaa..0000000000
--- a/test/integration/targets/junos_lacp/tasks/netconf.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-- name: collect all netconf test cases
- find:
- paths: "{{ role_path }}/tests/netconf"
- patterns: "{{ testcase }}.yaml"
- use_regex: true
- connection: local
- register: test_cases
-
-- 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 }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_lacp/tests/netconf/_remove_config.yaml b/test/integration/targets/junos_lacp/tests/netconf/_remove_config.yaml
deleted file mode 100644
index 9381028346..0000000000
--- a/test/integration/targets/junos_lacp/tests/netconf/_remove_config.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-- debug:
- msg: "Start junos_lacp deleted remove lacp config ansible_connection={{ ansible_connection }}"
-
-- name: "Setup - remove lacp config"
- junos_config:
- lines:
- - delete chassis aggregated-devices ethernet lacp
-
-- debug:
- msg: "End junos_lacp deleted remove lacp config ansible_connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lacp/tests/netconf/deleted.yaml b/test/integration/targets/junos_lacp/tests/netconf/deleted.yaml
deleted file mode 100644
index bc09cb4ba6..0000000000
--- a/test/integration/targets/junos_lacp/tests/netconf/deleted.yaml
+++ /dev/null
@@ -1,43 +0,0 @@
----
-- debug:
- msg: "START junos_lacp deleted lacp tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- set_fact:
- expected_deleted_output: []
-
-- block:
- - name: Merge global LACP attributes
- junos_lacp:
- config:
- system_priority: 63
- link_protection: revertive
- state: merged
- register: result
-
- - name: Delete global lacp attributes
- junos_lacp: &deleted
- config:
- state: deleted
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ result['after'] == {} }}"
-
- - name: Delete the provided interface configuration from running configuration (IDEMPOTENT)
- junos_lacp: *deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_lacp deleted lacp integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lacp/tests/netconf/merged.yaml b/test/integration/targets/junos_lacp/tests/netconf/merged.yaml
deleted file mode 100644
index 60c743af99..0000000000
--- a/test/integration/targets/junos_lacp/tests/netconf/merged.yaml
+++ /dev/null
@@ -1,39 +0,0 @@
----
-- debug:
- msg: "START junos_lacp merged integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- set_fact:
- expected_merged_output:
- - system_priority: 63
- link_protection: revertive
-
-- block:
- - name: Merge the provided configuration with the exisiting running configuration
- junos_lacp: &merged
- config:
- system_priority: 63
- link_protection: revertive
- state: merged
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_merged_output | symmetric_difference([result['after']]) |length == 0 }}"
-
- - name: Merge the provided configuration with the existing running configuration (IDEMPOTENT)
- junos_lacp: *merged
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_lacp merged integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lacp/tests/netconf/replaced.yaml b/test/integration/targets/junos_lacp/tests/netconf/replaced.yaml
deleted file mode 100644
index f3c3b1a3b9..0000000000
--- a/test/integration/targets/junos_lacp/tests/netconf/replaced.yaml
+++ /dev/null
@@ -1,44 +0,0 @@
----
-- debug:
- msg: "START junos_lacp replaced integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- set_fact:
- expected_replaced_output:
- - system_priority: 73
-
-- block:
- - name: Set initial config
- junos_lacp:
- config:
- system_priority: 73
- link_protection: revertive
- state: replaced
-
- - name: Replace the provided configuration with the exisiting running configuration
- junos_lacp: &replaced
- config:
- system_priority: 73
- state: replaced
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_replaced_output | symmetric_difference([result['after']]) |length == 0 }}"
-
- - name: Replace the provided configuration with the existing running configuration (IDEMPOTENT)
- junos_lacp: *replaced
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_lacp replaced integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lacp/tests/netconf/rtt.yaml b/test/integration/targets/junos_lacp/tests/netconf/rtt.yaml
deleted file mode 100644
index 8d892ec5de..0000000000
--- a/test/integration/targets/junos_lacp/tests/netconf/rtt.yaml
+++ /dev/null
@@ -1,53 +0,0 @@
----
-- debug:
- msg: "START junos_lacp RTT integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- set_fact:
- expected_revert_output:
- - system_priority: 63
- link_protection: non-revertive
-
-- block:
- - name: Apply the provided configuration (base config)
- junos_lacp:
- config:
- system_priority: 63
- link_protection: non-revertive
- state: merged
-
- - name: Gather interfaces facts
- junos_facts:
- gather_subset:
- - default
- gather_network_resources:
- - lacp
-
- - name: Apply the provided configuration (config to be reverted)
- junos_lacp: &replaced
- config:
- system_priority: 73
- link_protection: revertive
- state: replaced
- register: result
-
- - name: Assert that changes were applied
- assert:
- that: "result['changed'] == true"
-
- - name: Revert back to base config using facts round trip
- junos_lacp:
- config: "{{ ansible_facts['network_resources']['lacp'] }}"
- state: replaced
- register: revert
-
- - name: Assert that config was reverted
- assert:
- that: "{{ expected_revert_output | symmetric_difference([revert['after']]) |length == 0 }}"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_lacp RTT integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lacp_interfaces/defaults/main.yaml b/test/integration/targets/junos_lacp_interfaces/defaults/main.yaml
deleted file mode 100644
index 164afead28..0000000000
--- a/test/integration/targets/junos_lacp_interfaces/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "[^_].*"
-test_items: []
diff --git a/test/integration/targets/junos_lacp_interfaces/meta/main.yaml b/test/integration/targets/junos_lacp_interfaces/meta/main.yaml
deleted file mode 100644
index 874017d64b..0000000000
--- a/test/integration/targets/junos_lacp_interfaces/meta/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
-# - prepare_junos_tests
diff --git a/test/integration/targets/junos_lacp_interfaces/tasks/main.yaml b/test/integration/targets/junos_lacp_interfaces/tasks/main.yaml
deleted file mode 100644
index cc27f174fd..0000000000
--- a/test/integration/targets/junos_lacp_interfaces/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: netconf.yaml, tags: ['netconf'] }
diff --git a/test/integration/targets/junos_lacp_interfaces/tasks/netconf.yaml b/test/integration/targets/junos_lacp_interfaces/tasks/netconf.yaml
deleted file mode 100644
index 73b91adfaa..0000000000
--- a/test/integration/targets/junos_lacp_interfaces/tasks/netconf.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-- name: collect all netconf test cases
- find:
- paths: "{{ role_path }}/tests/netconf"
- patterns: "{{ testcase }}.yaml"
- use_regex: true
- connection: local
- register: test_cases
-
-- 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 }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_lacp_interfaces/tests/netconf/_base_config.yaml b/test/integration/targets/junos_lacp_interfaces/tests/netconf/_base_config.yaml
deleted file mode 100644
index 75f9612a29..0000000000
--- a/test/integration/targets/junos_lacp_interfaces/tests/netconf/_base_config.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
----
-- debug:
- msg: "Start junos_lacp_interfaces base config ansible_connection={{ ansible_connection }}"
-
-- name: Configure base lag interface
- junos_config:
- lines:
- - set interfaces ae1 description "Configured by Ansible"
- - set interfaces ae2 description "Configured by Ansible"
- - set interfaces ge-0/0/1 ether-options 802.3ad ae1
- - set interfaces ge-0/0/2 ether-options 802.3ad ae1
- - set interfaces ge-0/0/3 ether-options 802.3ad ae2
- - set interfaces ge-0/0/4 ether-options 802.3ad ae2
-
-- debug:
- msg: "End junos_lacp_interfaces base config ansible_connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lacp_interfaces/tests/netconf/_remove_config.yaml b/test/integration/targets/junos_lacp_interfaces/tests/netconf/_remove_config.yaml
deleted file mode 100644
index ef784f1b0e..0000000000
--- a/test/integration/targets/junos_lacp_interfaces/tests/netconf/_remove_config.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-- debug:
- msg: "Start junos_nterfaces deleted remove interface config ansible_connection={{ ansible_connection }}"
-
-- name: "Setup - remove interface config"
- junos_config:
- lines:
- - delete interfaces ae1
- - delete interfaces ae2
- - delete interfaces ge-0/0/1
- - delete interfaces ge-0/0/2
- - delete interfaces ge-0/0/3
- - delete interfaces ge-0/0/4
- - delete interfaces lo0
-
-- debug:
- msg: "End junos_nterfaces deleted remove interface config ansible_connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lacp_interfaces/tests/netconf/deleted.yaml b/test/integration/targets/junos_lacp_interfaces/tests/netconf/deleted.yaml
deleted file mode 100644
index 449ed3aba5..0000000000
--- a/test/integration/targets/junos_lacp_interfaces/tests/netconf/deleted.yaml
+++ /dev/null
@@ -1,97 +0,0 @@
----
-- debug:
- msg: "START junos_lacp_interfaces deleted integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-- include_tasks: _base_config.yaml
-
-- set_fact:
- expected_deleted_output:
- - name: ae2
- period: slow
- sync_reset: disable
- system:
- priority: 200
- mac:
- address: 00:00:00:00:00:04
- - name: ge-0/0/3
- port_priority: 300
-
-- block:
- - name: Configure initial state for interface
- junos_lacp_interfaces: &initial
- config:
- - name: ae1
- period: fast
- sync_reset: enable
- system:
- priority: 100
- mac:
- address: 00:00:00:00:00:02
- - name: ge-0/0/1
- port_priority: 100
- force_up: True
- - name: ae2
- period: slow
- sync_reset: disable
- system:
- priority: 200
- mac:
- address: 00:00:00:00:00:04
- - name: ge-0/0/3
- port_priority: 300
- force_up: False
- state: merged
- register: result
-
- - name: Delete the provided interface configuration from running configuration
- junos_lacp_interfaces: &deleted
- config:
- - name: ae1
- - name: ge-0/0/1
- state: deleted
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_deleted_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Delete the provided lacp interface configuration from running configuration (IDEMPOTENT)
- junos_lacp_interfaces: *deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- - name: Configure initial state for interface
- junos_lacp_interfaces: *initial
- register: result
-
- - name: Delete the all lacp interface configuration from running configuration
- junos_lacp_interfaces:
- state: deleted
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ result['after'] == [] }}"
-
- - name: Delete the all lacp interfaces configuration from running configuration (IDEMPOTENT)
- junos_lacp_interfaces:
- state: deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_lacp_interfaces deleted integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lacp_interfaces/tests/netconf/merged.yaml b/test/integration/targets/junos_lacp_interfaces/tests/netconf/merged.yaml
deleted file mode 100644
index 0019dffe1d..0000000000
--- a/test/integration/targets/junos_lacp_interfaces/tests/netconf/merged.yaml
+++ /dev/null
@@ -1,56 +0,0 @@
----
-- debug:
- msg: "START junos_lacp_interfaces merged integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-- include_tasks: _base_config.yaml
-
-- set_fact:
- expected_merged_output:
- - name: ae1
- period: fast
- sync_reset: enable
- system:
- priority: 100
- mac:
- address: 00:00:00:00:00:02
- - name: ge-0/0/1
- port_priority: 100
- force_up: True
-
-- block:
- - name: Merge the provided configuration with the exisiting running configuration
- junos_lacp_interfaces: &merged
- config:
- - name: ae1
- period: fast
- sync_reset: enable
- system:
- priority: 100
- mac:
- address: 00:00:00:00:00:02
- - name: ge-0/0/1
- port_priority: 100
- force_up: True
- state: merged
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_merged_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Merge the provided configuration with the existing running configuration (IDEMPOTENT)
- junos_lacp_interfaces: *merged
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_lacp_interfaces merged integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lacp_interfaces/tests/netconf/overridden.yml b/test/integration/targets/junos_lacp_interfaces/tests/netconf/overridden.yml
deleted file mode 100644
index d2d16c7205..0000000000
--- a/test/integration/targets/junos_lacp_interfaces/tests/netconf/overridden.yml
+++ /dev/null
@@ -1,76 +0,0 @@
----
-- debug:
- msg: "START junos_lacp_interfaces overide integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-- include_tasks: _base_config.yaml
-
-- set_fact:
- expected_overridden_output:
- - name: ae1
- period: fast
- sync_reset: enable
- system:
- priority: 100
- mac:
- address: 00:00:00:00:00:01
-
-- block:
- - name: Configure initial state for lacp interface
- junos_lacp_interfaces:
- config:
- - name: ae1
- period: fast
- sync_reset: enable
- system:
- priority: 100
- mac:
- address: 00:00:00:00:00:02
- - name: ge-0/0/1
- port_priority: 100
- force_up: True
- - name: ae2
- period: slow
- sync_reset: disable
- system:
- priority: 200
- mac:
- address: 00:00:00:00:00:04
- - name: ge-0/0/3
- port_priority: 300
- force_up: False
- state: merged
- register: result
-
- - name: Override the provided configuration with the exisiting running configuration
- junos_lacp_interfaces: &overridden
- config:
- - name: ae1
- period: fast
- sync_reset: enable
- system:
- priority: 100
- mac:
- address: 00:00:00:00:00:01
- state: overridden
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_overridden_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Override the provided configuration with the existing running configuration (IDEMPOTENT)
- junos_lacp_interfaces: *overridden
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_lacp_interfaces override integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lacp_interfaces/tests/netconf/replaced.yaml b/test/integration/targets/junos_lacp_interfaces/tests/netconf/replaced.yaml
deleted file mode 100644
index 27e5f23df3..0000000000
--- a/test/integration/targets/junos_lacp_interfaces/tests/netconf/replaced.yaml
+++ /dev/null
@@ -1,100 +0,0 @@
----
-- debug:
- msg: "START junos_lacp_interfaces replaced integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-- include_tasks: _base_config.yaml
-
-- set_fact:
- expected_replaced_output:
- - name: ae1
- period: slow
- sync_reset: disable
- system:
- priority: 10
- mac:
- address: 00:00:00:00:00:03
- - name: ae2
- period: fast
- system:
- priority: 300
- - name: ge-0/0/1
- force_up: true
- port_priority: 100
- - name: ge-0/0/2
- port_priority: 250
- - name: ge-0/0/3
- port_priority: 300
- - name: ge-0/0/4
- port_priority: 400
- force_up: true
-
-- block:
- - name: Configure initial state for lacp interface
- junos_lacp_interfaces:
- config:
- - name: ae1
- period: fast
- sync_reset: enable
- system:
- priority: 100
- mac:
- address: 00:00:00:00:00:02
- - name: ge-0/0/1
- port_priority: 100
- force_up: True
- - name: ae2
- period: slow
- sync_reset: disable
- system:
- priority: 200
- mac:
- address: 00:00:00:00:00:04
- - name: ge-0/0/3
- port_priority: 300
- force_up: False
- state: merged
- register: result
-
- - name: Replace the provided configuration with the exisiting running configuration
- junos_lacp_interfaces: &replaced
- config:
- - name: ae1
- period: slow
- sync_reset: disable
- system:
- priority: 10
- mac:
- address: 00:00:00:00:00:03
- - name: ge-0/0/2
- port_priority: 250
- force_up: False
- - name: ae2
- period: fast
- system:
- priority: 300
- - name: ge-0/0/4
- port_priority: 400
- force_up: True
- state: replaced
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_replaced_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Replace the provided configuration with the existing running configuration (IDEMPOTENT)
- junos_lacp_interfaces: *replaced
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_lacp_interfaces replaced integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lacp_interfaces/tests/netconf/rtt.yaml b/test/integration/targets/junos_lacp_interfaces/tests/netconf/rtt.yaml
deleted file mode 100644
index a46fbe83b6..0000000000
--- a/test/integration/targets/junos_lacp_interfaces/tests/netconf/rtt.yaml
+++ /dev/null
@@ -1,90 +0,0 @@
----
-- debug:
- msg: "START junos_lacp_interfaces round trip integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-- include_tasks: _base_config.yaml
-
-- set_fact:
- expected_revert_output:
- - name: ae1
- period: slow
- sync_reset: disable
- system:
- priority: 10
- mac:
- address: 00:00:00:00:00:03
- - name: ae2
- period: fast
- system:
- priority: 300
- - name: ge-0/0/2
- port_priority: 250
- force_up: True
- - name: ge-0/0/4
- port_priority: 400
- force_up: True
-
-- block:
- - name: Apply the provided configuration (base config)
- junos_lacp_interfaces:
- config:
- - name: ae1
- period: slow
- sync_reset: disable
- system:
- priority: 10
- mac:
- address: 00:00:00:00:00:03
- - name: ge-0/0/2
- port_priority: 250
- force_up: False
- - name: ae2
- period: fast
- system:
- priority: 300
- - name: ge-0/0/4
- port_priority: 400
- force_up: True
- state: merged
- register: base_config
-
- - name: Gather interfaces facts
- junos_facts:
- gather_subset:
- - default
- gather_network_resources:
- - lacp_interfaces
-
- - name: Apply the provided configuration (config to be reverted)
- junos_lacp_interfaces:
- config:
- - name: ae1
- period: fast
- sync_reset: enable
- system:
- priority: 100
- mac:
- address: 00:00:00:00:00:01
- state: merged
- register: result
-
- - name: Assert that changes were applied
- assert:
- that: "result['changed'] == true"
-
- - name: Revert back to base config using facts round trip
- junos_lacp_interfaces:
- config: "{{ ansible_facts['network_resources']['lacp_interfaces'] }}"
- state: overridden
- register: revert
-
- - name: Assert that config was reverted
- assert:
- that: "{{ expected_revert_output | symmetric_difference(revert['after']) |length == 0 }}"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_lacp_interfaces round trip integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lag_interfaces/defaults/main.yaml b/test/integration/targets/junos_lag_interfaces/defaults/main.yaml
deleted file mode 100644
index 164afead28..0000000000
--- a/test/integration/targets/junos_lag_interfaces/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "[^_].*"
-test_items: []
diff --git a/test/integration/targets/junos_lag_interfaces/meta/main.yaml b/test/integration/targets/junos_lag_interfaces/meta/main.yaml
deleted file mode 100644
index 191a0f2ea1..0000000000
--- a/test/integration/targets/junos_lag_interfaces/meta/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_junos_tests
diff --git a/test/integration/targets/junos_lag_interfaces/tasks/main.yaml b/test/integration/targets/junos_lag_interfaces/tasks/main.yaml
deleted file mode 100644
index cc27f174fd..0000000000
--- a/test/integration/targets/junos_lag_interfaces/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: netconf.yaml, tags: ['netconf'] }
diff --git a/test/integration/targets/junos_lag_interfaces/tasks/netconf.yaml b/test/integration/targets/junos_lag_interfaces/tasks/netconf.yaml
deleted file mode 100644
index 73b91adfaa..0000000000
--- a/test/integration/targets/junos_lag_interfaces/tasks/netconf.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-- name: collect all netconf test cases
- find:
- paths: "{{ role_path }}/tests/netconf"
- patterns: "{{ testcase }}.yaml"
- use_regex: true
- connection: local
- register: test_cases
-
-- 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 }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_lag_interfaces/tests/netconf/_base_config.yaml b/test/integration/targets/junos_lag_interfaces/tests/netconf/_base_config.yaml
deleted file mode 100644
index b9c70d8494..0000000000
--- a/test/integration/targets/junos_lag_interfaces/tests/netconf/_base_config.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-- debug:
- msg: "Start junos_lag_interfaces base config ansible_connection={{ ansible_connection }}"
-
-- name: Configure base lag interface
- junos_config:
- lines:
- - set interfaces ae1 description "Configured by Ansible"
- - set interfaces ae2 description "Configured by Ansible"
-
-- debug:
- msg: "End junos_lag_interfaces base config ansible_connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lag_interfaces/tests/netconf/_remove_config.yaml b/test/integration/targets/junos_lag_interfaces/tests/netconf/_remove_config.yaml
deleted file mode 100644
index 151b274834..0000000000
--- a/test/integration/targets/junos_lag_interfaces/tests/netconf/_remove_config.yaml
+++ /dev/null
@@ -1,16 +0,0 @@
----
-- debug:
- msg: "Start junos_lag_interfaces teardown ansible_connection={{ ansible_connection }}"
-
-- name: Remove interface config
- junos_config:
- lines:
- - delete interfaces ge-0/0/1
- - delete interfaces ge-0/0/2
- - delete interfaces ge-0/0/3
- - delete interfaces ge-0/0/4
- - delete interfaces ae1
- - delete interfaces ae2
-
-- debug:
- msg: "End junos_lag_interfaces teardown ansible_connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lag_interfaces/tests/netconf/deleted.yaml b/test/integration/targets/junos_lag_interfaces/tests/netconf/deleted.yaml
deleted file mode 100644
index 157ed3621f..0000000000
--- a/test/integration/targets/junos_lag_interfaces/tests/netconf/deleted.yaml
+++ /dev/null
@@ -1,86 +0,0 @@
----
-- debug:
- msg: "START junos_lag_interfaces deleted integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-- include_tasks: _base_config.yaml
-
-- set_fact:
- expected_deleted_1_output:
- - name: ae1
- members:
- - member: ge-0/0/1
- - member: ge-0/0/2
- mode: active
-
- expected_deleted_2_output: []
-
-- block:
- - name: Base LAG configuration
- junos_lag_interfaces: &initial
- config:
- - name: ae1
- members:
- - member: ge-0/0/1
- - member: ge-0/0/2
- mode: active
- - name: ae2
- link_protection: True
- members:
- - member: ge-0/0/3
- link_type: primary
- - member: ge-0/0/4
- link_type: backup
- mode: passive
- state: merged
-
- - name: Delete the provided configuration with the exisiting running configuration
- junos_lag_interfaces: &deleted
- config:
- - name: ae2
- state: deleted
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_deleted_1_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Delete the provided configuration with the existing running configuration (IDEMPOTENT)
- junos_lag_interfaces: *deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- - name: Configure initial state for lag interface
- junos_lag_interfaces: *initial
- register: result
-
- - name: Delete the provided configuration with the exisiting running configuration
- junos_lag_interfaces:
- state: deleted
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_deleted_2_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Delete the provided configuration with the exisiting running configuration (IDEMPOTENT)
- junos_lag_interfaces:
- state: deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_lag_interfaces deleted integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lag_interfaces/tests/netconf/merged.yaml b/test/integration/targets/junos_lag_interfaces/tests/netconf/merged.yaml
deleted file mode 100644
index 557e54141b..0000000000
--- a/test/integration/targets/junos_lag_interfaces/tests/netconf/merged.yaml
+++ /dev/null
@@ -1,62 +0,0 @@
----
-- debug:
- msg: "START junos_lag_interfaces merged integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-- include_tasks: _base_config.yaml
-
-- set_fact:
- expected_merged_output:
- - name: ae1
- members:
- - member: ge-0/0/1
- - member: ge-0/0/2
- mode: active
- - name: ae2
- link_protection: True
- members:
- - member: ge-0/0/3
- link_type: primary
- - member: ge-0/0/4
- link_type: backup
- mode: passive
-
-- block:
- - name: Merge the provided configuration with the exisiting running configuration
- junos_lag_interfaces: &merged
- config:
- - name: ae1
- members:
- - member: ge-0/0/1
- - member: ge-0/0/2
- mode: active
- - name: ae2
- link_protection: True
- members:
- - member: ge-0/0/3
- link_type: primary
- - member: ge-0/0/4
- link_type: backup
- mode: passive
- state: merged
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_merged_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Merge the provided configuration with the existing running configuration (IDEMPOTENT)
- junos_lag_interfaces: *merged
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_lag_interfaces merged integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lag_interfaces/tests/netconf/overridden.yaml b/test/integration/targets/junos_lag_interfaces/tests/netconf/overridden.yaml
deleted file mode 100644
index 00c6530821..0000000000
--- a/test/integration/targets/junos_lag_interfaces/tests/netconf/overridden.yaml
+++ /dev/null
@@ -1,62 +0,0 @@
----
-- debug:
- msg: "START junos_lag_interfaces overridden integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-- include_tasks: _base_config.yaml
-
-- set_fact:
- expected_overridden_output:
- - name: ae1
- members:
- - member: ge-0/0/2
- mode: active
-
-- block:
- - name: Base LAG configuration
- junos_lag_interfaces:
- config:
- - name: ae1
- members:
- - member: ge-0/0/1
- - member: ge-0/0/2
- mode: active
- - name: ae2
- link_protection: True
- members:
- - member: ge-0/0/3
- link_type: primary
- - member: ge-0/0/4
- link_type: backup
- mode: passive
- state: merged
-
- - name: Override the provided configuration with the exisiting running configuration
- junos_lag_interfaces: &overridden
- config:
- - name: ae1
- members:
- - member: ge-0/0/2
- mode: active
- state: overridden
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_overridden_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Override the provided configuration with the existing running configuration (IDEMPOTENT)
- junos_lag_interfaces: *overridden
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_lag_interfaces overridden integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lag_interfaces/tests/netconf/replaced.yaml b/test/integration/targets/junos_lag_interfaces/tests/netconf/replaced.yaml
deleted file mode 100644
index 839b0fd6b5..0000000000
--- a/test/integration/targets/junos_lag_interfaces/tests/netconf/replaced.yaml
+++ /dev/null
@@ -1,70 +0,0 @@
----
-- debug:
- msg: "START junos_lag_interfaces replaced integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-- include_tasks: _base_config.yaml
-
-- set_fact:
- expected_replaced_output:
- - name: ae1
- members:
- - member: ge-0/0/1
- mode: passive
- - name: ae2
- link_protection: True
- members:
- - member: ge-0/0/3
- link_type: primary
- - member: ge-0/0/4
- link_type: backup
- mode: passive
-
-- block:
- - name: Base LAG configuration
- junos_lag_interfaces:
- config:
- - name: ae1
- members:
- - member: ge-0/0/1
- - member: ge-0/0/2
- mode: active
- - name: ae2
- link_protection: True
- members:
- - member: ge-0/0/3
- link_type: primary
- - member: ge-0/0/4
- link_type: backup
- mode: passive
- state: merged
-
- - name: Replace the provided configuration with the exisiting running configuration
- junos_lag_interfaces: &replaced
- config:
- - name: ae1
- members:
- - member: ge-0/0/1
- mode: passive
- state: replaced
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_replaced_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Replace the provided configuration with the existing running configuration (IDEMPOTENT)
- junos_lag_interfaces: *replaced
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_lag_interfaces replaced integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_linkagg/defaults/main.yaml b/test/integration/targets/junos_linkagg/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/junos_linkagg/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/junos_linkagg/meta/main.yml b/test/integration/targets/junos_linkagg/meta/main.yml
deleted file mode 100644
index 191a0f2ea1..0000000000
--- a/test/integration/targets/junos_linkagg/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_junos_tests
diff --git a/test/integration/targets/junos_linkagg/tasks/main.yaml b/test/integration/targets/junos_linkagg/tasks/main.yaml
deleted file mode 100644
index cc27f174fd..0000000000
--- a/test/integration/targets/junos_linkagg/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: netconf.yaml, tags: ['netconf'] }
diff --git a/test/integration/targets/junos_linkagg/tasks/netconf.yaml b/test/integration/targets/junos_linkagg/tasks/netconf.yaml
deleted file mode 100644
index c1985c530a..0000000000
--- a/test/integration/targets/junos_linkagg/tasks/netconf.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-- name: collect all netconf test cases
- find:
- paths: "{{ role_path }}/tests/netconf"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- connection: local
-
-- 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 }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_linkagg/tests/netconf/basic.yaml b/test/integration/targets/junos_linkagg/tests/netconf/basic.yaml
deleted file mode 100644
index fc743f1958..0000000000
--- a/test/integration/targets/junos_linkagg/tests/netconf/basic.yaml
+++ /dev/null
@@ -1,240 +0,0 @@
----
-- debug: msg="START junos_linkagg netconf/basic.yaml on connection={{ ansible_connection }}"
-
-- name: setup - remove linkagg
- junos_linkagg:
- name: ae0
- members:
- - ge-0/0/6
- - ge-0/0/7
- mode: active
- device_count: 4
- state: absent
- provider: "{{ netconf }}"
-
-- name: configure linkagg
- junos_linkagg:
- name: ae0
- members:
- - ge-0/0/6
- - ge-0/0/7
- mode: active
- device_count: 4
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>ae0</name>' in config.xml"
- - "'<device-count>4</device-count>' in config.xml"
- - "'<bundle>ae0</bundle>' in config.xml"
- - "'<active/>' in config.xml"
-
-- name: configure linkagg (idempotent)
- junos_linkagg:
- name: ae0
- members:
- - ge-0/0/6
- - ge-0/0/7
- mode: active
- device_count: 4
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: configure lacp in passive
- junos_linkagg:
- name: ae0
- members:
- - ge-0/0/6
- - ge-0/0/7
- mode: passive
- device_count: 4
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<passive/>' in config.xml"
-
-- name: delete lacp
- junos_linkagg:
- name: ae0
- members:
- - ge-0/0/6
- - ge-0/0/7
- mode: off
- device_count: 4
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<lacp/>' not in config.xml"
-
-- name: Change device count
- junos_linkagg:
- name: ae0
- device_count: 2
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<device-count>2</device-count>' in config.xml"
-
-- name: Disable linkagg interface
- junos_linkagg:
- name: ae0
- state: down
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - result.diff.prepared is search("\+ *disable")
-
-- name: Enable linkagg interface
- junos_linkagg:
- name: ae0
- state: up
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - result.diff.prepared is search("\- *disable")
-
-- name: Deactivate linkagg
- junos_linkagg:
- name: ae0
- members:
- - ge-0/0/6
- - ge-0/0/7
- mode: active
- device_count: 4
- state: present
- active: False
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<bundle inactive=\"inactive\">ae0</bundle>' in config.xml"
- - "'<device-count inactive=\"inactive\">4</device-count>' in config.xml"
- - "'inactive: ae0' in result.diff.prepared"
-
-- name: Activate linkagg
- junos_linkagg:
- name: ae0
- members:
- - ge-0/0/6
- - ge-0/0/7
- mode: active
- device_count: 4
- state: present
- active: True
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<active/>' in config.xml"
- - "'<bundle>ae0</bundle>' in config.xml"
- - "'active: device-count 4' in result.diff.prepared"
- - "'active: ae0' in result.diff.prepared"
-
-- name: Delete linkagg
- junos_linkagg:
- name: ae0
- members:
- - ge-0/0/6
- - ge-0/0/7
- mode: active
- device_count: 4
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<active/>' not in config.xml"
- - "'<bundle>ae0</bundle>' not in config.xml"
- - "'<device-count>4</device-count>' not in config.xml"
- - "'<name>ae0</name>' not in config.xml"
-
-- name: Delete linkagg (idempotent)
- junos_linkagg:
- name: ae0
- members:
- - ge-0/0/6
- - ge-0/0/7
- mode: active
- device_count: 4
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- debug: msg="END junos_linkagg netconf/basic.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_linkagg/tests/netconf/net_linkagg.yaml b/test/integration/targets/junos_linkagg/tests/netconf/net_linkagg.yaml
deleted file mode 100644
index 9e4531aa26..0000000000
--- a/test/integration/targets/junos_linkagg/tests/netconf/net_linkagg.yaml
+++ /dev/null
@@ -1,55 +0,0 @@
----
-- debug: msg="START junos netconf/net_linkagg.yaml on connection={{ ansible_connection }}"
-
-# Add minimal testcase to check args are passed correctly to
-# implementation module and module run is successful.
-
-- name: setup - remove linkagg
- net_linkagg:
- name: ae0
- members:
- - ge-0/0/6
- - ge-0/0/7
- mode: active
- device_count: 4
- state: absent
- provider: "{{ netconf }}"
-
-- name: configure linkagg using platform agnostic module
- net_linkagg:
- name: ae0
- members:
- - ge-0/0/6
- - ge-0/0/7
- mode: active
- device_count: 4
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>ae0</name>' in config.xml"
- - "'<device-count>4</device-count>' in config.xml"
- - "'<bundle>ae0</bundle>' in config.xml"
- - "'<active/>' in config.xml"
-
-- name: teardown - remove linkagg
- net_linkagg:
- name: ae0
- members:
- - ge-0/0/6
- - ge-0/0/7
- mode: active
- device_count: 4
- state: absent
- provider: "{{ netconf }}"
-
-- debug: msg="END junos netconf/net_linkagg.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lldp/defaults/main.yaml b/test/integration/targets/junos_lldp/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/junos_lldp/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/junos_lldp/meta/main.yml b/test/integration/targets/junos_lldp/meta/main.yml
deleted file mode 100644
index 191a0f2ea1..0000000000
--- a/test/integration/targets/junos_lldp/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_junos_tests
diff --git a/test/integration/targets/junos_lldp/tasks/main.yaml b/test/integration/targets/junos_lldp/tasks/main.yaml
deleted file mode 100644
index cc27f174fd..0000000000
--- a/test/integration/targets/junos_lldp/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: netconf.yaml, tags: ['netconf'] }
diff --git a/test/integration/targets/junos_lldp/tasks/netconf.yaml b/test/integration/targets/junos_lldp/tasks/netconf.yaml
deleted file mode 100644
index c1985c530a..0000000000
--- a/test/integration/targets/junos_lldp/tasks/netconf.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-- name: collect all netconf test cases
- find:
- paths: "{{ role_path }}/tests/netconf"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- connection: local
-
-- 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 }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_lldp/tests/netconf/basic.yaml b/test/integration/targets/junos_lldp/tests/netconf/basic.yaml
deleted file mode 100644
index d57c9c411c..0000000000
--- a/test/integration/targets/junos_lldp/tests/netconf/basic.yaml
+++ /dev/null
@@ -1,138 +0,0 @@
----
-- debug: msg="START junos_lldp netconf/basic.yaml on connection={{ ansible_connection }}"
-
-- name: get supported protocols
- junos_command:
- commands: show lldp
- register: result
- ignore_errors: yes
-
-- name: lldp supported
- set_fact:
- lldp_supported: True
- when: not result.failed
-
-- name: lldp not supported
- set_fact:
- lldp_supported: False
- when: result.failed
-
-- block:
- - name: setup - Disable lldp and remove it's configuration
- junos_lldp:
- state: absent
- provider: "{{ netconf }}"
-
- - name: Enable lldp
- junos_lldp:
- state: present
- provider: "{{ netconf }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
-
- - name: Enable lldp (idempotent)
- junos_lldp:
- state: present
- provider: "{{ netconf }}"
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- - name: configure lldp parameters and enable lldp
- junos_lldp:
- interval: 10
- hold_multiplier: 5
- transmit_delay: 2
- state: present
- provider: "{{ netconf }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - result.diff.prepared is search("\+ *advertisement-interval 10")
- - result.diff.prepared is search("\+ *transmit-delay 2")
- - result.diff.prepared is search("\+ *hold-multiplier 5")
-
- - name: configure lldp parameters and enable lldp(idempotent)
- junos_lldp:
- interval: 10
- hold_multiplier: 5
- transmit_delay: 2
- state: present
- provider: "{{ netconf }}"
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- - name: configure lldp parameters and disable lldp
- junos_lldp:
- interval: 10
- hold_multiplier: 5
- transmit_delay: 2
- state: disabled
- provider: "{{ netconf }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - result.diff.prepared is search("\+ *disable")
- - "'advertisement-interval 10;' not in result.diff.prepared"
- - "'transmit-delay 2;' not in result.diff.prepared"
- - "'hold-multiplier 5;' not in result.diff.prepared"
-
- - name: configure lldp parameters and enable lldp
- junos_lldp:
- interval: 10
- hold_multiplier: 5
- transmit_delay: 2
- state: enabled
- provider: "{{ netconf }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - result.diff.prepared is search("\- *disable")
- - "'advertisement-interval 10;' not in result.diff.prepared"
- - "'transmit-delay 2;' not in result.diff.prepared"
- - "'hold-multiplier 5;' not in result.diff.prepared"
-
- - name: Remove lldp configuration and diable lldp
- junos_lldp:
- interval: 10
- hold_multiplier: 5
- transmit_delay: 2
- state: absent
- provider: "{{ netconf }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - result.diff.prepared is search("\+ *disable")
- - result.diff.prepared is search("\- *advertisement-interval 10")
- - result.diff.prepared is search("\- *transmit-delay 2")
- - result.diff.prepared is search("\- *hold-multiplier 5")
-
- - name: Remove lldp (idempotent)
- junos_lldp:
- state: absent
- provider: "{{ netconf }}"
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- when: lldp_supported
-
-- debug: msg="END junos_lldp netconf/basic.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lldp/tests/netconf/net_lldp.yaml b/test/integration/targets/junos_lldp/tests/netconf/net_lldp.yaml
deleted file mode 100644
index 31cbc15370..0000000000
--- a/test/integration/targets/junos_lldp/tests/netconf/net_lldp.yaml
+++ /dev/null
@@ -1,44 +0,0 @@
----
-- debug: msg="START junos netconf/net_lldp.yaml on connection={{ ansible_connection }}"
-
-# Add minimal testcase to check args are passed correctly to
-# implementation module and module run is successful.
-- name: get supported protocols
- junos_command:
- commands: show lldp
- register: result
- ignore_errors: yes
-
-- name: lldp supported
- set_fact:
- lldp_supported: True
- when: not result.failed
-
-- name: lldp not supported
- set_fact:
- lldp_supported: False
- when: result.failed
-
-- block:
- - name: setup - Disable lldp - setup
- net_lldp:
- state: absent
- provider: "{{ netconf }}"
-
- - name: Enable lldp using platform agnostic module
- net_lldp:
- state: present
- provider: "{{ netconf }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
-
- - name: setup - Disable lldp - teardown
- net_lldp:
- state: absent
- provider: "{{ netconf }}"
- when: lldp_supported
-
-- debug: msg="START junos netconf/net_lldp.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lldp_global/defaults/main.yaml b/test/integration/targets/junos_lldp_global/defaults/main.yaml
deleted file mode 100644
index 164afead28..0000000000
--- a/test/integration/targets/junos_lldp_global/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "[^_].*"
-test_items: []
diff --git a/test/integration/targets/junos_lldp_global/meta/main.yml b/test/integration/targets/junos_lldp_global/meta/main.yml
deleted file mode 100644
index 191a0f2ea1..0000000000
--- a/test/integration/targets/junos_lldp_global/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_junos_tests
diff --git a/test/integration/targets/junos_lldp_global/tasks/main.yaml b/test/integration/targets/junos_lldp_global/tasks/main.yaml
deleted file mode 100644
index cc27f174fd..0000000000
--- a/test/integration/targets/junos_lldp_global/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: netconf.yaml, tags: ['netconf'] }
diff --git a/test/integration/targets/junos_lldp_global/tasks/netconf.yaml b/test/integration/targets/junos_lldp_global/tasks/netconf.yaml
deleted file mode 100644
index 73b91adfaa..0000000000
--- a/test/integration/targets/junos_lldp_global/tasks/netconf.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-- name: collect all netconf test cases
- find:
- paths: "{{ role_path }}/tests/netconf"
- patterns: "{{ testcase }}.yaml"
- use_regex: true
- connection: local
- register: test_cases
-
-- 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 }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_lldp_global/tests/netconf/_remove_config.yaml b/test/integration/targets/junos_lldp_global/tests/netconf/_remove_config.yaml
deleted file mode 100644
index bf6cad928e..0000000000
--- a/test/integration/targets/junos_lldp_global/tests/netconf/_remove_config.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-- debug:
- msg: "Start junos_lldp_global deleted remove interface config ansible_connection={{ ansible_connection }}"
-
-- name: "Setup - remove lldp global config"
- junos_config:
- lines:
- - delete protocols lldp
-
-- debug:
- msg: "End junos_lldp_global deleted remove interface config ansible_connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lldp_global/tests/netconf/deleted.yaml b/test/integration/targets/junos_lldp_global/tests/netconf/deleted.yaml
deleted file mode 100644
index 5c43d3040e..0000000000
--- a/test/integration/targets/junos_lldp_global/tests/netconf/deleted.yaml
+++ /dev/null
@@ -1,63 +0,0 @@
----
-- debug:
- msg: "START junos_lldp_global deleted integration tests on connection={{ ansible_connection }}"
-
-- name: get supported protocols
- junos_command:
- commands: show lldp
- register: result
- ignore_errors: yes
-
-- name: lldp supported
- set_fact:
- lldp_supported: True
- when: not result.failed
-
-- name: lldp not supported
- set_fact:
- lldp_supported: False
- when: result.failed
-
-- block:
-
- - include_tasks: _remove_config.yaml
-
- - set_fact:
- expected_deleted_output: []
-
- - name: Configure initial state for lldp global
- junos_lldp_global:
- config:
- interval: 10000
- address: 10.1.1.1
- transmit_delay: 400
- hold_multiplier: 10
- state: merged
- register: result
-
- - name: Delete the provided configuration from running configuration
- junos_lldp_global: &deleted
- config:
- state: deleted
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ result['after'] == {} }}"
-
- - name: Delete the provided configuration from running configuration (IDEMPOTENT)
- junos_lldp_global: *deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
- when: lldp_supported
-
-- debug:
- msg: "END junos_lldp_global deleted integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lldp_global/tests/netconf/merged.yaml b/test/integration/targets/junos_lldp_global/tests/netconf/merged.yaml
deleted file mode 100644
index 08967d5c12..0000000000
--- a/test/integration/targets/junos_lldp_global/tests/netconf/merged.yaml
+++ /dev/null
@@ -1,61 +0,0 @@
----
-- debug:
- msg: "START junos_lldp_global merged integration tests on connection={{ ansible_connection }}"
-
-- name: get supported protocols
- junos_command:
- commands: show lldp
- register: result
- ignore_errors: yes
-
-- name: lldp supported
- set_fact:
- lldp_supported: True
- when: not result.failed
-
-- name: lldp not supported
- set_fact:
- lldp_supported: False
- when: result.failed
-
-- block:
-
- - include_tasks: _remove_config.yaml
-
- - set_fact:
- expected_merged_output:
- - interval: 10000
- address: 10.1.1.1
- transmit_delay: 400
- hold_multiplier: 10
-
- - name: Merge the provided configuration with the exisiting running configuration
- junos_lldp_global: &merged
- config:
- interval: 10000
- address: 10.1.1.1
- transmit_delay: 400
- hold_multiplier: 10
- state: merged
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_merged_output | symmetric_difference([result['after']]) |length == 0 }}"
-
- - name: Merge the provided configuration with the existing running configuration (IDEMPOTENT)
- junos_lldp_global: *merged
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
- when: lldp_supported
-
-- debug:
- msg: "END junos_lldp_global merged integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lldp_global/tests/netconf/replaced.yaml b/test/integration/targets/junos_lldp_global/tests/netconf/replaced.yaml
deleted file mode 100644
index 8feaf9d2fb..0000000000
--- a/test/integration/targets/junos_lldp_global/tests/netconf/replaced.yaml
+++ /dev/null
@@ -1,72 +0,0 @@
----
-- debug:
- msg: "START junos_lldp_global replaced integration tests on connection={{ ansible_connection }}"
-
-- name: get supported protocols
- junos_command:
- commands: show lldp
- register: result
- ignore_errors: yes
-
-- name: lldp supported
- set_fact:
- lldp_supported: True
- when: not result.failed
-
-- name: lldp not supported
- set_fact:
- lldp_supported: False
- when: result.failed
-
-- block:
- - include_tasks: _remove_config.yaml
-
- - set_fact:
- expected_replaced_output:
- - interval: 20000
- address: 10.1.1.2
- transmit_delay: 500
- hold_multiplier: 5
- enabled: False
-
- - name: Configure initial state for lldp global
- junos_lldp_global:
- config:
- interval: 10000
- address: 10.1.1.1
- transmit_delay: 400
- hold_multiplier: 10
- state: merged
- register: result
-
- - name: Replace the provided configuration with the exisiting running configuration
- junos_lldp_global: &replaced
- config:
- interval: 20000
- address: 10.1.1.2
- transmit_delay: 500
- hold_multiplier: 5
- enabled: False
- state: replaced
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_replaced_output | symmetric_difference([result['after']]) |length == 0 }}"
-
- - name: Replace the provided configuration with the existing running configuration (IDEMPOTENT)
- junos_lldp_global: *replaced
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
- when: lldp_supported
-
-- debug:
- msg: "END junos_lldp_global replaced integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lldp_global/tests/netconf/rtt.yaml b/test/integration/targets/junos_lldp_global/tests/netconf/rtt.yaml
deleted file mode 100644
index 83e3887157..0000000000
--- a/test/integration/targets/junos_lldp_global/tests/netconf/rtt.yaml
+++ /dev/null
@@ -1,79 +0,0 @@
----
-- debug:
- msg: "START junos_lldp_global round trip integration tests on connection={{ ansible_connection }}"
-
-- name: get supported protocols
- junos_command:
- commands: show lldp
- register: result
- ignore_errors: yes
-
-- name: lldp supported
- set_fact:
- lldp_supported: True
- when: not result.failed
-
-- name: lldp not supported
- set_fact:
- lldp_supported: False
- when: result.failed
-
-- block:
-
- - include_tasks: _remove_config.yaml
-
- - set_fact:
- expected_revert_output:
- - interval: 10000
- address: 10.1.1.1
- transmit_delay: 400
- hold_multiplier: 10
-
- - name: Apply the provided configuration (base config)
- junos_lldp_global: &merged
- config:
- interval: 10000
- address: 10.1.1.1
- transmit_delay: 400
- hold_multiplier: 10
- state: merged
- register: base_config
-
- - name: Gather interfaces facts
- junos_facts:
- gather_subset:
- - default
- gather_network_resources:
- - lldp_global
-
- - name: Apply the provided configuration (config to be reverted)
- junos_lldp_global:
- config:
- interval: 20000
- address: 10.1.1.2
- transmit_delay: 500
- hold_multiplier: 5
- enabled: False
- state: replaced
- register: result
-
- - name: Assert that changes were applied
- assert:
- that: "result['changed'] == true"
-
- - name: Revert back to base config using facts round trip
- junos_lldp_global:
- config: "{{ ansible_facts['network_resources']['lldp_global'] }}"
- state: replaced
- register: revert
-
- - name: Assert that config was reverted
- assert:
- that: "{{ expected_revert_output | symmetric_difference([revert['after']]) |length == 0 }}"
-
- always:
- - include_tasks: _remove_config.yaml
- when: lldp_supported
-
-- debug:
- msg: "END junos_lldp_global round trip integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lldp_interface/defaults/main.yaml b/test/integration/targets/junos_lldp_interface/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/junos_lldp_interface/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/junos_lldp_interface/meta/main.yml b/test/integration/targets/junos_lldp_interface/meta/main.yml
deleted file mode 100644
index 191a0f2ea1..0000000000
--- a/test/integration/targets/junos_lldp_interface/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_junos_tests
diff --git a/test/integration/targets/junos_lldp_interface/tasks/main.yaml b/test/integration/targets/junos_lldp_interface/tasks/main.yaml
deleted file mode 100644
index cc27f174fd..0000000000
--- a/test/integration/targets/junos_lldp_interface/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: netconf.yaml, tags: ['netconf'] }
diff --git a/test/integration/targets/junos_lldp_interface/tasks/netconf.yaml b/test/integration/targets/junos_lldp_interface/tasks/netconf.yaml
deleted file mode 100644
index f73ce8727f..0000000000
--- a/test/integration/targets/junos_lldp_interface/tasks/netconf.yaml
+++ /dev/null
@@ -1,25 +0,0 @@
----
-- name: collect all netconf test cases
- find:
- paths: "{{ role_path }}/tests/netconf"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- connection: local
-
-- name: set test_items
- set_fact: test_items="{{ test_cases.files | map(attribute='path') | list }}"
-
-- 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 }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_lldp_interface/tests/netconf/basic.yaml b/test/integration/targets/junos_lldp_interface/tests/netconf/basic.yaml
deleted file mode 100644
index e864c05ee6..0000000000
--- a/test/integration/targets/junos_lldp_interface/tests/netconf/basic.yaml
+++ /dev/null
@@ -1,124 +0,0 @@
----
-- debug: msg="START junos_lldp_interface netconf/basic.yaml on connection={{ ansible_connection }}"
-
-- name: get supported protocols
- junos_command:
- commands: show lldp
- register: result
- ignore_errors: yes
-
-- name: lldp supported
- set_fact:
- lldp_supported: True
- when: not result.failed
-
-- name: lldp not supported
- set_fact:
- lldp_supported: False
- when: result.failed
-
-- block:
- - name: setup - Remove lldp interface configuration
- junos_lldp_interface:
- name: ge-0/0/5
- state: absent
- provider: "{{ netconf }}"
-
- - name: lldp interface configuration
- junos_lldp_interface:
- name: ge-0/0/5
- state: present
- provider: "{{ netconf }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - result.diff.prepared is search("\+ *interface ge-0/0/5")
-
- - name: lldp interface configuration (idempotent)
- junos_lldp_interface:
- name: ge-0/0/5
- state: present
- provider: "{{ netconf }}"
- register: result
-
- - assert:
- that:
- - "result.changed == false"
-
- - name: Deactivate lldp interface configuration
- junos_lldp_interface:
- name: ge-0/0/5
- state: present
- active: False
- provider: "{{ netconf }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - result.diff.prepared is search("! *inactive[:] interface ge-0/0/5")
-
- - name: Activate lldp interface configuration
- junos_lldp_interface:
- name: ge-0/0/5
- state: present
- active: True
- provider: "{{ netconf }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - result.diff.prepared is search("! *active[:] interface ge-0/0/5")
-
- - name: Disable lldp on particular interface
- junos_lldp_interface:
- name: ge-0/0/5
- state: disabled
- provider: "{{ netconf }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - result.diff.prepared is search("\+ *disable")
-
- - name: Enable lldp on particular interface
- junos_lldp_interface:
- name: ge-0/0/5
- state: enabled
- provider: "{{ netconf }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - result.diff.prepared is search("\- *disable")
-
- - name: Delete lldp on particular interface
- junos_lldp_interface:
- name: ge-0/0/5
- state: absent
- provider: "{{ netconf }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - result.diff.prepared is search("\- *interface ge-0/0/5")
-
- - name: Delete lldp on particular interface (idempotent)
- junos_lldp_interface:
- name: ge-0/0/5
- state: absent
- provider: "{{ netconf }}"
- register: result
-
- - assert:
- that:
- - "result.changed == false"
- when: lldp_supported
-
-- debug: msg="END junos_lldp_interface netconf/basic.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lldp_interface/tests/netconf/net_lldp_interface.yaml b/test/integration/targets/junos_lldp_interface/tests/netconf/net_lldp_interface.yaml
deleted file mode 100644
index b628ea1b1e..0000000000
--- a/test/integration/targets/junos_lldp_interface/tests/netconf/net_lldp_interface.yaml
+++ /dev/null
@@ -1,49 +0,0 @@
----
-- debug: msg="START junos netconf/net_lldp_interface.yaml on connection={{ ansible_connection }}"
-
-# Add minimal testcase to check args are passed correctly to
-# implementation module and module run is successful.
-
-- name: get supported protocols
- junos_command:
- commands: show lldp
- register: result
- ignore_errors: yes
-
-- name: lldp supported
- set_fact:
- lldp_supported: True
- when: not result.failed
-
-- name: lldp not supported
- set_fact:
- lldp_supported: False
- when: result.failed
-
-- block:
- - name: setup - Remove lldp interface configuration
- net_lldp_interface:
- name: ge-0/0/5
- state: absent
- provider: "{{ netconf }}"
-
- - name: lldp interface configuration using platform agnostic module
- net_lldp_interface:
- name: ge-0/0/5
- state: present
- provider: "{{ netconf }}"
- register: result
-
- - assert:
- that:
- - "result.changed == true"
- - result.diff.prepared is search("\+ *interface ge-0/0/5")
-
- - name: teardown - Remove lldp interface configuration
- net_lldp_interface:
- name: ge-0/0/5
- state: absent
- provider: "{{ netconf }}"
- when: lldp_supported
-
-- debug: msg="END junos netconf/net_lldp_interface.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lldp_interfaces/defaults/main.yaml b/test/integration/targets/junos_lldp_interfaces/defaults/main.yaml
deleted file mode 100644
index 164afead28..0000000000
--- a/test/integration/targets/junos_lldp_interfaces/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "[^_].*"
-test_items: []
diff --git a/test/integration/targets/junos_lldp_interfaces/meta/main.yaml b/test/integration/targets/junos_lldp_interfaces/meta/main.yaml
deleted file mode 100644
index 191a0f2ea1..0000000000
--- a/test/integration/targets/junos_lldp_interfaces/meta/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_junos_tests
diff --git a/test/integration/targets/junos_lldp_interfaces/tasks/main.yaml b/test/integration/targets/junos_lldp_interfaces/tasks/main.yaml
deleted file mode 100644
index cc27f174fd..0000000000
--- a/test/integration/targets/junos_lldp_interfaces/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: netconf.yaml, tags: ['netconf'] }
diff --git a/test/integration/targets/junos_lldp_interfaces/tasks/netconf.yaml b/test/integration/targets/junos_lldp_interfaces/tasks/netconf.yaml
deleted file mode 100644
index 73b91adfaa..0000000000
--- a/test/integration/targets/junos_lldp_interfaces/tasks/netconf.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-- name: collect all netconf test cases
- find:
- paths: "{{ role_path }}/tests/netconf"
- patterns: "{{ testcase }}.yaml"
- use_regex: true
- connection: local
- register: test_cases
-
-- 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 }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_lldp_interfaces/tests/netconf/_remove_config.yaml b/test/integration/targets/junos_lldp_interfaces/tests/netconf/_remove_config.yaml
deleted file mode 100644
index 3ab8d02f21..0000000000
--- a/test/integration/targets/junos_lldp_interfaces/tests/netconf/_remove_config.yaml
+++ /dev/null
@@ -1,11 +0,0 @@
----
-- debug:
- msg: "Start junos_lldp_interfaces deleted remove interface config ansible_connection={{ ansible_connection }}"
-
-- name: "Setup - remove lldp interfaces config"
- junos_config:
- lines:
- - delete protocols lldp
-
-- debug:
- msg: "End junos_lldp_interfaces deleted remove interface config ansible_connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lldp_interfaces/tests/netconf/deleted.yaml b/test/integration/targets/junos_lldp_interfaces/tests/netconf/deleted.yaml
deleted file mode 100644
index a9468bf9f4..0000000000
--- a/test/integration/targets/junos_lldp_interfaces/tests/netconf/deleted.yaml
+++ /dev/null
@@ -1,87 +0,0 @@
----
-- debug:
- msg: "START junos_lldp_interfaces deleted integration tests on connection={{ ansible_connection }}"
-
-- name: get supported protocols
- junos_command:
- commands: show lldp
- register: result
- ignore_errors: yes
-
-- name: lldp supported
- set_fact:
- lldp_supported: True
- when: not result.failed
-
-- name: lldp not supported
- set_fact:
- lldp_supported: False
- when: result.failed
-
-- block:
- - include_tasks: _remove_config.yaml
-
- - set_fact:
- expected_deleted_output:
- - name: ge-0/0/1
-
- - name: Configure initial state for lldp interfaces
- junos_lldp_interfaces: &initial
- config:
- - name: ge-0/0/1
- - name: ge-0/0/2
- enabled: False
- state: merged
- register: result
-
- - name: Delete the provided lldp interface configuration from running configuration
- junos_lldp_interfaces: &deleted
- config:
- - name: ge-0/0/2
- state: deleted
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_deleted_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Delete the provided lldp interface configuration from running configuration (IDEMPOTENT)
- junos_lldp_interfaces: *deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- - name: Configure initial state for interface
- junos_lldp_interfaces: *initial
- register: result
-
- - name: Delete the all lldp interface configuration from running configuration
- junos_lldp_interfaces:
- state: deleted
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ result['after'] == []}}"
-
- - name: Delete the all lldp interface configuration from running configuration (IDEMPOTENT)
- junos_lldp_interfaces:
- state: deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
- when: lldp_supported
-
-- debug:
- msg: "END junos_lldp_interfaces deleted integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lldp_interfaces/tests/netconf/merged.yaml b/test/integration/targets/junos_lldp_interfaces/tests/netconf/merged.yaml
deleted file mode 100644
index 125e2a30ec..0000000000
--- a/test/integration/targets/junos_lldp_interfaces/tests/netconf/merged.yaml
+++ /dev/null
@@ -1,58 +0,0 @@
----
-- debug:
- msg: "START junos_lldp_interfaces merged integration tests on connection={{ ansible_connection }}"
-
-- name: get supported protocols
- junos_command:
- commands: show lldp
- register: result
- ignore_errors: yes
-
-- name: lldp supported
- set_fact:
- lldp_supported: True
- when: not result.failed
-
-- name: lldp not supported
- set_fact:
- lldp_supported: False
- when: result.failed
-
-- block:
- - include_tasks: _remove_config.yaml
-
- - set_fact:
- expected_merged_output:
- - name: ge-0/0/1
- - name: ge-0/0/2
- enabled: False
-
- - name: Merge the provided configuration with the exisiting running configuration
- junos_lldp_interfaces: &merged
- config:
- - name: ge-0/0/1
- - name: ge-0/0/2
- enabled: False
- state: merged
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_merged_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Merge the provided configuration with the existing running configuration (IDEMPOTENT)
- junos_lldp_interfaces: *merged
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
- when: lldp_supported
-
-- debug:
- msg: "END junos_lldp_interfaces merged integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lldp_interfaces/tests/netconf/overridden.yaml b/test/integration/targets/junos_lldp_interfaces/tests/netconf/overridden.yaml
deleted file mode 100644
index bbe06d4c92..0000000000
--- a/test/integration/targets/junos_lldp_interfaces/tests/netconf/overridden.yaml
+++ /dev/null
@@ -1,63 +0,0 @@
----
-- debug:
- msg: "START junos_lldp_interfaces overridden integration tests on connection={{ ansible_connection }}"
-
-- name: get supported protocols
- junos_command:
- commands: show lldp
- register: result
- ignore_errors: yes
-
-- name: lldp supported
- set_fact:
- lldp_supported: True
- when: not result.failed
-
-- name: lldp not supported
- set_fact:
- lldp_supported: False
- when: result.failed
-
-- block:
- - include_tasks: _remove_config.yaml
-
- - set_fact:
- expected_overridden_output:
- - name: ge-0/0/2
-
- - name: Configure initial state for interface
- junos_lldp_interfaces:
- config:
- - name: ge-0/0/1
- - name: ge-0/0/2
- enabled: False
- state: merged
- register: result
-
- - name: Override the provided configuration with the exisiting running configuration
- junos_lldp_interfaces: &overridden
- config:
- - name: ge-0/0/2
- state: overridden
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_overridden_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Override the provided configuration with the existing running configuration (IDEMPOTENT)
- junos_lldp_interfaces: *overridden
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
- when: lldp_supported
-
-- debug:
- msg: "END junos_lldp_interfaces overridden integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lldp_interfaces/tests/netconf/replaced.yaml b/test/integration/targets/junos_lldp_interfaces/tests/netconf/replaced.yaml
deleted file mode 100644
index 4c87a563c3..0000000000
--- a/test/integration/targets/junos_lldp_interfaces/tests/netconf/replaced.yaml
+++ /dev/null
@@ -1,66 +0,0 @@
----
-- debug:
- msg: "START junos_lldp_interfaces replaced integration tests on connection={{ ansible_connection }}"
-
-- name: get supported protocols
- junos_command:
- commands: show lldp
- register: result
- ignore_errors: yes
-
-- name: lldp supported
- set_fact:
- lldp_supported: True
- when: not result.failed
-
-- name: lldp not supported
- set_fact:
- lldp_supported: False
- when: result.failed
-
-- block:
- - include_tasks: _remove_config.yaml
-
- - set_fact:
- expected_replaced_output:
- - name: ge-0/0/1
- enabled: False
- - name: ge-0/0/2
- enabled: False
-
- - name: Configure initial state for interface
- junos_lldp_interfaces:
- config:
- - name: ge-0/0/1
- - name: ge-0/0/2
- enabled: False
- register: result
-
- - name: Replace the provided configuration with the exisiting running configuration
- junos_lldp_interfaces: &replaced
- config:
- - name: ge-0/0/1
- enabled: False
- state: replaced
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_replaced_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Replace the provided configuration with the existing running configuration (IDEMPOTENT)
- junos_lldp_interfaces: *replaced
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
- when: lldp_supported
-
-- debug:
- msg: "END junos_lldp_interfaces replaced integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_lldp_interfaces/tests/netconf/rtt.yaml b/test/integration/targets/junos_lldp_interfaces/tests/netconf/rtt.yaml
deleted file mode 100644
index 9752693163..0000000000
--- a/test/integration/targets/junos_lldp_interfaces/tests/netconf/rtt.yaml
+++ /dev/null
@@ -1,72 +0,0 @@
----
-- debug:
- msg: "START junos_lldp_interfaces round trip integration tests on connection={{ ansible_connection }}"
-
-- name: get supported protocols
- junos_command:
- commands: show lldp
- register: result
- ignore_errors: yes
-
-- name: lldp supported
- set_fact:
- lldp_supported: True
- when: not result.failed
-
-- name: lldp not supported
- set_fact:
- lldp_supported: False
- when: result.failed
-
-- block:
- - include_tasks: _remove_config.yaml
-
- - set_fact:
- expected_revert_output:
- - name: ge-0/0/1
- - name: ge-0/0/2
- enabled: False
-
- - name: Apply the provided configuration (base config)
- junos_lldp_interfaces:
- config:
- - name: ge-0/0/1
- - name: ge-0/0/2
- enabled: False
- state: merged
- register: base_config
-
- - name: Gather interfaces facts
- junos_facts:
- gather_subset:
- - default
- gather_network_resources:
- - lldp_interfaces
-
- - name: Apply the provided configuration (config to be reverted)
- junos_lldp_interfaces:
- config:
- - name: ge-0/0/2
- state: overridden
- register: result
-
- - name: Assert that changes were applied
- assert:
- that: "result['changed'] == true"
-
- - name: Revert back to base config using facts round trip
- junos_lldp_interfaces:
- config: "{{ ansible_facts['network_resources']['lldp_interfaces'] }}"
- state: replaced
- register: revert
-
- - name: Assert that config was reverted
- assert:
- that: "{{ expected_revert_output | symmetric_difference(revert['after']) |length == 0 }}"
-
- always:
- - include_tasks: _remove_config.yaml
- when: lldp_supported
-
-- debug:
- msg: "END junos_lldp_interfaces round trip integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_logging/aliases b/test/integration/targets/junos_logging/aliases
deleted file mode 100644
index e69de29bb2..0000000000
--- a/test/integration/targets/junos_logging/aliases
+++ /dev/null
diff --git a/test/integration/targets/junos_logging/defaults/main.yaml b/test/integration/targets/junos_logging/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/junos_logging/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/junos_logging/meta/main.yml b/test/integration/targets/junos_logging/meta/main.yml
deleted file mode 100644
index 191a0f2ea1..0000000000
--- a/test/integration/targets/junos_logging/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_junos_tests
diff --git a/test/integration/targets/junos_logging/tasks/main.yaml b/test/integration/targets/junos_logging/tasks/main.yaml
deleted file mode 100644
index cc27f174fd..0000000000
--- a/test/integration/targets/junos_logging/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: netconf.yaml, tags: ['netconf'] }
diff --git a/test/integration/targets/junos_logging/tasks/netconf.yaml b/test/integration/targets/junos_logging/tasks/netconf.yaml
deleted file mode 100644
index c1985c530a..0000000000
--- a/test/integration/targets/junos_logging/tasks/netconf.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-- name: collect all netconf test cases
- find:
- paths: "{{ role_path }}/tests/netconf"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- connection: local
-
-- 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 }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_logging/tests/netconf/basic.yaml b/test/integration/targets/junos_logging/tests/netconf/basic.yaml
deleted file mode 100644
index b17ee25fc5..0000000000
--- a/test/integration/targets/junos_logging/tests/netconf/basic.yaml
+++ /dev/null
@@ -1,394 +0,0 @@
----
-- debug: msg="START junos_logging netconf/basic.yaml on connection={{ ansible_connection }}"
-
-- name: setup - remove file logging
- junos_logging:
- dest: file
- name: test
- facility: pfe
- level: error
- state: absent
- provider: "{{ netconf }}"
-
-- name: Create file logging
- junos_logging:
- dest: file
- name: test_file
- facility: pfe
- level: error
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>test_file</name>' in config.xml"
- - "'<name>pfe</name>' in config.xml"
- - "'<error/>' in config.xml"
-
-- name: Create file logging (idempotent)
- junos_logging:
- dest: file
- name: test_file
- facility: pfe
- level: error
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Deactivate logging configuration
- junos_logging:
- dest: file
- name: test_file
- facility: pfe
- level: error
- state: present
- active: False
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<file inactive=\"inactive\">' in config.xml"
- - "'<contents inactive=\"inactive\">' in config.xml"
-
-- name: Activate logging configuration
- junos_logging:
- dest: file
- name: test_file
- facility: pfe
- level: error
- state: present
- active: True
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>test_file</name>' in config.xml"
- - "'<name>pfe</name>' in config.xml"
- - "'<error/>' in config.xml"
-
-- name: Delete logging configuration
- junos_logging:
- dest: file
- name: test_file
- facility: pfe
- level: error
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>test_file</name>' not in config.xml"
-
-- name: Configure console logging
- junos_logging:
- dest: console
- facility: kernel
- level: emergency
- state: present
- active: True
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<console>' in config.xml"
- - "'<name>kernel</name>' in config.xml"
- - "'<emergency/>' in config.xml"
-
-- name: Configure console logging (idempotent)
- junos_logging:
- dest: console
- facility: kernel
- level: emergency
- state: present
- active: True
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Disable console logging
- junos_logging:
- dest: console
- facility: kernel
- level: emergency
- state: present
- active: False
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<console inactive=\"inactive\">' in config.xml"
-
-- name: Delete console logging
- junos_logging:
- dest: console
- facility: kernel
- level: emergency
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<console>' not in config.xml"
-
-- name: Configure logging parameters
- junos_logging:
- size: 65536
- files: 40
- rotate_frequency: 20
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<size>64k</size>' in config.xml"
- - "'<files>40</files>' in config.xml"
- - "'<log-rotate-frequency>20</log-rotate-frequency>' in config.xml"
-
-- name: Configure logging parameters (idempotent)
- junos_logging:
- size: 65536
- files: 40
- rotate_frequency: 20
- state: present
- active: True
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Disable logging parameters
- junos_logging:
- size: 65536
- files: 40
- rotate_frequency: 20
- state: present
- active: False
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<size inactive=\"inactive\">64k</size>' in config.xml"
- - "'<files inactive=\"inactive\">40</files>' in config.xml"
- - "'<log-rotate-frequency inactive=\"inactive\">20</log-rotate-frequency>' in config.xml"
-
-- name: Activate logging parameters
- junos_logging:
- size: 65536
- files: 40
- rotate_frequency: 20
- state: present
- active: True
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<size>64k</size>' in config.xml"
- - "'<files>40</files>' in config.xml"
- - "'<log-rotate-frequency>20</log-rotate-frequency>' in config.xml"
-
-- name: Delete logging parameters
- junos_logging:
- size: 65536
- files: 40
- rotate_frequency: 20
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<size>64k</size>' not in config.xml"
- - "'<files>40</files>' not in config.xml"
- - "'<log-rotate-frequency>20</log-rotate-frequency>' not in config.xml"
-
-- name: Seup file logging using aggregate
- junos_logging:
- aggregate:
- - {dest: file, name: test-1, facility: pfe, level: critical, state: absent}
- - {dest: file, name: test-2, facility: kernel, level: emergency, state: absent}
- provider: "{{ netconf }}"
- register: result
-
-- name: Configure file logging using aggregate
- junos_logging:
- aggregate:
- - {dest: file, name: test-1, facility: pfe, level: critical, active: True}
- - {dest: file, name: test-2, facility: kernel, level: emergency, active: True}
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - result.diff.prepared is search("\+ *file test-1")
- - result.diff.prepared is search("\+ *pfe critical")
- - result.diff.prepared is search("\+ *file test-2")
- - result.diff.prepared is search("\+ *kernel emergency")
-
-- name: Deactivate file logging configuration using aggregate
- junos_logging:
- aggregate:
- - dest: file
- name: test-1
- facility: pfe
- level: critical
- - dest: file
- name: test-2
- facility: kernel
- level: emergency
- active: False
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - result.diff.prepared is search("! *inactive[:] file test-1")
- - result.diff.prepared is search("! *inactive[:] pfe")
- - result.diff.prepared is search("! *inactive[:] file test-2")
- - result.diff.prepared is search("! *inactive[:] kernel")
-
-- name: activate file logging configuration using aggregate
- junos_logging:
- aggregate:
- - { dest: file, name: test-1, facility: pfe, level: critical }
- - { dest: file, name: test-2, facility: kernel, level: emergency }
- active: True
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - result.diff.prepared is search("! *active[:] file test-1")
- - result.diff.prepared is search("! *active[:] pfe")
- - result.diff.prepared is search("! *active[:] file test-2")
- - result.diff.prepared is search("! *active[:] kernel")
-
-- name: Delete file logging using aggregate
- junos_logging:
- aggregate:
- - { dest: file, name: test-1, facility: pfe, level: critical }
- - { dest: file, name: test-2, facility: kernel, level: emergency }
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - result.diff.prepared is search("\- *file test-1")
- - result.diff.prepared is search("\- *pfe critical")
- - result.diff.prepared is search("\- *file test-2")
- - result.diff.prepared is search("\- *kernel emergency")
-
-- name: Delete file logging using aggregate (idempotent)
- junos_logging:
- aggregate:
- - { dest: file, name: test-1, facility: pfe, level: critical }
- - { dest: file, name: test-2, facility: kernel, level: emergency }
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- debug: msg="END junos_logging netconf/basic.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_logging/tests/netconf/net_logging.yaml b/test/integration/targets/junos_logging/tests/netconf/net_logging.yaml
deleted file mode 100644
index 648f5a275e..0000000000
--- a/test/integration/targets/junos_logging/tests/netconf/net_logging.yaml
+++ /dev/null
@@ -1,48 +0,0 @@
----
-- debug: msg="START junos netconf/net_logging.yaml on connection={{ ansible_connection }}"
-
-# Add minimal testcase to check args are passed correctly to
-# implementation module and module run is successful.
-
-- name: setup - remove file logging
- net_logging:
- dest: file
- name: test
- facility: pfe
- level: error
- state: absent
- provider: "{{ netconf }}"
-
-- name: Create file logging using platform agnostic module
- net_logging:
- dest: file
- name: test_file
- facility: pfe
- level: error
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>test_file</name>' in config.xml"
- - "'<name>pfe</name>' in config.xml"
- - "'<error/>' in config.xml"
-
-- name: teardown - remove file logging
- net_logging:
- dest: file
- name: test
- facility: pfe
- level: error
- state: absent
- provider: "{{ netconf }}"
-
-- debug: msg="END junos netconf/net_logging.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_netconf/defaults/main.yaml b/test/integration/targets/junos_netconf/defaults/main.yaml
deleted file mode 100644
index 9ef5ba5165..0000000000
--- a/test/integration/targets/junos_netconf/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "*"
-test_items: []
diff --git a/test/integration/targets/junos_netconf/tasks/cli.yaml b/test/integration/targets/junos_netconf/tasks/cli.yaml
deleted file mode 100644
index 1faa514d5c..0000000000
--- a/test/integration/targets/junos_netconf/tasks/cli.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-- name: collect all cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- connection: local
-
-- 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
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_netconf/tasks/main.yaml b/test/integration/targets/junos_netconf/tasks/main.yaml
deleted file mode 100644
index 415c99d8b1..0000000000
--- a/test/integration/targets/junos_netconf/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
diff --git a/test/integration/targets/junos_netconf/tests/cli/changeport.yaml b/test/integration/targets/junos_netconf/tests/cli/changeport.yaml
deleted file mode 100644
index d939a7b13e..0000000000
--- a/test/integration/targets/junos_netconf/tests/cli/changeport.yaml
+++ /dev/null
@@ -1,104 +0,0 @@
----
-- debug: msg="START netconf/changeport.yaml on connection={{ ansible_connection }}"
-
-- name: Setup
- junos_netconf:
- state: present
-
-###################################
-
-- name: Change port
- junos_netconf:
- state: present
- netconf_port: 8022
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: idempotent tests
- junos_netconf:
- state: present
- netconf_port: 8022
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: wait for netconf port tcp/8022 to be open
- wait_for:
- host: "{{ hostvars[item].ansible_host }}"
- port: 8022
- with_inventory_hostnames: junos
-
-- name: Reset ansible connections
- meta: reset_connection
-
-- name: Ensure we can communicate over 8022
- include: "{{ role_path }}/tests/utils/junos_command.yaml ansible_connection=netconf ansible_port=8022 is_ignore_errors=false"
-
-- name: wait for netconf port tcp/830 to be closed
- wait_for:
- host: "{{ hostvars[item].ansible_host }}"
- port: 830
- state: stopped
- with_inventory_hostnames: junos
-
-# This protects against the port override above not being honoured and a bug setting the port
-- name: Ensure we can NOT communicate over default port
- include: "{{ role_path }}/tests/utils/junos_command.yaml ansible_connection=netconf ansible_port=830 is_ignore_errors=true"
-
-- assert:
- that:
- - "result.failed == true"
-
-- name: Set back netconf to default port
- junos_netconf:
- state: present
-
-- name: wait for netconf port tcp/830 to be open
- wait_for:
- host: "{{ hostvars[item].ansible_host }}"
- port: 830
- with_inventory_hostnames: junos
-
-- name: Reset ansible connections
- meta: reset_connection
-
-- name: Ensure we can communicate over netconf
- include: "{{ role_path }}/tests/utils/junos_command.yaml ansible_connection=netconf ansible_port=830 is_ignore_errors=false"
-
-- name: Change port (check mode)
- junos_netconf:
- state: present
- netconf_port: 12345
- register: result
- check_mode: true
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: wait for netconf port tcp/12345 to be closed
- wait_for:
- host: "{{ hostvars[item].ansible_host }}"
- port: 12345
- state: stopped
- with_inventory_hostnames: junos
-
-- name: Reset ansible connections
- meta: reset_connection
-
-- name: Ensure we can NOT communicate over non-default port
- include: "{{ role_path }}/tests/utils/junos_command.yaml ansible_connection=netconf ansible_port=12345 is_ignore_errors=true"
-
-- assert:
- that:
- - "result.failed == true"
-
-- name: Ensure we can communicate over default port
- include: "{{ role_path }}/tests/utils/junos_command.yaml ansible_connection=netconf ansible_port=830 is_ignore_errors=false"
-
-- debug: msg="END netconf/changeport.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_netconf/tests/cli/netconf.yaml b/test/integration/targets/junos_netconf/tests/cli/netconf.yaml
deleted file mode 100644
index eb3db8dcb5..0000000000
--- a/test/integration/targets/junos_netconf/tests/cli/netconf.yaml
+++ /dev/null
@@ -1,120 +0,0 @@
----
-- debug: msg="START netconf/netconf.yaml on connection={{ ansible_connection }}"
-
-- name: Ensure netconf is enabled
- junos_netconf:
- state: present
-
-- name: idempotent tests
- junos_netconf:
- state: present
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-###################################
-
-- name: wait for netconf port tcp/830 to be open
- wait_for:
- host: "{{ hostvars[item].ansible_host }}"
- port: 830
- with_inventory_hostnames: junos
-
-- name: Reset ansible connections
- meta: reset_connection
-
-- name: Ensure we can communicate over netconf
- include: "{{ role_path }}/tests/utils/junos_command.yaml ansible_connection=netconf ansible_port=830 is_ignore_errors=false"
-
-- name: Disable netconf (check mode)
- junos_netconf:
- state: absent
- register: result
- check_mode: yes
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: wait for netconf port tcp/830 to be open
- wait_for:
- host: "{{ hostvars[item].ansible_host }}"
- port: 830
- with_inventory_hostnames: junos
-
-- name: Reset ansible connections
- meta: reset_connection
-
-- name: Ensure we can communicate over netconf
- include: "{{ role_path }}/tests/utils/junos_command.yaml ansible_connection=netconf ansible_port=830 is_ignore_errors=false"
-
-# Disable netconf
-- name: Disable netconf
- junos_netconf:
- state: absent
- register: result
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: idempotent tests
- junos_netconf:
- state: absent
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: wait for netconf port tcp/830 to be closed
- wait_for:
- host: "{{ hostvars[item].ansible_host }}"
- port: 830
- state: stopped
- with_inventory_hostnames: junos
-
-- name: Reset ansible connections
- meta: reset_connection
-
-- name: Ensure we can NOT talk via netconf
- include: "{{ role_path }}/tests/utils/junos_command.yaml ansible_connection=netconf ansible_port=830 is_ignore_errors=true"
-
-- assert:
- that:
- - "result.failed == true"
-
-- name: Enable netconf (check mode)
- junos_netconf:
- state: present
- register: result
- check_mode: yes
-
-- assert:
- that:
- - "result.changed == true"
-
-- name: wait for netconf port tcp/830 to be closed
- wait_for:
- host: "{{ hostvars[item].ansible_host }}"
- port: 830
- state: stopped
- with_inventory_hostnames: junos
-
-- name: Reset ansible connections
- meta: reset_connection
-
-- name: Ensure we can NOT talk via netconf
- include: "{{ role_path }}/tests/utils/junos_command.yaml ansible_connection=netconf ansible_port=830 is_ignore_errors=true"
-
-- assert:
- that:
- - "result.failed == true"
-
-- name: re-enable netconf
- junos_netconf:
- state: present
-
-- debug: msg="END netconf/netconfg.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_netconf/tests/utils/junos_command.yaml b/test/integration/targets/junos_netconf/tests/utils/junos_command.yaml
deleted file mode 100644
index ed6011aee8..0000000000
--- a/test/integration/targets/junos_netconf/tests/utils/junos_command.yaml
+++ /dev/null
@@ -1,6 +0,0 @@
----
-- name: run junos_command to check netconf connectivity
- junos_command:
- rpcs: get-software-information
- register: result
- ignore_errors: "{{ is_ignore_errors }}"
diff --git a/test/integration/targets/junos_rpc/defaults/main.yaml b/test/integration/targets/junos_rpc/defaults/main.yaml
deleted file mode 100644
index 9ef5ba5165..0000000000
--- a/test/integration/targets/junos_rpc/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "*"
-test_items: []
diff --git a/test/integration/targets/junos_rpc/meta/main.yml b/test/integration/targets/junos_rpc/meta/main.yml
deleted file mode 100644
index 191a0f2ea1..0000000000
--- a/test/integration/targets/junos_rpc/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_junos_tests
diff --git a/test/integration/targets/junos_rpc/tasks/main.yaml b/test/integration/targets/junos_rpc/tasks/main.yaml
deleted file mode 100644
index cc27f174fd..0000000000
--- a/test/integration/targets/junos_rpc/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: netconf.yaml, tags: ['netconf'] }
diff --git a/test/integration/targets/junos_rpc/tasks/netconf.yaml b/test/integration/targets/junos_rpc/tasks/netconf.yaml
deleted file mode 100644
index 24181dcf38..0000000000
--- a/test/integration/targets/junos_rpc/tasks/netconf.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
-- name: collect netconf test cases
- find:
- paths: "{{ role_path }}/tests/netconf"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- connection: local
-
-- 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 }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_rpc/tests/netconf/rpc.yaml b/test/integration/targets/junos_rpc/tests/netconf/rpc.yaml
deleted file mode 100644
index 4f51b33d30..0000000000
--- a/test/integration/targets/junos_rpc/tests/netconf/rpc.yaml
+++ /dev/null
@@ -1,73 +0,0 @@
----
-- debug: msg="START netconf/rpc.yaml on connection={{ ansible_connection }}"
-
-- name: Execute RPC on device
- junos_rpc:
- rpc: get-interface-information
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "'<interface-information' in result['xml']"
- - "result.output is defined"
-
-- name: Execute RPC with args on device
- junos_rpc:
- rpc: get-interface-information
- args:
- interface-name: lo0
- media: True
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "'<name>\nlo0\n</name>' in result['xml']"
- - "'<name>\nem0\n</name>' not in result['xml']"
- - "'<name>\fxp0\n</name>' not in result['xml']"
-
-- name: Execute RPC on device and get output in text format
- junos_rpc:
- rpc: get-interface-information
- output: text
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.output is defined"
- - "result.output_lines is defined"
- - "'Physical interface' in result['output']"
-
-- name: Execute RPC on device and get output in json format
- junos_rpc:
- rpc: get-interface-information
- output: json
- args:
- interface-name: lo0
- media: True
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.output is defined"
- - "result['output']['interface-information'][0]['physical-interface'][0]['name'][0]['data'] == \"lo0\""
-
-- name: Execute invalid RPC
- junos_rpc:
- rpc: show-interface-information
- provider: "{{ netconf }}"
- register: result
- ignore_errors: yes
-
-- assert:
- that:
- - "result.failed == true"
-
-- debug: msg="END netconf/rpc.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_smoke/defaults/main.yaml b/test/integration/targets/junos_smoke/defaults/main.yaml
deleted file mode 100644
index 9ef5ba5165..0000000000
--- a/test/integration/targets/junos_smoke/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "*"
-test_items: []
diff --git a/test/integration/targets/junos_smoke/meta/main.yml b/test/integration/targets/junos_smoke/meta/main.yml
deleted file mode 100644
index 191a0f2ea1..0000000000
--- a/test/integration/targets/junos_smoke/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_junos_tests
diff --git a/test/integration/targets/junos_smoke/tasks/cli.yaml b/test/integration/targets/junos_smoke/tasks/cli.yaml
deleted file mode 100644
index 7b0afac3ac..0000000000
--- a/test/integration/targets/junos_smoke/tasks/cli.yaml
+++ /dev/null
@@ -1,15 +0,0 @@
-- name: collect cli test cases
- find:
- paths: "{{ role_path }}/tests/cli"
- 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 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/junos_smoke/tasks/main.yaml b/test/integration/targets/junos_smoke/tasks/main.yaml
deleted file mode 100644
index af08869c92..0000000000
--- a/test/integration/targets/junos_smoke/tasks/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-- { include: cli.yaml, tags: ['cli'] }
-- { include: netconf.yaml, tags: ['netconf'] }
diff --git a/test/integration/targets/junos_smoke/tasks/netconf.yaml b/test/integration/targets/junos_smoke/tasks/netconf.yaml
deleted file mode 100644
index 9550210102..0000000000
--- a/test/integration/targets/junos_smoke/tasks/netconf.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
-- name: collect netconf test cases
- find:
- paths: "{{ role_path }}/tests/netconf"
- 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 case (connection=netconf)
- include: "{{ test_case_to_run }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_smoke/tests/cli/reboot.yaml b/test/integration/targets/junos_smoke/tests/cli/reboot.yaml
deleted file mode 100644
index 77c41f3b24..0000000000
--- a/test/integration/targets/junos_smoke/tests/cli/reboot.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
----
-- cli_command:
- command: request system reboot
- prompt:
- - Reboot the system?
- answer:
- - y
-
-- wait_for_connection:
- delay: 20
- sleep: 10
-
-- cli_command:
- command: show version
diff --git a/test/integration/targets/junos_smoke/tests/netconf/common_utils.yaml b/test/integration/targets/junos_smoke/tests/netconf/common_utils.yaml
deleted file mode 100644
index 51c4bbc994..0000000000
--- a/test/integration/targets/junos_smoke/tests/netconf/common_utils.yaml
+++ /dev/null
@@ -1,56 +0,0 @@
----
- # junos interface -> remove_default_spec() conditional()
- - debug: msg="START junos_interface netconf/common_utils.yaml on connection={{ ansible_connection }}"
-
- - name: get facts
- junos_facts:
- provider: "{{ netconf }}"
- register: result
-
-
- - name: Define interface name for vSRX
- set_fact:
- intf_name: pp0
- when: result['ansible_facts']['ansible_net_model'] is search("vSRX*")
-
- - name: Define interface name for vsrx
- set_fact:
- intf_name: pp0
- when: result['ansible_facts']['ansible_net_model'] is search("vsrx")
-
- - name: Define interface name for vQFX
- set_fact:
- intf_name: gr-0/0/0
- when: result['ansible_facts']['ansible_net_model'] is search("vqfx*")
-
- - name: Check intent arguments
- junos_interface:
- name: "{{ intf_name }}"
- state: up
- tx_rate: ge(0)
- rx_rate: le(0)
- provider: "{{ netconf }}"
- register: result
-
- - assert:
- that:
- - "result.failed == false"
-
- - name: Check intent arguments (failed condition)
- junos_interface:
- name: "{{ intf_name }}"
- state: down
- tx_rate: gt(0)
- rx_rate: lt(0)
- provider: "{{ netconf }}"
- ignore_errors: yes
- register: result
-
- - assert:
- that:
- - "result.failed == true"
- - "'state eq(down)' in result.failed_conditions"
- - "'tx_rate gt(0)' in result.failed_conditions"
- - "'rx_rate lt(0)' in result.failed_conditions"
-
- - debug: msg="END junos_interface netconf/common_utils.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_smoke/tests/netconf/module_utils_junos.yaml b/test/integration/targets/junos_smoke/tests/netconf/module_utils_junos.yaml
deleted file mode 100644
index 4f12ac0101..0000000000
--- a/test/integration/targets/junos_smoke/tests/netconf/module_utils_junos.yaml
+++ /dev/null
@@ -1,99 +0,0 @@
----
-- debug: msg="START netconf/module_utils_junos.yaml on connection={{ ansible_connection }}"
-
-# hit get_capabilities()
-
-- name: get output for single command
- junos_command:
- commands: ['show version']
- format: json
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
- - "result.stdout is defined"
- - "result.stdout_lines is defined"
-
-# hit commit_configuration()
-- name: setup - remove login banner
- junos_banner:
- banner: login
- state: absent
- provider: "{{ netconf }}"
-
-- name: Create login banner
- junos_banner:
- banner: login
- text: this is my login banner
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<message>this is my login banner</message>' in config.xml"
-
-# hit discard_changes()
-- name: check mode
- junos_banner:
- banner: login
- text: this is not the banner you're looking for
- state: present
- provider: "{{ netconf }}"
- register: result
- check_mode: yes
-
-- assert:
- that:
- - "result.changed == true"
- - "result.failed == false"
-
-
-# hit field_top in map_obj_to_ele
-- name: setup - remove interface address
- net_l3_interface:
- name: ge-0/0/1
- ipv4: 192.0.2.1
- ipv6: fd5d:12c9:2201:1::1
- state: absent
- provider: "{{ netconf }}"
-
-- name: Configure interface address using platform agnostic module
- net_l3_interface:
- name: ge-0/0/1
- ipv4: 192.0.2.1
- ipv6: fd5d:12c9:2201:1::1
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>192.0.2.1/32</name>' in config.xml"
- - "'<name>fd5d:12c9:2201:1::1/128</name>' in config.xml"
- - result.diff.prepared is search("\+ *address 192.0.2.1/32")
- - result.diff.prepared is search("\+ *address fd5d:12c9:2201:1::1/128")
-
-- name: teardown - remove interface address
- net_l3_interface:
- name: ge-0/0/1
- ipv4: 192.0.2.1
- ipv6: fd5d:12c9:2201:1::1
- state: absent
- provider: "{{ netconf }}"
diff --git a/test/integration/targets/junos_static_route/defaults/main.yaml b/test/integration/targets/junos_static_route/defaults/main.yaml
deleted file mode 100644
index 5f709c5aac..0000000000
--- a/test/integration/targets/junos_static_route/defaults/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-testcase: "*"
diff --git a/test/integration/targets/junos_static_route/meta/main.yml b/test/integration/targets/junos_static_route/meta/main.yml
deleted file mode 100644
index 191a0f2ea1..0000000000
--- a/test/integration/targets/junos_static_route/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_junos_tests
diff --git a/test/integration/targets/junos_static_route/tasks/main.yaml b/test/integration/targets/junos_static_route/tasks/main.yaml
deleted file mode 100644
index cc27f174fd..0000000000
--- a/test/integration/targets/junos_static_route/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: netconf.yaml, tags: ['netconf'] }
diff --git a/test/integration/targets/junos_static_route/tasks/netconf.yaml b/test/integration/targets/junos_static_route/tasks/netconf.yaml
deleted file mode 100644
index c1985c530a..0000000000
--- a/test/integration/targets/junos_static_route/tasks/netconf.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-- name: collect all netconf test cases
- find:
- paths: "{{ role_path }}/tests/netconf"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- connection: local
-
-- 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 }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_static_route/tests/netconf/basic.yaml b/test/integration/targets/junos_static_route/tests/netconf/basic.yaml
deleted file mode 100644
index 7033152ec0..0000000000
--- a/test/integration/targets/junos_static_route/tests/netconf/basic.yaml
+++ /dev/null
@@ -1,251 +0,0 @@
----
-- debug: msg="START junos_static_route netconf/basic.yaml on connection={{ ansible_connection }}"
-
-- name: setup - remove static route
- junos_static_route:
- address: 1.1.1.0/24
- state: absent
- provider: "{{ netconf }}"
-
-- name: Confgiure static route
- junos_static_route:
- address: 1.1.1.0/24
- next_hop: 3.3.3.3
- preference: 10
- qualified_next_hop: 5.5.5.5
- qualified_preference: 30
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>1.1.1.0/24</name>' in config.xml"
- - "'<next-hop>3.3.3.3</next-hop>' in config.xml"
- - "'<qualified-next-hop>' in config.xml"
- - "'<name>5.5.5.5</name>' in config.xml"
- - "'<preference>30</preference>' in config.xml"
- - "'<metric-value>10</metric-value>' in config.xml"
-
-- name: Confgiure static route (idempotent)
- junos_static_route:
- address: 1.1.1.0/24
- next_hop: 3.3.3.3
- preference: 10
- qualified_next_hop: 5.5.5.5
- qualified_preference: 30
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Deactivate static route
- junos_static_route:
- address: 1.1.1.0/24
- next_hop: 3.3.3.3
- preference: 10
- qualified_next_hop: 5.5.5.5
- qualified_preference: 30
- state: present
- active: False
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<route inactive=\"inactive\">' in config.xml"
- - "'inactive: route 1.1.1.0/24' in result.diff.prepared"
-
-- name: Activate static route
- junos_static_route:
- address: 1.1.1.0/24
- next_hop: 3.3.3.3
- preference: 10
- qualified_next_hop: 5.5.5.5
- qualified_preference: 30
- state: present
- active: True
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>1.1.1.0/24</name>' in config.xml"
- - "'<next-hop>3.3.3.3</next-hop>' in config.xml"
- - "'<qualified-next-hop>' in config.xml"
- - "'<name>5.5.5.5</name>' in config.xml"
- - "'<preference>30</preference>' in config.xml"
- - "'<metric-value>10</metric-value>' in config.xml"
- - "'inactive: route 1.1.1.0/24' not in result.diff"
-
-- name: Delete static route
- junos_static_route:
- address: 1.1.1.0/24
- next_hop: 3.3.3.3
- preference: 10
- qualified_next_hop: 5.5.5.5
- qualified_preference: 30
- state: absent
- active: True
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>1.1.1.0/24</name>' not in config.xml"
-
-- name: Delete static route (idempotent)
- junos_static_route:
- address: 1.1.1.0/24
- next_hop: 3.3.3.3
- preference: 10
- qualified_next_hop: 5.5.5.5
- qualified_preference: 30
- state: absent
- active: True
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Setup static route for aggegrate
- junos_static_route:
- aggregate:
- - address: 4.4.4.0/24
- - address: 5.5.5.0/24
- state: absent
- provider: "{{ netconf }}"
-
-- name: Confgiure static route using aggegrate
- junos_static_route:
- aggregate:
- - {address: 4.4.4.0/24, next_hop: 3.3.3.3, preference: 10, qualified_next_hop: 5.5.5.5}
- - {address: 5.5.5.0/24, next_hop: 6.6.6.6, preference: 11, qualified_next_hop: 7.7.7.7}
- qualified_preference: 30
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - result.diff.prepared is search("\+ *route 4.4.4.0/24")
- - result.diff.prepared is search("\+ *next-hop 3.3.3.3")
- - result.diff.prepared is search("\+ *qualified-next-hop 5.5.5.5")
- - result.diff.prepared is search("\+ *preference 30")
- - result.diff.prepared is search("\+ *preference 10")
- - result.diff.prepared is search("\+ *route 5.5.5.0/24")
- - result.diff.prepared is search("\+ *next-hop 6.6.6.6")
- - result.diff.prepared is search("\+ *qualified-next-hop 7.7.7.7")
- - result.diff.prepared is search("\+ *preference 30")
- - result.diff.prepared is search("\+ *preference 11")
-
-- name: Deactivate static route configuration using aggegrate
- junos_static_route:
- aggregate:
- - {address: 4.4.4.0/24, next_hop: 3.3.3.3, preference: 10, qualified_next_hop: 5.5.5.5}
- - {address: 5.5.5.0/24, next_hop: 6.6.6.6, preference: 11, qualified_next_hop: 7.7.7.7}
- qualified_preference: 30
- active: False
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - result.diff.prepared is search("! *inactive[:] route 4.4.4.0/24")
- - result.diff.prepared is search("! *inactive[:] qualified-next-hop 5.5.5.5")
- - result.diff.prepared is search("! *inactive[:] preference")
- - result.diff.prepared is search("! *inactive[:] route 5.5.5.0/24")
- - result.diff.prepared is search("! *inactive[:] qualified-next-hop 7.7.7.7")
- - result.diff.prepared is search("! *inactive[:] preference")
-
-- name: Activate static route configuration using aggegrate
- junos_static_route:
- aggregate:
- - {address: 4.4.4.0/24, next_hop: 3.3.3.3, preference: 10, qualified_next_hop: 5.5.5.5}
- - {address: 5.5.5.0/24, next_hop: 6.6.6.6, preference: 11, qualified_next_hop: 7.7.7.7}
- qualified_preference: 30
- active: True
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - result.diff.prepared is search("! *active[:] route 4.4.4.0/24")
- - result.diff.prepared is search("! *active[:] qualified-next-hop 5.5.5.5")
- - result.diff.prepared is search("! *active[:] preference")
- - result.diff.prepared is search("! *active[:] route 5.5.5.0/24")
- - result.diff.prepared is search("! *active[:] qualified-next-hop 7.7.7.7")
- - result.diff.prepared is search("! *active[:] preference")
-
-- name: Delete static route configuration using aggegrate
- junos_static_route:
- aggregate:
- - address: 4.4.4.0/24
- - address: 5.5.5.0/24
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - result.diff.prepared is search("\- *route 4.4.4.0/24")
- - result.diff.prepared is search("\- *next-hop 3.3.3.3")
- - result.diff.prepared is search("\- *qualified-next-hop 5.5.5.5")
- - result.diff.prepared is search("\- *preference 30")
- - result.diff.prepared is search("\- *preference 10")
- - result.diff.prepared is search("\- *route 5.5.5.0/24")
- - result.diff.prepared is search("\- *next-hop 6.6.6.6")
- - result.diff.prepared is search("\- *qualified-next-hop 7.7.7.7")
- - result.diff.prepared is search("\- *preference 30")
- - result.diff.prepared is search("\- *preference 11")
-
-- name: Delete static route configuration using aggegrate (idempotent)
- junos_static_route:
- aggregate:
- - address: 4.4.4.0/24
- - address: 5.5.5.0/24
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- debug: msg="END junos_static_route netconf/basic.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_static_route/tests/netconf/net_static_route.yaml b/test/integration/targets/junos_static_route/tests/netconf/net_static_route.yaml
deleted file mode 100644
index abebe625dc..0000000000
--- a/test/integration/targets/junos_static_route/tests/netconf/net_static_route.yaml
+++ /dev/null
@@ -1,46 +0,0 @@
----
-- debug: msg="START junos netconf/net_static_route.yaml on connection={{ ansible_connection }}"
-
-# Add minimal testcase to check args are passed correctly to
-# implementation module and module run is successful.
-
-- name: setup - remove static route
- net_static_route:
- address: 1.1.1.0/24
- state: absent
- provider: "{{ netconf }}"
-
-- name: Confgiure static route using platform agnostic module
- net_static_route:
- address: 1.1.1.0/24
- next_hop: 3.3.3.3
- preference: 10
- qualified_next_hop: 5.5.5.5
- qualified_preference: 30
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>1.1.1.0/24</name>' in config.xml"
- - "'<next-hop>3.3.3.3</next-hop>' in config.xml"
- - "'<qualified-next-hop>' in config.xml"
- - "'<name>5.5.5.5</name>' in config.xml"
- - "'<preference>30</preference>' in config.xml"
- - "'<metric-value>10</metric-value>' in config.xml"
-
-- name: setup - remove static route
- net_static_route:
- address: 1.1.1.0/24
- state: absent
- provider: "{{ netconf }}"
-
-- debug: msg="END junos netconf/net_static_route.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_static_routes/defaults/main.yaml b/test/integration/targets/junos_static_routes/defaults/main.yaml
deleted file mode 100644
index 164afead28..0000000000
--- a/test/integration/targets/junos_static_routes/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "[^_].*"
-test_items: []
diff --git a/test/integration/targets/junos_static_routes/meta/main.yaml b/test/integration/targets/junos_static_routes/meta/main.yaml
deleted file mode 100644
index 874017d64b..0000000000
--- a/test/integration/targets/junos_static_routes/meta/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
-# - prepare_junos_tests
diff --git a/test/integration/targets/junos_static_routes/tasks/main.yaml b/test/integration/targets/junos_static_routes/tasks/main.yaml
deleted file mode 100644
index cc27f174fd..0000000000
--- a/test/integration/targets/junos_static_routes/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: netconf.yaml, tags: ['netconf'] }
diff --git a/test/integration/targets/junos_static_routes/tasks/netconf.yaml b/test/integration/targets/junos_static_routes/tasks/netconf.yaml
deleted file mode 100644
index 73b91adfaa..0000000000
--- a/test/integration/targets/junos_static_routes/tasks/netconf.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-- name: collect all netconf test cases
- find:
- paths: "{{ role_path }}/tests/netconf"
- patterns: "{{ testcase }}.yaml"
- use_regex: true
- connection: local
- register: test_cases
-
-- 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 }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_static_routes/tests/netconf/_base_config.yaml b/test/integration/targets/junos_static_routes/tests/netconf/_base_config.yaml
deleted file mode 100644
index 83b7e3a753..0000000000
--- a/test/integration/targets/junos_static_routes/tests/netconf/_base_config.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
----
-- debug:
- msg: "Start junos_static_routes base config ansible_connection={{ ansible_connection }}"
-
-- name: Configure base static_routes
- junos_static_routes:
- config:
- - address_families:
- - afi: 'ipv4'
- routes:
- - dest: 192.168.0.0/24
- next_hop:
- - forward_router_address: 192.168.0.1
- - afi: 'ipv6'
- routes:
- - dest: 2001:db8::5/128
- next_hop:
- - forward_router_address: 2001:db8:0:1:2a0:a502:0:19da
-
-- debug:
- msg: "End junos_static_routes base config ansible_connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_static_routes/tests/netconf/_remove_config.yaml b/test/integration/targets/junos_static_routes/tests/netconf/_remove_config.yaml
deleted file mode 100644
index 20d76a9420..0000000000
--- a/test/integration/targets/junos_static_routes/tests/netconf/_remove_config.yaml
+++ /dev/null
@@ -1,14 +0,0 @@
----
-- debug:
- msg: "Start junos_static_routes teardown ansible_connection={{ ansible_connection }}"
-
-- name: Remove static route config
- junos_static_routes:
- config:
- - address_families:
- - afi: 'ipv4'
- - afi: 'ipv6'
- state: deleted
-
-- debug:
- msg: "End junos_static_routes teardown ansible_connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_static_routes/tests/netconf/deleted.yaml b/test/integration/targets/junos_static_routes/tests/netconf/deleted.yaml
deleted file mode 100644
index 78a9431b69..0000000000
--- a/test/integration/targets/junos_static_routes/tests/netconf/deleted.yaml
+++ /dev/null
@@ -1,37 +0,0 @@
----
-- debug:
- msg: "START junos_static_routes deleted integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-- include_tasks: _base_config.yaml
-
-- block:
- - name: Delete the provided configuration with the exisiting running configuration
- junos_static_routes: &deleted
- config:
- - address_families:
- - afi: 'ipv4'
- - afi: 'ipv6'
- state: deleted
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - not result.after
- debugger: on_failed
-
- - name: Delete the provided configuration with the existing running configuration (IDEMPOTENT)
- junos_static_routes: *deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_static_routes deleted integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_static_routes/tests/netconf/merged.yaml b/test/integration/targets/junos_static_routes/tests/netconf/merged.yaml
deleted file mode 100644
index 5630266b51..0000000000
--- a/test/integration/targets/junos_static_routes/tests/netconf/merged.yaml
+++ /dev/null
@@ -1,72 +0,0 @@
----
-- debug:
- msg: "START junos_static_routes merged integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- set_fact:
- expected_merged_output:
- - address_families:
- - afi: 'ipv6'
- routes:
- - dest: 2001:db8::5/128
- next_hop:
- - forward_router_address: 2001:db8:0:1:2a0:a502:0:19da
- - dest: ::/0
- next_hop:
- - forward_router_address: 2001:db8:0:1:2a0:a502:0:19da
- - afi: 'ipv4'
- routes:
- - dest: 192.168.0.0/24
- next_hop:
- - forward_router_address: 192.168.0.1
- - dest: 192.168.1.0/24
- metric: 2
- next_hop:
- - forward_router_address: 192.168.1.1
-
-- block:
- - name: Merge the provided configuration with the exisiting running configuration
- junos_static_routes: &merged
- config:
- - address_families:
- - afi: 'ipv4'
- routes:
- - dest: 192.168.0.0/24
- next_hop:
- - forward_router_address: 192.168.0.1
- - dest: 192.168.1.0/24
- next_hop:
- - forward_router_address: 192.168.1.1
- metric: 2
- - afi: 'ipv6'
- routes:
- - dest: 2001:db8::5/128
- next_hop:
- - forward_router_address: 2001:db8:0:1:2a0:a502:0:19da
- - dest: ::/0
- next_hop:
- - forward_router_address: 2001:db8:0:1:2a0:a502:0:19da
- state: merged
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_merged_output | symmetric_difference(result['after']) |length == 0 }}"
- debugger: on_failed
-
- - name: Merge the provided configuration with the existing running configuration (IDEMPOTENT)
- junos_static_routes: *merged
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_static_routes merged integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_static_routes/tests/netconf/overridden.yaml b/test/integration/targets/junos_static_routes/tests/netconf/overridden.yaml
deleted file mode 100644
index 6f5ea6b32d..0000000000
--- a/test/integration/targets/junos_static_routes/tests/netconf/overridden.yaml
+++ /dev/null
@@ -1,51 +0,0 @@
----
-- debug:
- msg: "START junos_static_routes overridden integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-- include_tasks: _base_config.yaml
-
-- set_fact:
- expected_overridden_output:
- - address_families:
- - afi: 'ipv4'
- routes:
- - dest: 192.168.20.0/24
- next_hop:
- - forward_router_address: 192.168.20.1
- metric: 10
-
-- block:
- - name: Override the provided configuration with the exisiting running configuration
- junos_static_routes: &overridden
- config:
- - address_families:
- - afi: 'ipv4'
- routes:
- - dest: 192.168.20.0/24
- next_hop:
- - forward_router_address: 192.168.20.1
- metric: 10
- state: overridden
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_overridden_output | symmetric_difference(result['after']) |length == 0 }}"
- debugger: on_failed
-
- - name: Override the provided configuration with the existing running configuration (IDEMPOTENT)
- junos_static_routes: *overridden
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_static_routes overridden integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_static_routes/tests/netconf/replaced.yaml b/test/integration/targets/junos_static_routes/tests/netconf/replaced.yaml
deleted file mode 100644
index e2715a413b..0000000000
--- a/test/integration/targets/junos_static_routes/tests/netconf/replaced.yaml
+++ /dev/null
@@ -1,54 +0,0 @@
----
-- debug:
- msg: "START junos_static_routes overridden integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-- include_tasks: _base_config.yaml
-
-- set_fact:
- expected_overridden_output:
- - address_families:
- - afi: 'ipv6'
- routes:
- - dest: 2001:db8::5/128
- next_hop:
- - forward_router_address: 2001:db8:0:1:2a0:a502:0:19da
- - afi: 'ipv4'
- routes:
- - dest: 192.168.0.0/24
- next_hop:
- - forward_router_address: 192.168.20.1
-
-- block:
- - name: Replace the provided configuration with the exisiting running configuration
- junos_static_routes: &overridden
- config:
- - address_families:
- - afi: 'ipv4'
- routes:
- - dest: 192.168.0.0/24
- next_hop:
- - forward_router_address: 192.168.20.1
- state: replaced
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_overridden_output | symmetric_difference(result['after']) |length == 0 }}"
- debugger: on_failed
-
- - name: Override the provided configuration with the existing running configuration (IDEMPOTENT)
- junos_static_routes: *overridden
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_static_routes overridden integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_system/aliases b/test/integration/targets/junos_system/aliases
deleted file mode 100644
index e69de29bb2..0000000000
--- a/test/integration/targets/junos_system/aliases
+++ /dev/null
diff --git a/test/integration/targets/junos_system/defaults/main.yaml b/test/integration/targets/junos_system/defaults/main.yaml
deleted file mode 100644
index 9ef5ba5165..0000000000
--- a/test/integration/targets/junos_system/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "*"
-test_items: []
diff --git a/test/integration/targets/junos_system/meta/main.yml b/test/integration/targets/junos_system/meta/main.yml
deleted file mode 100644
index 191a0f2ea1..0000000000
--- a/test/integration/targets/junos_system/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_junos_tests
diff --git a/test/integration/targets/junos_system/tasks/main.yaml b/test/integration/targets/junos_system/tasks/main.yaml
deleted file mode 100644
index cc27f174fd..0000000000
--- a/test/integration/targets/junos_system/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: netconf.yaml, tags: ['netconf'] }
diff --git a/test/integration/targets/junos_system/tasks/netconf.yaml b/test/integration/targets/junos_system/tasks/netconf.yaml
deleted file mode 100644
index c1985c530a..0000000000
--- a/test/integration/targets/junos_system/tasks/netconf.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-- name: collect all netconf test cases
- find:
- paths: "{{ role_path }}/tests/netconf"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- connection: local
-
-- 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 }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_system/tests/netconf/basic.yaml b/test/integration/targets/junos_system/tests/netconf/basic.yaml
deleted file mode 100644
index d1e6d2b155..0000000000
--- a/test/integration/targets/junos_system/tests/netconf/basic.yaml
+++ /dev/null
@@ -1,407 +0,0 @@
----
-- debug: msg="START junos_system netconf/basic.yaml on connection={{ ansible_connection }}"
-
-- name: setup - remove hostname
- junos_system:
- hostname: vsrx01
- state: absent
- provider: "{{ netconf }}"
-
-- name: Set hostname
- junos_system:
- hostname: vsrx01
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<host-name>vsrx01</host-name>' in config.xml"
-
-- name: Set hostname (idempotent)
- junos_system:
- hostname: vsrx01
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Deactivate hostname configuration
- junos_system:
- hostname: vsrx01
- state: present
- active: False
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<host-name inactive=\"inactive\">' in config.xml"
-
-- name: Activate hostname configuration
- junos_system:
- hostname: vsrx01
- state: present
- active: True
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<host-name>vsrx01</host-name>' in config.xml"
-
-- name: Delete hostname configuration
- junos_system:
- hostname: vsrx01
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'<host-name>vsrx01</host-name>' in config.xml"
-
-- name: Teardown - set hostname
- junos_system:
- hostname: vsrx01
- state: present
- provider: "{{ netconf }}"
-
-- name: setup - remove domain name
- junos_system:
- domain_name: ansible.com
- state: absent
- provider: "{{ netconf }}"
-
-- name: Set domain name
- junos_system:
- domain_name: ansible.com
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<domain-name>ansible.com</domain-name>' in config.xml"
-
-- name: Set domain name (idempotent)
- junos_system:
- domain_name: ansible.com
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Deactivate domain name
- junos_system:
- domain_name: ansible.com
- state: present
- active: False
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<domain-name inactive=\"inactive\">' in config.xml"
-
-- name: Activate domain name
- junos_system:
- domain_name: ansible.com
- state: present
- active: True
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<domain-name>ansible.com</domain-name>' in config.xml"
-
-- name: Delete domain name
- junos_system:
- domain_name: ansible.com
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<domain-name>ansible.com</domain-name>' not in config.xml"
-
-- name: Teardown - set domain name
- junos_system:
- domain_name: ansible.com
- state: present
- provider: "{{ netconf }}"
-
-- name: Setup - delete domain search
- junos_system:
- domain_search:
- - test.com
- - sample.com
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- name: Set domain search
- junos_system:
- domain_search:
- - test.com
- - sample.com
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<domain-search>test.com</domain-search>' in config.xml"
- - "'<domain-search>sample.com</domain-search>' in config.xml"
-
-- name: Set domain search (idempotency)
- junos_system:
- domain_search:
- - test.com
- - sample.com
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Deactivate domain search
- junos_system:
- domain_search:
- - test.com
- - sample.com
- state: present
- active: False
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<domain-search inactive=\"inactive\">test.com</domain-search>' in config.xml"
- - "'<domain-search inactive=\"inactive\">sample.com</domain-search>' in config.xml"
-
-- name: Activate domain search
- junos_system:
- domain_search:
- - test.com
- - sample.com
- state: present
- active: True
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<domain-search>test.com</domain-search>' in config.xml"
- - "'<domain-search>sample.com</domain-search>' in config.xml"
-
-- name: Delete domain search
- junos_system:
- domain_search:
- - test.com
- - sample.com
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<domain-search>test.com</domain-search>' not in config.xml"
- - "'<domain-search>sample.com</domain-search>' not in config.xml"
-
-- name: Setup - delete name servers
- junos_system:
- name_servers:
- - 8.8.8.8
- - 8.8.4.4
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- name: Set name servers
- junos_system:
- name_servers:
- - 8.8.8.8
- - 8.8.4.4
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>8.8.8.8</name>' in config.xml"
- - "'<name>8.8.4.4</name>' in config.xml"
-
-- name: Set name servers (idempotent)
- junos_system:
- name_servers:
- - 8.8.8.8
- - 8.8.4.4
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Deactivate name servers
- junos_system:
- name_servers:
- - 8.8.8.8
- - 8.8.4.4
- state: present
- active: False
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name-server inactive=\"inactive\">' in config.xml"
-
-- name: Activate name servers
- junos_system:
- name_servers:
- - 8.8.8.8
- - 8.8.4.4
- state: present
- active: True
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>8.8.8.8</name>' in config.xml"
- - "'<name>8.8.4.4</name>' in config.xml"
-
-- name: Delete name servers
- junos_system:
- name_servers:
- - 8.8.8.8
- - 8.8.4.4
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>8.8.8.8</name>' not in config.xml"
- - "'<name>8.8.4.4</name>' not in config.xml"
-
-- debug: msg="END junos_system netconf/basic.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_system/tests/netconf/net_system.yaml b/test/integration/targets/junos_system/tests/netconf/net_system.yaml
deleted file mode 100644
index 03c25d62eb..0000000000
--- a/test/integration/targets/junos_system/tests/netconf/net_system.yaml
+++ /dev/null
@@ -1,37 +0,0 @@
----
-- debug: msg="START junos netconf/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 - remove hostname
- net_system:
- hostname: vsrx01
- state: absent
- provider: "{{ netconf }}"
-
-- name: Set hostname using platform agnostic module
- net_system:
- hostname: vsrx01
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<host-name>vsrx01</host-name>' in config.xml"
-
-- name: teardown - remove hostname
- net_system:
- hostname: vsrx01
- state: absent
- provider: "{{ netconf }}"
-
-- debug: msg="END junos netconf/net_system.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_user/defaults/main.yaml b/test/integration/targets/junos_user/defaults/main.yaml
deleted file mode 100644
index 822f2213a4..0000000000
--- a/test/integration/targets/junos_user/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "*"
-test_cases: []
diff --git a/test/integration/targets/junos_user/meta/main.yml b/test/integration/targets/junos_user/meta/main.yml
deleted file mode 100644
index 191a0f2ea1..0000000000
--- a/test/integration/targets/junos_user/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_junos_tests
diff --git a/test/integration/targets/junos_user/tasks/main.yaml b/test/integration/targets/junos_user/tasks/main.yaml
deleted file mode 100644
index cc27f174fd..0000000000
--- a/test/integration/targets/junos_user/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: netconf.yaml, tags: ['netconf'] }
diff --git a/test/integration/targets/junos_user/tasks/netconf.yaml b/test/integration/targets/junos_user/tasks/netconf.yaml
deleted file mode 100644
index 2c76b54d9f..0000000000
--- a/test/integration/targets/junos_user/tasks/netconf.yaml
+++ /dev/null
@@ -1,22 +0,0 @@
----
-- name: collect netconf test cases
- find:
- paths: "{{ role_path }}/tests/netconf"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- connection: local
-
-- 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 }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_user/tests/netconf/basic.yaml b/test/integration/targets/junos_user/tests/netconf/basic.yaml
deleted file mode 100644
index ed80c8710b..0000000000
--- a/test/integration/targets/junos_user/tests/netconf/basic.yaml
+++ /dev/null
@@ -1,197 +0,0 @@
----
-- debug: msg="START junos_user netconf/basic.yaml on connection={{ ansible_connection }}"
-
-- name: setup - remove user
- junos_user:
- name: test_user
- state: absent
- provider: "{{ netconf }}"
-
-- name: Create user
- junos_user:
- name: test_user
- state: present
- full_name: test_user
- role: operator
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>test_user</name>' in config.xml"
- - "'<full-name>test_user</full-name>' in config.xml"
- - "'<class>operator</class>' in config.xml"
-
-- name: Create user again (idempotent)
- junos_user:
- name: test_user
- state: present
- full_name: test_user
- role: operator
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Deactivate user
- junos_user:
- name: test_user
- state: present
- full_name: test_user
- role: operator
- active: False
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<user inactive=\"inactive\">' in config.xml"
- - "'<name>test_user</name>' in config.xml"
-
-- name: Activate user
- junos_user:
- name: test_user
- state: present
- full_name: test_user
- role: operator
- active: True
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>test_user</name>' in config.xml"
- - "'<full-name>test_user</full-name>' in config.xml"
- - "'<class>operator</class>' in config.xml"
-
-- name: Delete user
- junos_user:
- name: test_user
- state: absent
- full_name: test_user
- role: operator
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>test_user</name>' not in config.xml"
- - "'<full-name>test_user</full-name>' not in config.xml"
-
-- name: Delete user again (idempotent check)
- junos_user:
- name: test_user
- state: absent
- full_name: test_user
- role: operator
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Teardown list of users
- junos_user:
- aggregate:
- - {name: test_user1, state: absent}
- - {name: test_user2, state: absent}
- provider: "{{ netconf }}"
- register: result
-
-- name: Create list of users
- junos_user:
- aggregate:
- - {name: test_user1, full_name: test_user2, role: operator, state: present}
- - {name: test_user2, full_name: test_user2, role: read-only, state: present}
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>test_user1</name>' in config.xml"
- - "'<name>test_user2</name>' in config.xml"
-
-- name: Delete list of users
- junos_user:
- aggregate:
- - {name: test_user1, full_name: test_user2, role: operator, state: absent}
- - {name: test_user2, full_name: test_user2, role: read-only, state: absent}
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>test_user1</name>' not in config.xml"
- - "'<name>test_user2</name>' not in config.xml"
-
-- name: Create list of users
- junos_user:
- aggregate:
- # NOTE(pabelanger): We noop our ansible-test user, as not to lose SSH access
- - name: "{{ ansible_user|default('ansible') }}"
- - {name: test_user1, full_name: test_user2, role: operator}
- - {name: test_user2, full_name: test_user2, role: read-only}
- provider: "{{ netconf }}"
- register: result
-
-- name: Purge users except the users in aggregate
- junos_user:
- aggregate:
- # NOTE(pabelanger): We noop our ansible-test user, as not to lose SSH access
- - name: "{{ ansible_user|default('ansible') }}"
- purge: True
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - result.diff.prepared is search("\- *user test_user1")
- - result.diff.prepared is search("\- *user test_user2")
-
-- debug: msg="END junos_user netconf/basic.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_user/tests/netconf/net_user.yaml b/test/integration/targets/junos_user/tests/netconf/net_user.yaml
deleted file mode 100644
index 3017d738aa..0000000000
--- a/test/integration/targets/junos_user/tests/netconf/net_user.yaml
+++ /dev/null
@@ -1,41 +0,0 @@
----
-- debug: msg="START junos netconf/net_user.yaml on connection={{ ansible_connection }}"
-
-# Add minimal testcase to check args are passed correctly to
-# implementation module and module run is successful.
-
-- name: setup - remove user
- net_user:
- name: test_user
- state: absent
- provider: "{{ netconf }}"
-
-- name: Create user with platform agnostic module
- net_user:
- name: test_user
- state: present
- full_name: test_user
- role: operator
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>test_user</name>' in config.xml"
- - "'<full-name>test_user</full-name>' in config.xml"
- - "'<class>operator</class>' in config.xml"
-
-- name: teardown - remove user
- net_user:
- name: test_user
- state: absent
- provider: "{{ netconf }}"
-
-- debug: msg="END junos netconf/net_user.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_vlan/defaults/main.yaml b/test/integration/targets/junos_vlan/defaults/main.yaml
deleted file mode 100644
index 9ef5ba5165..0000000000
--- a/test/integration/targets/junos_vlan/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "*"
-test_items: []
diff --git a/test/integration/targets/junos_vlan/meta/main.yml b/test/integration/targets/junos_vlan/meta/main.yml
deleted file mode 100644
index 191a0f2ea1..0000000000
--- a/test/integration/targets/junos_vlan/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_junos_tests
diff --git a/test/integration/targets/junos_vlan/tasks/main.yaml b/test/integration/targets/junos_vlan/tasks/main.yaml
deleted file mode 100644
index cc27f174fd..0000000000
--- a/test/integration/targets/junos_vlan/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: netconf.yaml, tags: ['netconf'] }
diff --git a/test/integration/targets/junos_vlan/tasks/netconf.yaml b/test/integration/targets/junos_vlan/tasks/netconf.yaml
deleted file mode 100644
index 24181dcf38..0000000000
--- a/test/integration/targets/junos_vlan/tasks/netconf.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
-- name: collect netconf test cases
- find:
- paths: "{{ role_path }}/tests/netconf"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- connection: local
-
-- 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 }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_vlan/tests/netconf/basic.yaml b/test/integration/targets/junos_vlan/tests/netconf/basic.yaml
deleted file mode 100644
index f43ed05f75..0000000000
--- a/test/integration/targets/junos_vlan/tests/netconf/basic.yaml
+++ /dev/null
@@ -1,192 +0,0 @@
----
-- debug: msg="START junos_vlan netconf/basic.yaml on connection={{ ansible_connection }}"
-
-- name: setup - remove vlan
- junos_vlan:
- name: test-vlan
- description: test vlan
- state: absent
- provider: "{{ netconf }}"
-
-- name: Create vlan
- junos_vlan:
- vlan_id: 100
- name: test-vlan
- state: present
- description: test vlan
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>test-vlan</name>' in config.xml"
- - "'<vlan-id>100</vlan-id>' in config.xml"
-
-- name: Create vlan again (idempotent)
- junos_vlan:
- vlan_id: 100
- name: test-vlan
- state: present
- description: test vlan
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Deactivate vlan
- junos_vlan:
- vlan_id: 100
- name: test-vlan
- state: present
- active: False
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<vlan inactive=\"inactive\">' in config.xml"
- - "'<name>test-vlan</name>' in config.xml"
-
-- name: Activate vlan
- junos_vlan:
- vlan_id: 100
- name: test-vlan
- state: present
- active: True
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>test-vlan</name>' in config.xml"
-
-- name: Delete vlan
- junos_vlan:
- vlan_id: 100
- name: test-vlan
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- name: Get running configuration
- junos_rpc:
- rpc: get-configuration
- provider: "{{ netconf }}"
- register: config
-
-- assert:
- that:
- - "result.changed == true"
- - "'<name>test-vlan</name>' not in config.xml"
-
-- name: Setup vlan configuration for aggregate
- junos_vlan:
- aggregate:
- - vlan_id: 159
- name: test_vlan_1
- - vlan_id: 160
- name: test_vlan_2
- state: absent
- provider: "{{ netconf }}"
-
-- name: Create vlan configuration using aggregate
- junos_vlan:
- aggregate:
- - { vlan_id: 159, name: test_vlan_1 }
- - { vlan_id: 161, name: test_vlan_2 }
- description: test vlan
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - result.diff.prepared is search("\+ *test_vlan_1")
- - result.diff.prepared is search("\+ *vlan-id 159")
- - result.diff.prepared is search("\+ *vlan-id 161")
- - result.diff.prepared is search("\+ *description \"test vlan\"")
-
-- name: Deactivate vlan configuration using aggregate
- junos_vlan:
- aggregate:
- - { vlan_id: 159, name: test_vlan_1, description: test vlan-1 }
- - name: test_vlan_2
- active: False
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - result.diff.prepared is search("! *inactive[:] test_vlan_1")
- - result.diff.prepared is search("! *inactive[:] test_vlan_2")
-
-- name: activate vlan configuration using aggregate
- junos_vlan:
- aggregate:
- - { vlan_id: 159, name: test_vlan_1, description: test vlan-1 }
- - name: test_vlan_2
- active: True
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - result.diff.prepared is search("! *active[:] test_vlan_1")
- - result.diff.prepared is search("! *active[:] test_vlan_2")
-
-- name: Delete vlan configuration using aggregate
- junos_vlan:
- aggregate:
- - vlan_id: 159
- name: test_vlan_1
- - name: test_vlan_2
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == true'
- - result.diff.prepared is search("\- *test_vlan_1")
- - result.diff.prepared is search("\- *vlan-id 159")
- - result.diff.prepared is search("\- *test_vlan_2")
-
-- name: Delete vlan configuration using aggregate (idempotent)
- junos_vlan:
- aggregate:
- - { vlan_id: 159, name: test_vlan_1 }
- - name: test_vlan_2
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - 'result.changed == false'
-
-- debug: msg="END junos_vlan netconf/basic.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_vlan/tests/netconf/net_vlan.yaml b/test/integration/targets/junos_vlan/tests/netconf/net_vlan.yaml
deleted file mode 100644
index 07df93b56a..0000000000
--- a/test/integration/targets/junos_vlan/tests/netconf/net_vlan.yaml
+++ /dev/null
@@ -1,30 +0,0 @@
----
-- debug: msg="START junos netconf/net_vlan.yaml on connection={{ ansible_connection }}"
-
-# Add minimal testcase to check args are passed correctly to
-# implementation module and module run is successful.
-
-- name: setup - remove vlan
- net_vlan:
- name: test-vlan
- description: test vlan
- state: absent
- provider: "{{ netconf }}"
-
-- name: Create vlan using platform agnostic vlan module
- net_vlan:
- vlan_id: 100
- name: test-vlan
- state: present
- description: test vlan
- provider: "{{ netconf }}"
- register: result
-
-- name: teardown - remove vlan
- net_vlan:
- name: test-vlan
- description: test vlan
- state: absent
- provider: "{{ netconf }}"
-
-- debug: msg="END junos netconf/net_vlan.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_vlans/defaults/main.yaml b/test/integration/targets/junos_vlans/defaults/main.yaml
deleted file mode 100644
index 164afead28..0000000000
--- a/test/integration/targets/junos_vlans/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "[^_].*"
-test_items: []
diff --git a/test/integration/targets/junos_vlans/meta/main.yaml b/test/integration/targets/junos_vlans/meta/main.yaml
deleted file mode 100644
index 874017d64b..0000000000
--- a/test/integration/targets/junos_vlans/meta/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
-# - prepare_junos_tests
diff --git a/test/integration/targets/junos_vlans/tasks/main.yaml b/test/integration/targets/junos_vlans/tasks/main.yaml
deleted file mode 100644
index cc27f174fd..0000000000
--- a/test/integration/targets/junos_vlans/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: netconf.yaml, tags: ['netconf'] }
diff --git a/test/integration/targets/junos_vlans/tasks/netconf.yaml b/test/integration/targets/junos_vlans/tasks/netconf.yaml
deleted file mode 100644
index 73b91adfaa..0000000000
--- a/test/integration/targets/junos_vlans/tasks/netconf.yaml
+++ /dev/null
@@ -1,17 +0,0 @@
----
-- name: collect all netconf test cases
- find:
- paths: "{{ role_path }}/tests/netconf"
- patterns: "{{ testcase }}.yaml"
- use_regex: true
- connection: local
- register: test_cases
-
-- 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 }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_vlans/tests/netconf/_base_config.yaml b/test/integration/targets/junos_vlans/tests/netconf/_base_config.yaml
deleted file mode 100644
index 882a166af0..0000000000
--- a/test/integration/targets/junos_vlans/tests/netconf/_base_config.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-- debug:
- msg: "Start junos_vlans base config ansible_connection={{ ansible_connection }}"
-
-- name: Configure base vlans
- junos_config:
- lines:
- - set vlans vlan1 vlan-id 1
- - set vlans vlan2 vlan-id 2
-
-- debug:
- msg: "End junos_vlans base config ansible_connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_vlans/tests/netconf/_remove_config.yaml b/test/integration/targets/junos_vlans/tests/netconf/_remove_config.yaml
deleted file mode 100644
index 8471a711ff..0000000000
--- a/test/integration/targets/junos_vlans/tests/netconf/_remove_config.yaml
+++ /dev/null
@@ -1,12 +0,0 @@
----
-- debug:
- msg: "Start junos_vlans teardown ansible_connection={{ ansible_connection }}"
-
-- name: Remove interface config
- junos_config:
- lines:
- - delete vlan vlan1
- - delete vlan vlan2
-
-- debug:
- msg: "End junos_vlans teardown ansible_connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_vlans/tests/netconf/deleted.yaml b/test/integration/targets/junos_vlans/tests/netconf/deleted.yaml
deleted file mode 100644
index 203c9173c7..0000000000
--- a/test/integration/targets/junos_vlans/tests/netconf/deleted.yaml
+++ /dev/null
@@ -1,33 +0,0 @@
----
-- debug:
- msg: "START junos_vlans deleted integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-- include_tasks: _base_config.yaml
-
-- block:
- - name: Delete the provided configuration with the exisiting running configuration
- junos_vlans: &deleted
- config:
- state: deleted
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - not result.after
-
- - name: Delete the provided configuration with the existing running configuration (IDEMPOTENT)
- junos_vlans: *deleted
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_vlans deleted integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_vlans/tests/netconf/merged.yaml b/test/integration/targets/junos_vlans/tests/netconf/merged.yaml
deleted file mode 100644
index 4d5a41d6d3..0000000000
--- a/test/integration/targets/junos_vlans/tests/netconf/merged.yaml
+++ /dev/null
@@ -1,43 +0,0 @@
----
-- debug:
- msg: "START junos_vlans merged integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-
-- set_fact:
- expected_merged_output:
- - name: vlan1
- vlan_id: 1
- - name: vlan2
- vlan_id: 2
-
-- block:
- - name: Merge the provided configuration with the exisiting running configuration
- junos_vlans: &merged
- config:
- - name: vlan1
- vlan_id: 1
- - name: vlan2
- vlan_id: 2
- state: merged
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_merged_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Merge the provided configuration with the existing running configuration (IDEMPOTENT)
- junos_vlans: *merged
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_vlans merged integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_vlans/tests/netconf/overridden.yaml b/test/integration/targets/junos_vlans/tests/netconf/overridden.yaml
deleted file mode 100644
index 8355adf137..0000000000
--- a/test/integration/targets/junos_vlans/tests/netconf/overridden.yaml
+++ /dev/null
@@ -1,40 +0,0 @@
----
-- debug:
- msg: "START junos_vlans overridden integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-- include_tasks: _base_config.yaml
-
-- set_fact:
- expected_overridden_output:
- - name: vlan1
- vlan_id: 100
-
-- block:
- - name: Override the provided configuration with the exisiting running configuration
- junos_vlans: &overridden
- config:
- - name: vlan1
- vlan_id: 100
- state: overridden
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_overridden_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Override the provided configuration with the existing running configuration (IDEMPOTENT)
- junos_vlans: *overridden
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_vlans overridden integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_vlans/tests/netconf/replaced.yaml b/test/integration/targets/junos_vlans/tests/netconf/replaced.yaml
deleted file mode 100644
index 855ab71234..0000000000
--- a/test/integration/targets/junos_vlans/tests/netconf/replaced.yaml
+++ /dev/null
@@ -1,42 +0,0 @@
----
-- debug:
- msg: "START junos_vlans replaced integration tests on connection={{ ansible_connection }}"
-
-- include_tasks: _remove_config.yaml
-- include_tasks: _base_config.yaml
-
-- set_fact:
- expected_replaced_output:
- - name: vlan1
- vlan_id: 10
- - name: vlan2
- vlan_id: 2
-
-- block:
- - name: Replace the provided configuration with the exisiting running configuration
- junos_vlans: &replaced
- config:
- - name: vlan1
- vlan_id: 10
- state: replaced
- register: result
-
- - name: Assert the configuration is reflected on host
- assert:
- that:
- - "{{ expected_replaced_output | symmetric_difference(result['after']) |length == 0 }}"
-
- - name: Replace the provided configuration with the existing running configuration (IDEMPOTENT)
- junos_vlans: *replaced
- register: result
-
- - name: Assert that the previous task was idempotent
- assert:
- that:
- - "result['changed'] == false"
-
- always:
- - include_tasks: _remove_config.yaml
-
-- debug:
- msg: "END junos_vlans replaced integration tests on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_vrf/defaults/main.yaml b/test/integration/targets/junos_vrf/defaults/main.yaml
deleted file mode 100644
index 9ef5ba5165..0000000000
--- a/test/integration/targets/junos_vrf/defaults/main.yaml
+++ /dev/null
@@ -1,3 +0,0 @@
----
-testcase: "*"
-test_items: []
diff --git a/test/integration/targets/junos_vrf/meta/main.yml b/test/integration/targets/junos_vrf/meta/main.yml
deleted file mode 100644
index 191a0f2ea1..0000000000
--- a/test/integration/targets/junos_vrf/meta/main.yml
+++ /dev/null
@@ -1,2 +0,0 @@
-dependencies:
- - prepare_junos_tests
diff --git a/test/integration/targets/junos_vrf/tasks/main.yaml b/test/integration/targets/junos_vrf/tasks/main.yaml
deleted file mode 100644
index cc27f174fd..0000000000
--- a/test/integration/targets/junos_vrf/tasks/main.yaml
+++ /dev/null
@@ -1,2 +0,0 @@
----
-- { include: netconf.yaml, tags: ['netconf'] }
diff --git a/test/integration/targets/junos_vrf/tasks/netconf.yaml b/test/integration/targets/junos_vrf/tasks/netconf.yaml
deleted file mode 100644
index 24181dcf38..0000000000
--- a/test/integration/targets/junos_vrf/tasks/netconf.yaml
+++ /dev/null
@@ -1,21 +0,0 @@
-- name: collect netconf test cases
- find:
- paths: "{{ role_path }}/tests/netconf"
- patterns: "{{ testcase }}.yaml"
- register: test_cases
- connection: local
-
-- 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 }} ansible_connection=netconf"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
-
-- name: run test case (connection=local)
- include: "{{ test_case_to_run }} ansible_connection=local"
- with_items: "{{ test_items }}"
- loop_control:
- loop_var: test_case_to_run
diff --git a/test/integration/targets/junos_vrf/tests/netconf/basic.yaml b/test/integration/targets/junos_vrf/tests/netconf/basic.yaml
deleted file mode 100644
index 3d7fccecf7..0000000000
--- a/test/integration/targets/junos_vrf/tests/netconf/basic.yaml
+++ /dev/null
@@ -1,324 +0,0 @@
----
-- debug: msg="START junos_vrf netconf/basic.yaml on connection={{ ansible_connection }}"
-
-- name: setup - remove vrf
- junos_vrf:
- name: test-1
- state: absent
- provider: "{{ netconf }}"
-
-- name: Configure vrf and its parameter
- junos_vrf:
- name: test-1
- description: test-vrf-1
- interfaces:
- - ge-0/0/6
- - ge-0/0/5
- rd: 192.0.2.3:10
- target: target:65513:111
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - result.diff.prepared is search("\+ *test-1")
- - result.diff.prepared is search("\+ *description test-vrf-1")
- - result.diff.prepared is search("\+ *instance-type vrf")
- - result.diff.prepared is search("\+ *interface ge-0/0/5.0")
- - result.diff.prepared is search("\+ *interface ge-0/0/6.0")
- - result.diff.prepared is search("\+ *route-distinguisher 192.0.2.3:10")
- - result.diff.prepared is search("\+ *vrf-target target:65513:111")
-
-- name: Configure vrf and its parameter (idempotent)
- junos_vrf:
- name: test-1
- description: test-vrf-1
- interfaces:
- - ge-0/0/6
- - ge-0/0/5
- rd: 192.0.2.3:10
- target: target:65513:111
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Change vrf parameter
- junos_vrf:
- name: test-1
- description: test-vrf-1
- interfaces:
- - ge-0/0/3
- - ge-0/0/2
- rd: 192.0.2.1:10
- target: target:65514:113
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'[edit routing-instances test-1]' in result.diff.prepared"
- - result.diff.prepared is search("\+ *interface ge-0/0/2.0")
- - result.diff.prepared is search("\+ *interface ge-0/0/3.0")
- - "'[edit routing-instances test-1]' in result.diff.prepared"
- - result.diff.prepared is search("\+ *route-distinguisher 192.0.2.1:10")
- - result.diff.prepared is search("\+ *vrf-target target:65514:113")
-
-- name: Deactivate vrf
- junos_vrf:
- name: test-1
- description: test-vrf-1
- interfaces:
- - ge-0/0/3
- - ge-0/0/2
- rd: 192.0.2.1:10
- target: target:65514:113
- state: present
- active: False
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'[edit routing-instances]' in result.diff.prepared"
- - result.diff.prepared is search("! *inactive[:] test-1")
- - "'[edit routing-instances test-1]' in result.diff.prepared"
- - result.diff.prepared is search("! *inactive[:] interface ge-0/0/2.0")
- - result.diff.prepared is search("! *inactive[:] interface ge-0/0/3.0")
- - "'[edit routing-instances test-1]' in result.diff.prepared"
- - result.diff.prepared is search("! *inactive[:] route-distinguisher")
- - result.diff.prepared is search("! *inactive[:] vrf-target")
-
-- name: Activate vrf
- junos_vrf:
- name: test-1
- description: test-vrf-1
- interfaces:
- - ge-0/0/3
- - ge-0/0/2
- rd: 192.0.2.1:10
- target: target:65514:113
- state: present
- active: True
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'[edit routing-instances]' in result.diff.prepared"
- - result.diff.prepared is search("! *active[:] test-1")
- - "'[edit routing-instances test-1]' in result.diff.prepared"
- - result.diff.prepared is search("! *active[:] interface ge-0/0/2.0")
- - result.diff.prepared is search("! *active[:] interface ge-0/0/3.0")
- - "'[edit routing-instances test-1]' in result.diff.prepared"
- - result.diff.prepared is search("! *active[:] route-distinguisher")
- - result.diff.prepared is search("! *active[:] vrf-target")
-
-- name: Delete vrf
- junos_vrf:
- name: test-1
- description: test-vrf-1
- interfaces:
- - ge-0/0/3
- - ge-0/0/2
- rd: 192.0.2.1:10
- target: target:65514:113
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - result.diff.prepared is search("\- *test-1")
- - result.diff.prepared is search("\- *description test-vrf-1")
- - result.diff.prepared is search("\- *instance-type vrf")
- - result.diff.prepared is search("\- *interface ge-0/0/2.0")
- - result.diff.prepared is search("\- *interface ge-0/0/3.0")
- - result.diff.prepared is search("\- *route-distinguisher 192.0.2.1:10")
- - result.diff.prepared is search("\- *vrf-target target:65514:113")
-
-- name: Delete vrf (idempotent)
- junos_vrf:
- name: test-1
- description: test-vrf-1
- interfaces:
- - ge-0/0/3
- - ge-0/0/2
- rd: 192.0.2.1:10
- target: target:65514:113
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- name: Setup vrf using aggregate
- junos_vrf:
- aggregate:
- - name: test-1
- - name: test-2
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- name: Create vrf using aggregate
- junos_vrf:
- aggregate:
- - name: test-1
- description: test-vrf-1
- interfaces:
- - ge-0/0/3
- - ge-0/0/2
- rd: 192.0.2.1:10
- target: target:65514:113
- - name: test-2
- description: test-vrf-2
- interfaces:
- - ge-0/0/4
- - ge-0/0/5
- rd: 192.0.2.2:10
- target: target:65515:114
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - result.diff.prepared is search("\+ *test-1")
- - result.diff.prepared is search("\+ *description test-vrf-1")
- - result.diff.prepared is search("\+ *instance-type vrf")
- - result.diff.prepared is search("\+ *interface ge-0/0/2.0")
- - result.diff.prepared is search("\+ *interface ge-0/0/3.0")
- - result.diff.prepared is search("\+ *route-distinguisher 192.0.2.1:10")
- - result.diff.prepared is search("\+ *vrf-target target:65514:113")
- - result.diff.prepared is search("\+ *test-2")
- - result.diff.prepared is search("\+ *description test-vrf-2")
- - result.diff.prepared is search("\+ *instance-type vrf")
- - result.diff.prepared is search("\+ *interface ge-0/0/4.0")
- - result.diff.prepared is search("\+ *interface ge-0/0/5.0")
- - result.diff.prepared is search("\+ *route-distinguisher 192.0.2.2:10")
- - result.diff.prepared is search("\+ *vrf-target target:65515:114")
-
-- name: Deactivate vrf configuration using aggregate
- junos_vrf:
- aggregate:
- - name: test-1
- description: test-vrf-1
- interfaces:
- - ge-0/0/3
- - ge-0/0/2
- rd: 192.0.2.1:10
- target: target:65514:113
- - name: test-2
- description: test-vrf-2
- interfaces:
- - ge-0/0/4
- - ge-0/0/5
- rd: 192.0.2.2:10
- target: target:65515:114
- active: False
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'edit routing-instances test-1' in result.diff.prepared"
- - result.diff.prepared is search("! *inactive[:] interface ge-0/0/2.0")
- - result.diff.prepared is search("! *inactive[:] interface ge-0/0/3.0")
- - result.diff.prepared is search("! *inactive[:] route-distinguisher")
- - result.diff.prepared is search("! *inactive[:] vrf-target")
- - "'edit routing-instances test-2' in result.diff.prepared"
- - result.diff.prepared is search("! *inactive[:] interface ge-0/0/4.0")
- - result.diff.prepared is search("! *inactive[:] interface ge-0/0/5.0")
- - result.diff.prepared is search("! *inactive[:] route-distinguisher")
- - result.diff.prepared is search("! *inactive[:] vrf-target")
-
-- name: Deactivate vrf configuration using aggregate
- junos_vrf:
- aggregate:
- - name: test-1
- description: test-vrf-1
- interfaces:
- - ge-0/0/3
- - ge-0/0/2
- rd: 192.0.2.1:10
- target: target:65514:113
- - name: test-2
- description: test-vrf-2
- interfaces:
- - ge-0/0/4
- - ge-0/0/5
- rd: 192.0.2.2:10
- target: target:65515:114
- active: True
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - "'edit routing-instances test-1' in result.diff.prepared"
- - result.diff.prepared is search("! *active[:] interface ge-0/0/2.0")
- - result.diff.prepared is search("! *active[:] interface ge-0/0/3.0")
- - result.diff.prepared is search("! *active[:] route-distinguisher")
- - result.diff.prepared is search("! *active[:] vrf-target")
- - "'edit routing-instances test-2' in result.diff.prepared"
- - result.diff.prepared is search("! *active[:] interface ge-0/0/4.0")
- - result.diff.prepared is search("! *active[:] interface ge-0/0/5.0")
- - result.diff.prepared is search("! *active[:] route-distinguisher")
- - result.diff.prepared is search("! *active[:] vrf-target")
-
-- name: Delete vrf configuration using aggregate
- junos_vrf:
- aggregate:
- - name: test-1
- - name: test-2
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - result.diff.prepared is search("\- *test-1")
- - result.diff.prepared is search("\- *description test-vrf-1")
- - result.diff.prepared is search("\- *instance-type vrf")
- - result.diff.prepared is search("\- *interface ge-0/0/2.0")
- - result.diff.prepared is search("\- *interface ge-0/0/3.0")
- - result.diff.prepared is search("\- *route-distinguisher 192.0.2.1:10")
- - result.diff.prepared is search("\- *vrf-target target:65514:113")
- - result.diff.prepared is search("\- *test-2")
- - result.diff.prepared is search("\- *description test-vrf-2")
- - result.diff.prepared is search("\- *instance-type vrf")
- - result.diff.prepared is search("\- *interface ge-0/0/4.0")
- - result.diff.prepared is search("\- *interface ge-0/0/5.0")
- - result.diff.prepared is search("\- *route-distinguisher 192.0.2.2:10")
- - result.diff.prepared is search("\- *vrf-target target:65515:114")
-
-- name: Delete vrf configuration using aggregate (idempotent)
- junos_vrf:
- aggregate:
- - name: test-1
- - name: test-2
- state: absent
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == false"
-
-- debug: msg="END junos_vrf netconf/basic.yaml on connection={{ ansible_connection }}"
diff --git a/test/integration/targets/junos_vrf/tests/netconf/net_vrf.yaml b/test/integration/targets/junos_vrf/tests/netconf/net_vrf.yaml
deleted file mode 100644
index c8a6897f03..0000000000
--- a/test/integration/targets/junos_vrf/tests/netconf/net_vrf.yaml
+++ /dev/null
@@ -1,43 +0,0 @@
----
-- debug: msg="START junos netconf/net_vrf.yaml on connection={{ ansible_connection }}"
-
-# Add minimal testcase to check args are passed correctly to
-# implementation module and module run is successful.
-
-- name: setup - remove vrf
- net_vrf:
- name: test-1
- state: absent
- provider: "{{ netconf }}"
-
-- name: Configure vrf and its parameter using platform agnostic vrf module
- net_vrf:
- name: test-1
- description: test-vrf-1
- interfaces:
- - ge-0/0/6
- - ge-0/0/5
- rd: 192.0.2.3:10
- target: target:65513:111
- state: present
- provider: "{{ netconf }}"
- register: result
-
-- assert:
- that:
- - "result.changed == true"
- - result.diff.prepared is search("\+ *test-1")
- - result.diff.prepared is search("\+ *description test-vrf-1")
- - result.diff.prepared is search("\+ *instance-type vrf")
- - result.diff.prepared is search("\+ *interface ge-0/0/5.0")
- - result.diff.prepared is search("\+ *interface ge-0/0/6.0")
- - result.diff.prepared is search("\+ *route-distinguisher 192.0.2.3:10")
- - result.diff.prepared is search("\+ *vrf-target target:65513:111")
-
-- name: teardown - remove vrf
- net_vrf:
- name: test-1
- state: absent
- provider: "{{ netconf }}"
-
-- debug: msg="START junos netconf/net_vrf.yaml on connection={{ ansible_connection }}"