diff options
author | Bradley A. Thornton <bthornto@thethorntons.net> | 2019-08-08 12:29:41 -0700 |
---|---|---|
committer | Bradley A. Thornton <bthornto@thethorntons.net> | 2019-08-08 12:29:41 -0700 |
commit | a330106b2e2c811db49477d71b8a472c964d2aeb (patch) | |
tree | ae05d893d8bed2d04db942d4c103996b26b10be7 /test/integration/targets/vyos_vlan/tests/cli/intent.yaml | |
parent | 5472435af823398fc63e049d7efe0938b532f3c9 (diff) | |
download | vyos.vyos-a330106b2e2c811db49477d71b8a472c964d2aeb.tar.gz vyos.vyos-a330106b2e2c811db49477d71b8a472c964d2aeb.zip |
fixed
Diffstat (limited to 'test/integration/targets/vyos_vlan/tests/cli/intent.yaml')
-rw-r--r-- | test/integration/targets/vyos_vlan/tests/cli/intent.yaml | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/test/integration/targets/vyos_vlan/tests/cli/intent.yaml b/test/integration/targets/vyos_vlan/tests/cli/intent.yaml new file mode 100644 index 0000000..7c78937 --- /dev/null +++ b/test/integration/targets/vyos_vlan/tests/cli/intent.yaml @@ -0,0 +1,59 @@ +--- +- debug: msg="START cli/intent.yaml on connection={{ ansible_connection }}" + +- name: setup - remove vlan used in test + vyos.vyos.vyos_config: &delete + lines: + - delete interfaces ethernet eth1 vif 100 + - delete interfaces ethernet eth0 vif 100 + +- name: set vlan with name + vyos.vyos.vyos_vlan: + vlan_id: 100 + name: vlan-100 + interfaces: eth1 + register: result + +- assert: + that: + - "result.changed == true" + - "'set interfaces ethernet eth1 vif 100 description vlan-100' in result.commands" + +- name: check vlan interface intent + vyos.vyos.vyos_vlan: + vlan_id: 100 + name: vlan-100 + associated_interfaces: eth1 + register: result + +- assert: + that: + - "result.failed == false" + +- name: vlan interface config + intent + vyos.vyos.vyos_vlan: + vlan_id: 100 + interfaces: eth0 + associated_interfaces: + - eth0 + - eth1 + register: result + +- assert: + that: + - "result.failed == false" + +- name: vlan intent fail + vyos.vyos.vyos_vlan: + vlan_id: 100 + associated_interfaces: + - eth3 + - eth4 + register: result + ignore_errors: yes + +- assert: + that: + - "result.failed == True" + +- debug: msg="End cli/intent.yaml on connection={{ ansible_connection }}" |