|
|
@ -23,13 +23,13 @@
|
|
|
|
- assert:
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- "result.changed == true"
|
|
|
|
- "result.changed == true"
|
|
|
|
- "'+ test-1' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("\+ *test-1")
|
|
|
|
- "'+ description test-vrf-1;' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("\+ *description test-vrf-1")
|
|
|
|
- "'+ instance-type vrf;' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("\+ *instance-type vrf")
|
|
|
|
- "'+ interface ge-0/0/5.0;' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("\+ *interface ge-0/0/5.0")
|
|
|
|
- "'+ interface ge-0/0/6.0;' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("\+ *interface ge-0/0/6.0")
|
|
|
|
- "'+ route-distinguisher 3.3.3.3:10;' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("\+ *route-distinguisher 3.3.3.3:10")
|
|
|
|
- "'+ vrf-target target:65513:111;' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("\+ *vrf-target target:65513:111")
|
|
|
|
|
|
|
|
|
|
|
|
- name: Configure vrf and its parameter (idempotent)
|
|
|
|
- name: Configure vrf and its parameter (idempotent)
|
|
|
|
junos_vrf:
|
|
|
|
junos_vrf:
|
|
|
@ -65,16 +65,15 @@
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- "result.changed == true"
|
|
|
|
- "result.changed == true"
|
|
|
|
- "'[edit routing-instances test-1]' in result.diff.prepared"
|
|
|
|
- "'[edit routing-instances test-1]' in result.diff.prepared"
|
|
|
|
- "'+ interface ge-0/0/2.0;' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("\+ *interface ge-0/0/2.0")
|
|
|
|
- "'+ interface ge-0/0/3.0;' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("\+ *interface ge-0/0/3.0")
|
|
|
|
- "'- interface ge-0/0/5.0;' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("\- *interface ge-0/0/5.0")
|
|
|
|
- "'- interface ge-0/0/6.0;' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("\- *interface ge-0/0/6.0")
|
|
|
|
- "'[edit routing-instances test-1]' in result.diff.prepared"
|
|
|
|
- "'[edit routing-instances test-1]' in result.diff.prepared"
|
|
|
|
- "'- route-distinguisher 3.3.3.3:10;' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("\- *route-distinguisher 3.3.3.3:10")
|
|
|
|
- "'+ route-distinguisher 1.1.1.1:10;' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("\+ *route-distinguisher 1.1.1.1:10")
|
|
|
|
- "'- vrf-target target:65513:111;' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("\- *vrf-target target:65513:111")
|
|
|
|
- "'+ vrf-target target:65514:113;' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("\+ *vrf-target target:65514:113")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Deactivate vrf
|
|
|
|
- name: Deactivate vrf
|
|
|
|
junos_vrf:
|
|
|
|
junos_vrf:
|
|
|
@ -94,13 +93,13 @@
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- "result.changed == true"
|
|
|
|
- "result.changed == true"
|
|
|
|
- "'[edit routing-instances]' in result.diff.prepared"
|
|
|
|
- "'[edit routing-instances]' in result.diff.prepared"
|
|
|
|
- "'! inactive: test-1' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("! *inactive[:] test-1")
|
|
|
|
- "'[edit routing-instances test-1]' in result.diff.prepared"
|
|
|
|
- "'[edit routing-instances test-1]' in result.diff.prepared"
|
|
|
|
- "'! inactive: interface ge-0/0/2.0' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("! *inactive[:] interface ge-0/0/2.0")
|
|
|
|
- "'! inactive: interface ge-0/0/3.0' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("! *inactive[:] interface ge-0/0/3.0")
|
|
|
|
- "'[edit routing-instances test-1]' in result.diff.prepared"
|
|
|
|
- "'[edit routing-instances test-1]' in result.diff.prepared"
|
|
|
|
- "'! inactive: route-distinguisher' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("! *inactive[:] route-distinguisher")
|
|
|
|
- "'! inactive: vrf-target' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("! *inactive[:] vrf-target")
|
|
|
|
|
|
|
|
|
|
|
|
- name: Activate vrf
|
|
|
|
- name: Activate vrf
|
|
|
|
junos_vrf:
|
|
|
|
junos_vrf:
|
|
|
@ -120,13 +119,13 @@
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- "result.changed == true"
|
|
|
|
- "result.changed == true"
|
|
|
|
- "'[edit routing-instances]' in result.diff.prepared"
|
|
|
|
- "'[edit routing-instances]' in result.diff.prepared"
|
|
|
|
- "'! active: test-1' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("! *active[:] test-1")
|
|
|
|
- "'[edit routing-instances test-1]' in result.diff.prepared"
|
|
|
|
- "'[edit routing-instances test-1]' in result.diff.prepared"
|
|
|
|
- "'! active: interface ge-0/0/2.0' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("! *active[:] interface ge-0/0/2.0")
|
|
|
|
- "'! active: interface ge-0/0/3.0' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("! *active[:] interface ge-0/0/3.0")
|
|
|
|
- "'[edit routing-instances test-1]' in result.diff.prepared"
|
|
|
|
- "'[edit routing-instances test-1]' in result.diff.prepared"
|
|
|
|
- "'! active: route-distinguisher' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("! *active[:] route-distinguisher")
|
|
|
|
- "'! active: vrf-target' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("! *active[:] vrf-target")
|
|
|
|
|
|
|
|
|
|
|
|
- name: Delete vrf
|
|
|
|
- name: Delete vrf
|
|
|
|
junos_vrf:
|
|
|
|
junos_vrf:
|
|
|
@ -144,14 +143,13 @@
|
|
|
|
- assert:
|
|
|
|
- assert:
|
|
|
|
that:
|
|
|
|
that:
|
|
|
|
- "result.changed == true"
|
|
|
|
- "result.changed == true"
|
|
|
|
- "'[edit routing-instances]' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("\- *test-1")
|
|
|
|
- "'- test-1' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("\- *description test-vrf-1")
|
|
|
|
- "'- description test-vrf-1;' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("\- *instance-type vrf")
|
|
|
|
- "'- instance-type vrf;' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("\- *interface ge-0/0/2.0")
|
|
|
|
- "'- interface ge-0/0/2.0;' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("\- *interface ge-0/0/3.0")
|
|
|
|
- "'- interface ge-0/0/3.0;' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("\- *route-distinguisher 1.1.1.1:10")
|
|
|
|
- "'- route-distinguisher 1.1.1.1:10;' in result.diff.prepared"
|
|
|
|
- result.diff.prepared | search("\- *vrf-target target:65514:113")
|
|
|
|
- "'- vrf-target target:65514:113;' in result.diff.prepared"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
- name: Delete vrf (idempotent)
|
|
|
|
- name: Delete vrf (idempotent)
|
|
|
|
junos_vrf:
|
|
|
|
junos_vrf:
|
|
|
|