From f4fff0b4a4ecd2e634f4dcb515bf92c20d3771ba Mon Sep 17 00:00:00 2001 From: CaptTrews Date: Wed, 4 Dec 2019 00:26:13 +0000 Subject: Updated from network content collector Signed-off-by: CaptTrews --- .../targets/prepare_vyos_tests/tasks/main.yaml | 2 +- .../targets/vyos_banner/tasks/main.yaml | 2 +- .../targets/vyos_command/tasks/main.yaml | 2 +- .../vyos_command/tests/cli/bad_operator.yaml | 2 +- .../vyos_command/tests/cli/cli_command.yaml | 52 +++++------ .../targets/vyos_command/tests/cli/invalid.yaml | 8 +- .../targets/vyos_command/tests/cli/output.yaml | 4 +- .../targets/vyos_command/tests/cli/timeout.yaml | 2 +- .../targets/vyos_config/tasks/main.yaml | 4 +- .../targets/vyos_config/tests/cli/backup.yaml | 14 +-- .../vyos_config/tests/cli/check_config.yaml | 10 +-- .../vyos_config/tests/cli_config/cli_backup.yaml | 17 ++-- .../integration/targets/vyos_facts/tasks/main.yaml | 2 +- .../targets/vyos_facts/tests/cli/basic_facts.yaml | 1 + .../targets/vyos_interface/tasks/main.yaml | 2 +- .../targets/vyos_interface/tests/cli/basic.yaml | 16 ++-- .../targets/vyos_interface/tests/cli/intent.yaml | 46 +++++----- .../targets/vyos_interfaces/meta/main.yaml | 3 +- .../targets/vyos_interfaces/tasks/main.yaml | 2 +- .../vyos_interfaces/tests/cli/_populate.yaml | 2 +- .../vyos_interfaces/tests/cli/_remove_config.yaml | 2 +- .../targets/vyos_interfaces/tests/cli/deleted.yaml | 2 +- .../vyos_interfaces/tests/cli/empty_config.yaml | 8 +- .../targets/vyos_interfaces/tests/cli/merged.yaml | 4 +- .../vyos_interfaces/tests/cli/overridden.yaml | 6 +- .../vyos_interfaces/tests/cli/replaced.yaml | 20 ++--- .../targets/vyos_interfaces/tests/cli/rtt.yaml | 2 +- .../targets/vyos_l3_interface/tasks/main.yaml | 2 +- .../targets/vyos_l3_interface/tests/cli/basic.yaml | 24 ++--- .../targets/vyos_l3_interfaces/meta/main.yml | 3 +- .../targets/vyos_l3_interfaces/tasks/main.yaml | 2 +- .../vyos_l3_interfaces/tests/cli/_populate.yaml | 2 +- .../vyos_l3_interfaces/tests/cli/deleted.yaml | 78 ++++++++-------- .../vyos_l3_interfaces/tests/cli/empty_config.yaml | 8 +- .../vyos_l3_interfaces/tests/cli/merged.yaml | 98 ++++++++++---------- .../vyos_l3_interfaces/tests/cli/overridden.yaml | 86 +++++++++--------- .../vyos_l3_interfaces/tests/cli/replaced.yaml | 86 +++++++++--------- .../targets/vyos_l3_interfaces/vars/main.yaml | 2 +- .../targets/vyos_lag_interfaces/meta/main.yaml | 1 + .../targets/vyos_lag_interfaces/tasks/main.yaml | 2 +- .../vyos_lag_interfaces/tests/cli/_add_bond.yaml | 4 +- .../tests/cli/_remove_bond.yaml | 4 +- .../vyos_lag_interfaces/tests/cli/deleted.yaml | 76 ++++++++-------- .../tests/cli/empty_config.yaml | 8 +- .../vyos_lag_interfaces/tests/cli/merged.yaml | 70 +++++++-------- .../vyos_lag_interfaces/tests/cli/overridden.yaml | 58 ++++++------ .../vyos_lag_interfaces/tests/cli/replaced.yaml | 56 ++++++------ .../targets/vyos_lag_interfaces/tests/cli/rtt.yaml | 100 ++++++++++----------- .../targets/vyos_linkagg/tasks/main.yaml | 2 +- .../targets/vyos_linkagg/tests/cli/basic.yaml | 8 +- .../integration/targets/vyos_lldp/tasks/main.yaml | 2 +- .../targets/vyos_lldp_global/tasks/main.yaml | 2 +- .../vyos_lldp_global/tests/cli/deleted.yaml | 70 +++++++-------- .../vyos_lldp_global/tests/cli/empty_config.yaml | 6 +- .../targets/vyos_lldp_global/tests/cli/merged.yaml | 52 +++++------ .../vyos_lldp_global/tests/cli/replaced.yaml | 56 ++++++------ .../targets/vyos_lldp_global/tests/cli/rtt.yaml | 84 ++++++++--------- .../targets/vyos_lldp_global/vars/main.yaml | 2 +- .../targets/vyos_lldp_interface/tasks/main.yaml | 2 +- .../vyos_lldp_interface/tests/cli/basic.yaml | 24 ++--- .../targets/vyos_lldp_interfaces/meta/main.yaml | 1 + .../targets/vyos_lldp_interfaces/tasks/main.yaml | 2 +- .../tests/cli/_remove_config.yaml | 2 +- .../vyos_lldp_interfaces/tests/cli/deleted.yaml | 76 ++++++++-------- .../tests/cli/empty_config.yaml | 8 +- .../vyos_lldp_interfaces/tests/cli/merged.yaml | 70 +++++++-------- .../vyos_lldp_interfaces/tests/cli/overridden.yaml | 58 ++++++------ .../vyos_lldp_interfaces/tests/cli/replaced.yaml | 74 +++++++-------- .../vyos_lldp_interfaces/tests/cli/rtt.yaml | 96 ++++++++++---------- .../targets/vyos_lldp_interfaces/vars/main.yaml | 82 ++++++++--------- .../targets/vyos_logging/tasks/main.yaml | 2 +- .../targets/vyos_logging/tests/cli/basic.yaml | 16 ++-- .../integration/targets/vyos_smoke/tasks/main.yaml | 2 +- .../vyos_smoke/tests/cli/common_config.yaml | 1 + .../targets/vyos_smoke/tests/cli/common_utils.yaml | 7 +- .../targets/vyos_smoke/tests/cli/misc_tests.yaml | 3 +- .../targets/vyos_static_route/tasks/main.yaml | 2 +- .../targets/vyos_static_route/tests/cli/basic.yaml | 14 +-- .../targets/vyos_system/tasks/main.yaml | 2 +- .../integration/targets/vyos_user/tasks/main.yaml | 2 +- .../targets/vyos_user/tests/cli/auth.yaml | 12 +-- .../integration/targets/vyos_vlan/tasks/main.yaml | 2 +- .../targets/vyos_vlan/tests/cli/basic.yaml | 4 +- .../targets/vyos_vlan/tests/cli/intent.yaml | 10 +-- 84 files changed, 937 insertions(+), 928 deletions(-) (limited to 'tests/integration') diff --git a/tests/integration/targets/prepare_vyos_tests/tasks/main.yaml b/tests/integration/targets/prepare_vyos_tests/tasks/main.yaml index 1a81fb1..5813284 100644 --- a/tests/integration/targets/prepare_vyos_tests/tasks/main.yaml +++ b/tests/integration/targets/prepare_vyos_tests/tasks/main.yaml @@ -10,4 +10,4 @@ set interfaces ethernet eth1 set interfaces ethernet eth2 delete interfaces loopback lo - ignore_errors: yes + ignore_errors: true diff --git a/tests/integration/targets/vyos_banner/tasks/main.yaml b/tests/integration/targets/vyos_banner/tasks/main.yaml index 415c99d..d4cf26f 100644 --- a/tests/integration/targets/vyos_banner/tasks/main.yaml +++ b/tests/integration/targets/vyos_banner/tasks/main.yaml @@ -1,2 +1,2 @@ --- -- { include: cli.yaml, tags: ['cli'] } +- {include: cli.yaml, tags: ['cli']} diff --git a/tests/integration/targets/vyos_command/tasks/main.yaml b/tests/integration/targets/vyos_command/tasks/main.yaml index 415c99d..d4cf26f 100644 --- a/tests/integration/targets/vyos_command/tasks/main.yaml +++ b/tests/integration/targets/vyos_command/tasks/main.yaml @@ -1,2 +1,2 @@ --- -- { include: cli.yaml, tags: ['cli'] } +- {include: cli.yaml, tags: ['cli']} diff --git a/tests/integration/targets/vyos_command/tests/cli/bad_operator.yaml b/tests/integration/targets/vyos_command/tests/cli/bad_operator.yaml index bf3334f..5ff72fa 100644 --- a/tests/integration/targets/vyos_command/tests/cli/bad_operator.yaml +++ b/tests/integration/targets/vyos_command/tests/cli/bad_operator.yaml @@ -9,7 +9,7 @@ wait_for: - result[0] is 'VyOS' register: result - ignore_errors: yes + ignore_errors: true - assert: that: diff --git a/tests/integration/targets/vyos_command/tests/cli/cli_command.yaml b/tests/integration/targets/vyos_command/tests/cli/cli_command.yaml index 08a7675..a10f2bc 100644 --- a/tests/integration/targets/vyos_command/tests/cli/cli_command.yaml +++ b/tests/integration/targets/vyos_command/tests/cli/cli_command.yaml @@ -3,39 +3,39 @@ msg: "START cli/cli_command.yaml on connection={{ ansible_connection }}" - block: - - name: get output for single command - network.cli.cli_command: - command: show version - register: result + - name: get output for single command + network.cli.cli_command: + command: show version + register: result - - assert: - that: - - "result.changed == false" - - "result.stdout is defined" + - assert: + that: + - "result.changed == false" + - "result.stdout is defined" - - name: send invalid command - network.cli.cli_command: - command: 'show foo' - register: result - ignore_errors: yes + - name: send invalid command + network.cli.cli_command: + command: 'show foo' + register: result + ignore_errors: true - - assert: - that: - - "result.failed == true" - - "result.msg is defined" + - assert: + that: + - "result.failed == true" + - "result.msg is defined" when: "ansible_connection == 'network_cli'" - block: - - name: test failure for local connection - network.cli.cli_command: - command: show version - register: result - ignore_errors: yes + - name: test failure for local connection + network.cli.cli_command: + command: show version + register: result + ignore_errors: true - - assert: - that: - - 'result.failed == true' - - "'Connection type local is not valid for this module' in result.msg" + - assert: + that: + - 'result.failed == true' + - "'Connection type local is not valid for this module' in result.msg" when: "ansible_connection == 'local'" - debug: msg="END cli/cli_command.yaml on connection={{ ansible_connection }}" diff --git a/tests/integration/targets/vyos_command/tests/cli/invalid.yaml b/tests/integration/targets/vyos_command/tests/cli/invalid.yaml index 672f6e8..04d203d 100644 --- a/tests/integration/targets/vyos_command/tests/cli/invalid.yaml +++ b/tests/integration/targets/vyos_command/tests/cli/invalid.yaml @@ -5,9 +5,9 @@ vyos.vyos.vyos_command: commands: show foo register: result - ignore_errors: yes + ignore_errors: true -- assert: { that: result.failed } +- assert: {that: result.failed} - name: run commands that include invalid command vyos.vyos.vyos_command: @@ -15,8 +15,8 @@ - show version - show foo register: result - ignore_errors: yes + ignore_errors: true -- assert: { that: result.failed } +- assert: {that: result.failed} - debug: msg="END cli/invalid.yaml on connection={{ ansible_connection }}" diff --git a/tests/integration/targets/vyos_command/tests/cli/output.yaml b/tests/integration/targets/vyos_command/tests/cli/output.yaml index bdc8b2a..1bc0dc6 100644 --- a/tests/integration/targets/vyos_command/tests/cli/output.yaml +++ b/tests/integration/targets/vyos_command/tests/cli/output.yaml @@ -28,8 +28,8 @@ - name: Get output for multiple commands that call less explicitly vyos.vyos.vyos_command: commands: - # NOTE: We only test show commands that will output load_config() - name: configure simple config command vyos.vyos.vyos_config: lines: set system host-name check-test - check_mode: yes + check_mode: true - name: get host name vyos.vyos.vyos_command: diff --git a/tests/integration/targets/vyos_static_route/tasks/main.yaml b/tests/integration/targets/vyos_static_route/tasks/main.yaml index 415c99d..d4cf26f 100644 --- a/tests/integration/targets/vyos_static_route/tasks/main.yaml +++ b/tests/integration/targets/vyos_static_route/tasks/main.yaml @@ -1,2 +1,2 @@ --- -- { include: cli.yaml, tags: ['cli'] } +- {include: cli.yaml, tags: ['cli']} diff --git a/tests/integration/targets/vyos_static_route/tests/cli/basic.yaml b/tests/integration/targets/vyos_static_route/tests/cli/basic.yaml index 122e49a..4b1ef1c 100644 --- a/tests/integration/targets/vyos_static_route/tests/cli/basic.yaml +++ b/tests/integration/targets/vyos_static_route/tests/cli/basic.yaml @@ -79,8 +79,8 @@ - name: Add static route collections vyos.vyos.vyos_static_route: aggregate: - - { prefix: 172.24.1.0/24, next_hop: 192.168.42.64 } - - { prefix: 172.24.2.0, mask: 24, next_hop: 192.168.42.64 } + - {prefix: 172.24.1.0/24, next_hop: 192.168.42.64} + - {prefix: 172.24.2.0, mask: 24, next_hop: 192.168.42.64} state: present register: result @@ -93,9 +93,9 @@ - name: Add and remove static route collections with overrides vyos.vyos.vyos_static_route: aggregate: - - { prefix: 172.24.1.0/24, next_hop: 192.168.42.64 } - - { prefix: 172.24.2.0/24, next_hop: 192.168.42.64, state: absent } - - { prefix: 172.24.3.0/24, next_hop: 192.168.42.64 } + - {prefix: 172.24.1.0/24, next_hop: 192.168.42.64} + - {prefix: 172.24.2.0/24, next_hop: 192.168.42.64, state: absent} + - {prefix: 172.24.3.0/24, next_hop: 192.168.42.64} state: present register: result @@ -108,8 +108,8 @@ - name: Remove static route collections vyos.vyos.vyos_static_route: aggregate: - - { prefix: 172.24.1.0/24, next_hop: 192.168.42.64 } - - { prefix: 172.24.3.0/24, next_hop: 192.168.42.64 } + - {prefix: 172.24.1.0/24, next_hop: 192.168.42.64} + - {prefix: 172.24.3.0/24, next_hop: 192.168.42.64} state: absent register: result diff --git a/tests/integration/targets/vyos_system/tasks/main.yaml b/tests/integration/targets/vyos_system/tasks/main.yaml index 415c99d..d4cf26f 100644 --- a/tests/integration/targets/vyos_system/tasks/main.yaml +++ b/tests/integration/targets/vyos_system/tasks/main.yaml @@ -1,2 +1,2 @@ --- -- { include: cli.yaml, tags: ['cli'] } +- {include: cli.yaml, tags: ['cli']} diff --git a/tests/integration/targets/vyos_user/tasks/main.yaml b/tests/integration/targets/vyos_user/tasks/main.yaml index 415c99d..d4cf26f 100644 --- a/tests/integration/targets/vyos_user/tasks/main.yaml +++ b/tests/integration/targets/vyos_user/tasks/main.yaml @@ -1,2 +1,2 @@ --- -- { include: cli.yaml, tags: ['cli'] } +- {include: cli.yaml, tags: ['cli']} diff --git a/tests/integration/targets/vyos_user/tests/cli/auth.yaml b/tests/integration/targets/vyos_user/tests/cli/auth.yaml index 566191e..bbd67bc 100644 --- a/tests/integration/targets/vyos_user/tests/cli/auth.yaml +++ b/tests/integration/targets/vyos_user/tests/cli/auth.yaml @@ -18,7 +18,7 @@ command: "ssh auth_user@{{ ansible_ssh_host }} -p {{ ansible_port | default(22) }} -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no '/opt/vyatta/sbin/vyatta-cfg-cmd-wrapper show version'" responses: (?i)password: "badpass" - ignore_errors: yes + ignore_errors: true register: results - name: check that attempt failed @@ -27,8 +27,8 @@ - results.failed always: - - name: delete user - vyos.vyos.vyos_user: - name: auth_user - state: absent - register: result + - name: delete user + vyos.vyos.vyos_user: + name: auth_user + state: absent + register: result diff --git a/tests/integration/targets/vyos_vlan/tasks/main.yaml b/tests/integration/targets/vyos_vlan/tasks/main.yaml index 415c99d..d4cf26f 100644 --- a/tests/integration/targets/vyos_vlan/tasks/main.yaml +++ b/tests/integration/targets/vyos_vlan/tasks/main.yaml @@ -1,2 +1,2 @@ --- -- { include: cli.yaml, tags: ['cli'] } +- {include: cli.yaml, tags: ['cli']} diff --git a/tests/integration/targets/vyos_vlan/tests/cli/basic.yaml b/tests/integration/targets/vyos_vlan/tests/cli/basic.yaml index 6e4417e..cb0f348 100644 --- a/tests/integration/targets/vyos_vlan/tests/cli/basic.yaml +++ b/tests/integration/targets/vyos_vlan/tests/cli/basic.yaml @@ -73,8 +73,8 @@ - name: Create VLANs using aggregate vyos.vyos.vyos_vlan: &agg_vlan aggregate: - - { vlan_id: 101, name: voice, interfaces: "eth0" } - - { vlan_id: 201, name: mgm, interfaces: "eth1" } + - {vlan_id: 101, name: voice, interfaces: "eth0"} + - {vlan_id: 201, name: mgm, interfaces: "eth1"} state: present register: result diff --git a/tests/integration/targets/vyos_vlan/tests/cli/intent.yaml b/tests/integration/targets/vyos_vlan/tests/cli/intent.yaml index 7c78937..4a12317 100644 --- a/tests/integration/targets/vyos_vlan/tests/cli/intent.yaml +++ b/tests/integration/targets/vyos_vlan/tests/cli/intent.yaml @@ -35,8 +35,8 @@ vlan_id: 100 interfaces: eth0 associated_interfaces: - - eth0 - - eth1 + - eth0 + - eth1 register: result - assert: @@ -47,10 +47,10 @@ vyos.vyos.vyos_vlan: vlan_id: 100 associated_interfaces: - - eth3 - - eth4 + - eth3 + - eth4 register: result - ignore_errors: yes + ignore_errors: true - assert: that: -- cgit v1.2.3