summaryrefslogtreecommitdiff
path: root/test/integration/targets/junos_static_route
diff options
context:
space:
mode:
Diffstat (limited to 'test/integration/targets/junos_static_route')
-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
6 files changed, 0 insertions, 325 deletions
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 }}"