vyos: Make vyos related yaml file passing yamllint (#65449)

pull/65467/head
Yanis Guenane 5 years ago committed by Paul Belanger
parent ae4363f6d1
commit c19949706f

@ -10,4 +10,4 @@
set interfaces ethernet eth1
set interfaces ethernet eth2
delete interfaces loopback lo
ignore_errors: yes
ignore_errors: true

@ -9,7 +9,7 @@
wait_for:
- result[0] is 'VyOS'
register: result
ignore_errors: yes
ignore_errors: true
- assert:
that:

@ -17,7 +17,7 @@
cli_command:
command: 'show foo'
register: result
ignore_errors: yes
ignore_errors: true
- assert:
that:
@ -30,7 +30,7 @@
cli_command:
command: show version
register: result
ignore_errors: yes
ignore_errors: true
- assert:
that:

@ -5,7 +5,7 @@
vyos_command:
commands: show foo
register: result
ignore_errors: yes
ignore_errors: true
- assert: {that: result.failed}
@ -15,7 +15,7 @@
- show version
- show foo
register: result
ignore_errors: yes
ignore_errors: true
- assert: {that: result.failed}

@ -8,7 +8,7 @@
wait_for:
- result[0] contains bad_value_string
register: result
ignore_errors: yes
ignore_errors: true
- assert:
that:

@ -16,7 +16,7 @@
- name: take configure backup
vyos_config:
backup: yes
backup: true
register: result
- assert:
@ -44,11 +44,11 @@
- name: take configuration backup in custom filename and directory path
vyos_config:
backup: yes
backup: true
backup_options:
filename: backup.cfg
dir_path: "{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}"
become: yes
become: true
register: result
- assert:
@ -67,10 +67,10 @@
- name: take configuration backup in custom filename
vyos_config:
backup: yes
backup: true
backup_options:
filename: backup.cfg
become: yes
become: true
register: result
- assert:
@ -89,10 +89,10 @@
- name: take configuration backup in custom path and default filename
vyos_config:
backup: yes
backup: true
backup_options:
dir_path: "{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}"
become: yes
become: true
register: result
- assert:

@ -1,3 +1,4 @@
---
- debug: msg="END cli_config/backup.yaml on connection={{ ansible_connection }}"
- name: delete configurable backup file path
@ -23,8 +24,8 @@
- name: take config backup
cli_config:
backup: yes
become: yes
backup: true
become: true
register: result
- assert:
@ -44,11 +45,11 @@
- name: take configuration backup in custom filename and directory path
cli_config:
backup: yes
backup: true
backup_options:
filename: backup.cfg
dir_path: "{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}"
become: yes
become: true
register: result
- assert:
@ -67,10 +68,10 @@
- name: take configuration backup in custom filename
cli_config:
backup: yes
backup: true
backup_options:
filename: backup.cfg
become: yes
become: true
register: result
- assert:
@ -89,10 +90,10 @@
- name: take configuration backup in custom path and default filename
cli_config:
backup: yes
backup: true
backup_options:
dir_path: "{{ role_path }}/backup_test_dir/{{ inventory_hostname_short }}"
become: yes
become: true
register: result
- assert:

@ -1,3 +1,4 @@
---
- name: get host name
vyos_command:
commands:

@ -84,7 +84,7 @@
- name: Disable interface
vyos_interface:
name: eth1
enabled: False
enabled: false
register: result
- assert:
@ -95,7 +95,7 @@
- name: Enable interface
vyos_interface:
name: eth1
enabled: True
enabled: true
register: result
- assert:
@ -170,7 +170,7 @@
- name: eth1
- name: eth2
description: test-interface
enabled: False
enabled: false
register: result
- assert:
@ -184,7 +184,7 @@
aggregate:
- name: eth1
- name: eth2
enabled: True
enabled: true
register: result
- assert:

@ -1,5 +1,5 @@
---
- debug: msg="START cli/intent.yaml on connection={{ ansible_connection }}" #"
- debug: msg="START cli/intent.yaml on connection={{ ansible_connection }}"
# To be able to run the lldp test we need to have a neighbor configured to talk to
# In DCI & Zuul we (currently) only spin up a single network VM, so we can't configure a neighbor
@ -30,7 +30,7 @@
- name: Setup (interface is up)
vyos_interface:
name: eth1
enabled: True
enabled: true
state: present
register: result
@ -61,7 +61,7 @@
vyos_interface:
name: eth1
state: down
ignore_errors: yes
ignore_errors: true
register: result
- assert:
@ -75,7 +75,7 @@
neighbors:
- port: dummy_port
host: dummy_host
ignore_errors: yes
ignore_errors: true
when: run_lldp_tests
register: result
@ -89,7 +89,7 @@
- name: Config + intent
vyos_interface:
name: eth1
enabled: False
enabled: false
state: down
register: result
@ -100,9 +100,9 @@
- name: Config + intent (fail)
vyos_interface:
name: eth1
enabled: False
enabled: false
state: up
ignore_errors: yes
ignore_errors: true
register: result
- assert:
@ -114,9 +114,9 @@
vyos_interface:
aggregate:
- name: eth1
enabled: True
enabled: true
state: up
ignore_errors: yes
ignore_errors: true
register: result
- assert:
@ -145,7 +145,7 @@
- port: eth0
- port: dummy_port
host: dummy_host
ignore_errors: yes
ignore_errors: true
when: run_lldp_tests
register: result

@ -1,2 +1,3 @@
---
dependencies:
- prepare_vyos_tests

@ -7,7 +7,7 @@
config:
state: merged
register: result
ignore_errors: True
ignore_errors: true
- assert:
that:
@ -18,7 +18,7 @@
config:
state: replaced
register: result
ignore_errors: True
ignore_errors: true
- assert:
that:
@ -29,7 +29,7 @@
config:
state: overridden
register: result
ignore_errors: True
ignore_errors: true
- assert:
that:

@ -1,2 +1,3 @@
---
dependencies:
- prepare_vyos_tests

@ -7,7 +7,7 @@
config:
state: merged
register: result
ignore_errors: True
ignore_errors: true
- assert:
that:
@ -18,7 +18,7 @@
config:
state: replaced
register: result
ignore_errors: True
ignore_errors: true
- assert:
that:
@ -29,7 +29,7 @@
config:
state: overridden
register: result
ignore_errors: True
ignore_errors: true
- assert:
that:

@ -1,2 +1,3 @@
---
dependencies:
- prepare_vyos_tests

@ -7,7 +7,7 @@
config:
state: merged
register: result
ignore_errors: True
ignore_errors: true
- assert:
that:
@ -18,7 +18,7 @@
config:
state: replaced
register: result
ignore_errors: True
ignore_errors: true
- assert:
that:
@ -29,7 +29,7 @@
config:
state: overridden
register: result
ignore_errors: True
ignore_errors: true
- assert:
that:

@ -7,7 +7,7 @@
config:
state: merged
register: result
ignore_errors: True
ignore_errors: true
- assert:
that:
@ -18,7 +18,7 @@
config:
state: replaced
register: result
ignore_errors: True
ignore_errors: true
- assert:
that:

@ -1,2 +1,3 @@
---
dependencies:
- prepare_vyos_tests

@ -7,7 +7,7 @@
config:
state: merged
register: result
ignore_errors: True
ignore_errors: true
- assert:
that:
@ -18,7 +18,7 @@
config:
state: replaced
register: result
ignore_errors: True
ignore_errors: true
- assert:
that:
@ -29,7 +29,7 @@
config:
state: overridden
register: result
ignore_errors: True
ignore_errors: true
- assert:
that:

@ -1,3 +1,4 @@
---
# vyos.py in plugins and module_utils/network covered by these as well
# hit NetworkConfig
- name: configure simple config command

@ -1,3 +1,4 @@
---
# vyos.py in plugins and module_utils/network covered by these as well
# remove_default_spec() hit by multiple plays
@ -20,7 +21,7 @@
- name: enable eth1
vyos_interface:
name: eth1
enabled: True
enabled: true
state: present
register: result
@ -34,7 +35,7 @@
vyos_interface:
name: eth1
state: down
ignore_errors: yes
ignore_errors: true
register: result
- assert:
@ -45,5 +46,5 @@
- name: Config + intent
vyos_interface:
name: eth1
enabled: False
enabled: false
state: down

@ -1,8 +1,9 @@
---
# hit check conditional in module_utils.network.vyos -> load_config()
- name: configure simple config command
vyos_config:
lines: set system host-name check-test
check_mode: yes
check_mode: true
- name: get host name
vyos_command:

@ -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

@ -50,7 +50,7 @@
- eth3
- eth4
register: result
ignore_errors: yes
ignore_errors: true
- assert:
that:

Loading…
Cancel
Save