diff options
| author | omnom62 <75066712+omnom62@users.noreply.github.com> | 2025-03-02 22:43:17 +1000 | 
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-03-02 07:43:17 -0500 | 
| commit | ad249c39c3259df8c2536dd80f62723eb9c364ef (patch) | |
| tree | 36d1a9ef0a9eb4d60dea2c970c1c0f077c604791 | |
| parent | cfc4c93253d57de953c4cae7acc5f2b2890614ac (diff) | |
| download | vyos.vyos-ad249c39c3259df8c2536dd80f62723eb9c364ef.tar.gz vyos.vyos-ad249c39c3259df8c2536dd80f62723eb9c364ef.zip | |
T7012 ospf_interfaces integration tests (#387)
* T7012 init strucuture for ospf_interfaces integration tests
* ospf_interfaces unit and integration tests fixes for 1.3-
* fixes to v1.4 ospf_interfaces parsers
* T7012 integration tests and 1.4+ support for ospf_interfaces
20 files changed, 202 insertions, 88 deletions
| diff --git a/changelogs/fragments/T7012_ospf-integration-tests.yaml b/changelogs/fragments/T7012_ospf-integration-tests.yaml new file mode 100644 index 00000000..b696b2aa --- /dev/null +++ b/changelogs/fragments/T7012_ospf-integration-tests.yaml @@ -0,0 +1,9 @@ +--- +minor_changes: +  - vyos_ospf_interfaces - add support for VyOS 1.4+, which moved interface configuration from the interfaces to ospf/ospfv3 interfaces configuration +bugfixes: +  - vyos_ospf_interfaces - fixed get_config to cater for unordered command lists in 1.4+ +trivial: +  - vyos_ospf_interfaces - re-worked intergration test suite structure to D.R.Y. +  - vyos_ospf_interfaces - added support for 1.4+ VyOS +  - vyos_ospf_interfaces - updated unit test suite to cater for 1.4+ bugfixes diff --git a/plugins/module_utils/network/vyos/facts/ospf_interfaces/ospf_interfaces.py b/plugins/module_utils/network/vyos/facts/ospf_interfaces/ospf_interfaces.py index c0e74895..852e1da7 100644 --- a/plugins/module_utils/network/vyos/facts/ospf_interfaces/ospf_interfaces.py +++ b/plugins/module_utils/network/vyos/facts/ospf_interfaces/ospf_interfaces.py @@ -50,21 +50,12 @@ class Ospf_interfacesFacts(object):      def get_config_set_1_4(self, data):          """To classify the configurations beased on interface""" -        interface_list = [] -        config_set = [] -        int_string = "" +        config_dict = {}          for config_line in data.splitlines(): -            ospf_int = re.search(r"set protocols (?:ospf|ospfv3) interface (\S+) .*", config_line) +            ospf_int = re.search(r"set protocols (?:ospf|ospfv3) interface (\S+).*", config_line)              if ospf_int: -                if ospf_int.group(1) not in interface_list: -                    if int_string: -                        config_set.append(int_string) -                    interface_list.append(ospf_int.group(1)) -                    int_string = "" -                int_string = int_string + config_line + "\n" -        if int_string: -            config_set.append(int_string) -        return config_set +                config_dict[ospf_int.group(1)] = config_dict.get(ospf_int.group(1), "") + config_line + "\n" +        return list(config_dict.values())      def get_config_set_1_2(self, data):          """To classify the configurations beased on interface""" diff --git a/plugins/module_utils/network/vyos/rm_templates/ospf_interfaces.py b/plugins/module_utils/network/vyos/rm_templates/ospf_interfaces.py index aaaf7ff2..0d7eaf84 100644 --- a/plugins/module_utils/network/vyos/rm_templates/ospf_interfaces.py +++ b/plugins/module_utils/network/vyos/rm_templates/ospf_interfaces.py @@ -509,7 +509,7 @@ class Ospf_interfacesTemplate(NetworkTemplate):                  \s+(?P<name>\S+)                  \s+(?P<afi>ip|ipv6)                  \s+(?P<proto>ospf|ospfv3) -                \s+(?P<mtu>\'mtu-ignore\') +                \s+(?P<mtu>mtu-ignore)                  *$""",                  re.VERBOSE,              ), @@ -697,7 +697,7 @@ class Ospf_interfacesTemplate(NetworkTemplate):                  \s+(?P<name>\S+)                  \s+(?P<afi>ip|ipv6)                  \s+(?P<proto>ospf|ospfv3) -                \s+(?P<pass>\'passive\') +                \s+(?P<pass>passive)                  *$""",                  re.VERBOSE,              ), diff --git a/plugins/module_utils/network/vyos/rm_templates/ospf_interfaces_14.py b/plugins/module_utils/network/vyos/rm_templates/ospf_interfaces_14.py index 7f49d47a..43fae1e9 100644 --- a/plugins/module_utils/network/vyos/rm_templates/ospf_interfaces_14.py +++ b/plugins/module_utils/network/vyos/rm_templates/ospf_interfaces_14.py @@ -432,7 +432,7 @@ class Ospf_interfacesTemplate14(NetworkTemplate):                  \s+(?P<proto>ospf|ospfv3)                  \s+interface                  \s+(?P<name>\S+) -                \s+(?P<mtu>\'mtu-ignore\') +                \s+(?P<mtu>mtu-ignore)                  *$""",                  re.VERBOSE,              ), @@ -613,7 +613,7 @@ class Ospf_interfacesTemplate14(NetworkTemplate):                  \s+(?P<proto>ospf|ospfv3)                  \s+interface                  \s+(?P<name>\S+) -                \s+(?P<pass>\'passive\') +                \s+(?P<pass>passive)                  *$""",                  re.VERBOSE,              ), diff --git a/tests/integration/targets/vyos_ospf_interfaces/tasks/main.yaml b/tests/integration/targets/vyos_ospf_interfaces/tasks/main.yaml index e6378581..4a9d2cd0 100644 --- a/tests/integration/targets/vyos_ospf_interfaces/tasks/main.yaml +++ b/tests/integration/targets/vyos_ospf_interfaces/tasks/main.yaml @@ -1,5 +1,13 @@  --- +- name: Run preflight setup +  ansible.builtin.import_tasks: pre_tasks.yml +  failed_when: false +  - name: Run CLI tests    ansible.builtin.include_tasks: cli.yaml    tags:      - network_cli + +- name: Run post-test cleanup tasks +  ansible.builtin.import_tasks: post_tasks.yml +  failed_when: false diff --git a/tests/integration/targets/vyos_ospf_interfaces/tasks/post_tasks.yml b/tests/integration/targets/vyos_ospf_interfaces/tasks/post_tasks.yml new file mode 100644 index 00000000..0883ef48 --- /dev/null +++ b/tests/integration/targets/vyos_ospf_interfaces/tasks/post_tasks.yml @@ -0,0 +1,7 @@ +--- +- name: Demolish environment +  vyos.vyos.vyos_config: +    lines: |- +      delete interfaces bonding bond2 +  vars: +    ansible_connection: ansible.netcommon.network_cli diff --git a/tests/integration/targets/vyos_ospf_interfaces/tasks/pre_tasks.yml b/tests/integration/targets/vyos_ospf_interfaces/tasks/pre_tasks.yml new file mode 100644 index 00000000..af74ff7a --- /dev/null +++ b/tests/integration/targets/vyos_ospf_interfaces/tasks/pre_tasks.yml @@ -0,0 +1,7 @@ +--- +- name: Setup environment +  vyos.vyos.vyos_config: +    lines: |- +      set interfaces bonding bond2 +  vars: +    ansible_connection: ansible.netcommon.network_cli diff --git a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_get_version.yaml b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_get_version.yaml new file mode 100644 index 00000000..a7691499 --- /dev/null +++ b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_get_version.yaml @@ -0,0 +1,31 @@ +- name: make sure to get facts +  vyos.vyos.vyos_facts: +  vars: +    ansible_connection: ansible.netcommon.network_cli +  register: vyos_facts +  when: vyos_version is not defined + +- name: debug vyos_facts +  debug: +    var: vyos_facts + +- name: pull version from facts +  set_fact: +    vyos_version: "{{ vyos_facts.ansible_facts.ansible_net_version.split('-')[0].split(' ')[-1] }}" +  when: vyos_version is not defined + +- name: fix '.0' versions +  set_fact: +    vyos_version: "{{ vyos_version }}.0" +  when: vyos_version.count('.') == 1 + +- name: include correct vars +  include_vars: pre-v1_4.yaml +  when: vyos_version is version('1.4.0', '<', version_type='semver') + +- name: include correct vars +  include_vars: v1_4.yaml +  when: vyos_version is version('1.4.0', '>=', version_type='semver') + +# - name: include common vars +#   include_vars: main.yaml diff --git a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_parsed_config.cfg b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_parsed_config.cfg deleted file mode 100644 index 48f286ee..00000000 --- a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_parsed_config.cfg +++ /dev/null @@ -1,9 +0,0 @@ -set interfaces ethernet eth1 firewall in name 'INBOUND' -set interfaces ethernet eth1 firewall out name 'OUTBOUND' -set interfaces ethernet eth1 firewall local name 'LOCAL' -set interfaces ethernet eth1 firewall local ipv6-name 'V6-LOCAL' -set interfaces ethernet eth2 firewall in name 'INBOUND' -set interfaces ethernet eth2 firewall out name 'OUTBOUND' -set interfaces ethernet eth2 firewall local name 'LOCAL' -set interfaces ethernet eth2 firewall local ipv6-name 'V6-LOCAL' -set interfaces ethernet eth0 diff --git a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_parsed.cfg b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_parsed_config_1_3.cfg index aa576770..b8112dd0 100644 --- a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_parsed.cfg +++ b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_parsed_config_1_3.cfg @@ -1,6 +1,6 @@  set interfaces ethernet eth0 ip ospf cost '50'  set interfaces ethernet eth0 ip ospf priority '26' -set interfaces ethernet eth0 ipv6 ospfv3 'mtu-ignore' +set interfaces ethernet eth0 ipv6 ospfv3 mtu-ignore  set interfaces ethernet eth0 ipv6 ospfv3 instance-id '33'  set interfaces bonding bond2 ip ospf transmit-delay '45' -set interfaces bonding bond2 ipv6 ospfv3 'passive' +set interfaces bonding bond2 ipv6 ospfv3 passive diff --git a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_parsed_config_1_4.cfg b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_parsed_config_1_4.cfg new file mode 100644 index 00000000..269a5aba --- /dev/null +++ b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_parsed_config_1_4.cfg @@ -0,0 +1,6 @@ +set protocols ospf interface eth0 cost '50' +set protocols ospf interface eth0 priority '26' +set protocols ospfv3 interface eth0 mtu-ignore +set protocols ospfv3 interface eth0 instance-id '33' +set protocols ospf interface bond2 transmit-delay '45' +set protocols ospfv3 interface bond2 passive diff --git a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_populate.yaml b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_populate.yaml index 4a24ff99..ccd0f679 100644 --- a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_populate.yaml +++ b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_populate.yaml @@ -1,14 +1,11 @@  ---  - ansible.builtin.include_tasks: _remove_config.yaml -- name: Setup +- name: ensure facts +  include_tasks: _get_version.yaml + +- name: Setup {{ vyos_version }}    vyos.vyos.vyos_config: -    lines: -      - set interfaces ethernet eth0 ip ospf cost 50 -      - set interfaces ethernet eth0 ip ospf priority 26 -      - set interfaces ethernet eth0 ipv6 ospfv3 mtu-ignore -      - set interfaces ethernet eth0 ipv6 ospfv3 instance-id 33 -      - set interfaces bonding bond2 ip ospf transmit-delay 45 -      - set interfaces bonding bond2 ipv6 ospfv3 passive +    lines: "{{ populate_commands }}"    vars:      ansible_connection: ansible.netcommon.network_cli diff --git a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_remove_config.yaml b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_remove_config.yaml index 1d0b96dc..74d79f62 100644 --- a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_remove_config.yaml +++ b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/_remove_config.yaml @@ -1,15 +1,9 @@  --- +- name: ensure facts +  include_tasks: _get_version.yaml +  - name: Remove pre-existing OSPF processes    vyos.vyos.vyos_config: -    lines: -      - delete interfaces ethernet eth0 ip ospf -      - delete interfaces ethernet eth0 ipv6 ospfv3 -      - delete interfaces ethernet eth1 ip ospf -      - delete interfaces ethernet eth1 ipv6 ospfv3 -      - delete interfaces bonding bond1 ip ospf -      - delete interfaces bonding bond1 ipv6 ospfv3 -      - delete interfaces bonding bond2 ip ospf -      - delete interfaces bonding bond2 ipv6 ospfv3 -      - delete interfaces bonding bond2 +    lines: "{{ remove_commands }}"    vars:      ansible_connection: ansible.netcommon.network_cli diff --git a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/parsed.yaml b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/parsed.yaml index 0d13f76d..cb70065a 100644 --- a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/parsed.yaml +++ b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/parsed.yaml @@ -2,10 +2,13 @@  - debug:      msg: START vyos_ospfv3_interfaces parsed integration tests on connection={{ ansible_connection }} +- name: ensure facts +  include_tasks: _get_version.yaml +  - name: Provide the running configuration for parsing (config to be parsed)    register: result    vyos.vyos.vyos_ospf_interfaces: -    running_config: "{{ lookup('file', '_parsed.cfg') }}" +    running_config: "{{ lookup('file', parsed_config_file) }}"      state: parsed  - assert: diff --git a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/rtt.yaml b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/rtt.yaml index 42da6ac2..c74248e0 100644 --- a/tests/integration/targets/vyos_ospf_interfaces/tests/cli/rtt.yaml +++ b/tests/integration/targets/vyos_ospf_interfaces/tests/cli/rtt.yaml @@ -2,6 +2,8 @@  - debug:      msg: START vyos_ospf_interfaces rtt integration tests on connection={{ ansible_connection }} +- include_tasks: _populate.yaml +  - include_tasks: _remove_config.yaml  - block: diff --git a/tests/integration/targets/vyos_ospf_interfaces/vars/main.yaml b/tests/integration/targets/vyos_ospf_interfaces/vars/main.yaml index 5c618eed..06260fe4 100644 --- a/tests/integration/targets/vyos_ospf_interfaces/vars/main.yaml +++ b/tests/integration/targets/vyos_ospf_interfaces/vars/main.yaml @@ -1,12 +1,6 @@  ---  merged: -  commands: -    - set interfaces ethernet eth0 ip ospf cost 50 -    - set interfaces ethernet eth0 ip ospf priority 26 -    - set interfaces ethernet eth0 ipv6 ospfv3 mtu-ignore -    - set interfaces ethernet eth0 ipv6 ospfv3 instance-id 33 -    - set interfaces bonding bond2 ip ospf transmit-delay 45 -    - set interfaces bonding bond2 ipv6 ospfv3 passive +  commands: "{{ merged_commands }}"    after:      - address_family:          - afi: ipv4 @@ -24,16 +18,7 @@ merged:        name: eth0  replaced: -  commands: -    - set interfaces ethernet eth0 ip ospf transmit-delay 50 -    - set interfaces ethernet eth0 ip ospf network point-to-point -    - set interfaces ethernet eth0 ipv6 ospfv3 dead-interval 39 -    - delete interfaces ethernet eth0 ip ospf cost 50 -    - delete interfaces ethernet eth0 ipv6 ospfv3 instance-id 33 -    - delete interfaces ethernet eth0 ipv6 ospfv3 mtu-ignore -    - set interfaces bonding bond2 ip ospf bandwidth 70 -    - set interfaces bonding bond2 ip ospf authentication md5 key-id 10 md5-key ******** - +  commands: "{{ replaced_commands }}"    after:      - address_family:          - afi: ipv4 @@ -56,16 +41,7 @@ replaced:        name: eth0  overridden: -  commands: -    - delete interfaces bonding bond2 ip ospf -    - delete interfaces bonding bond2 ipv6 ospfv3 -    - set interfaces ethernet eth0 ip ospf transmit-delay 50 -    - set interfaces ethernet eth0 ip ospf network point-to-point -    - set interfaces ethernet eth0 ipv6 ospfv3 dead-interval 39 -    - delete interfaces ethernet eth0 ip ospf cost 50 -    - delete interfaces ethernet eth0 ipv6 ospfv3 instance-id 33 -    - delete interfaces ethernet eth0 ipv6 ospfv3 mtu-ignore - +  commands: "{{ overridden_commands }}"    after:      - address_family:          - afi: ipv4 @@ -77,9 +53,7 @@ overridden:        name: eth0  deleted: -  commands: -    - delete interfaces bonding bond2 ip ospf -    - delete interfaces bonding bond2 ipv6 ospfv3 +  commands: "{{ deleted_commands }}"    after:      - address_family:          - afi: ipv4 @@ -91,15 +65,8 @@ deleted:        name: eth0  rendered: -  commands: -    - set interfaces ethernet eth1 firewall in name 'INBOUND' -    - set interfaces ethernet eth1 firewall out name 'OUTBOUND' -    - set interfaces ethernet eth1 firewall local name 'LOCAL' -    - set interfaces ethernet eth1 firewall local ipv6-name 'V6-LOCAL' -    - set interfaces ethernet eth2 firewall in name 'INBOUND' -    - set interfaces ethernet eth2 firewall out name 'OUTBOUND' -    - set interfaces ethernet eth2 firewall local name 'LOCAL' -    - set interfaces ethernet eth2 firewall local ipv6-name 'V6-LOCAL' +  commands: "{{ rendered_commands }}" +  round_trip:    after:      - name: eth0 diff --git a/tests/integration/targets/vyos_ospf_interfaces/vars/pre-v1_4.yaml b/tests/integration/targets/vyos_ospf_interfaces/vars/pre-v1_4.yaml new file mode 100644 index 00000000..a9e03421 --- /dev/null +++ b/tests/integration/targets/vyos_ospf_interfaces/vars/pre-v1_4.yaml @@ -0,0 +1,53 @@ +--- +merged_commands: +  - set interfaces ethernet eth0 ip ospf cost 50 +  - set interfaces ethernet eth0 ip ospf priority 26 +  - set interfaces ethernet eth0 ipv6 ospfv3 mtu-ignore +  - set interfaces ethernet eth0 ipv6 ospfv3 instance-id 33 +  - set interfaces bonding bond2 ip ospf transmit-delay 45 +  - set interfaces bonding bond2 ipv6 ospfv3 passive + +populate_commands: +  - set interfaces ethernet eth0 ip ospf cost 50 +  - set interfaces ethernet eth0 ip ospf priority 26 +  - set interfaces ethernet eth0 ipv6 ospfv3 mtu-ignore +  - set interfaces ethernet eth0 ipv6 ospfv3 instance-id 33 +  - set interfaces bonding bond2 ip ospf transmit-delay 45 +  - set interfaces bonding bond2 ipv6 ospfv3 passive + +remove_commands: +  - delete interfaces ethernet eth0 ip ospf +  - delete interfaces ethernet eth0 ipv6 ospfv3 +  - delete interfaces ethernet eth1 ip ospf +  - delete interfaces ethernet eth1 ipv6 ospfv3 +  - delete interfaces bonding bond1 ip ospf +  - delete interfaces bonding bond1 ipv6 ospfv3 +  - delete interfaces bonding bond2 ip ospf +  - delete interfaces bonding bond2 ipv6 ospfv3 +  - delete interfaces bonding bond2 + +parsed_config_file: "_parsed_config_1_3.cfg" + +replaced_commands: +  - set interfaces ethernet eth0 ip ospf transmit-delay 50 +  - set interfaces ethernet eth0 ip ospf network point-to-point +  - set interfaces ethernet eth0 ipv6 ospfv3 dead-interval 39 +  - delete interfaces ethernet eth0 ip ospf cost 50 +  - delete interfaces ethernet eth0 ipv6 ospfv3 instance-id 33 +  - delete interfaces ethernet eth0 ipv6 ospfv3 mtu-ignore +  - set interfaces bonding bond2 ip ospf bandwidth 70 +  - set interfaces bonding bond2 ip ospf authentication md5 key-id 10 md5-key ******** + +overridden_commands: +  - delete interfaces bonding bond2 ip ospf +  - delete interfaces bonding bond2 ipv6 ospfv3 +  - set interfaces ethernet eth0 ip ospf transmit-delay 50 +  - set interfaces ethernet eth0 ip ospf network point-to-point +  - set interfaces ethernet eth0 ipv6 ospfv3 dead-interval 39 +  - delete interfaces ethernet eth0 ip ospf cost 50 +  - delete interfaces ethernet eth0 ipv6 ospfv3 instance-id 33 +  - delete interfaces ethernet eth0 ipv6 ospfv3 mtu-ignore + +deleted_commands: +  - delete interfaces bonding bond2 ip ospf +  - delete interfaces bonding bond2 ipv6 ospfv3 diff --git a/tests/integration/targets/vyos_ospf_interfaces/vars/v1_4.yaml b/tests/integration/targets/vyos_ospf_interfaces/vars/v1_4.yaml new file mode 100644 index 00000000..15b7f5a7 --- /dev/null +++ b/tests/integration/targets/vyos_ospf_interfaces/vars/v1_4.yaml @@ -0,0 +1,48 @@ +--- +merged_commands: +  - set protocols ospf interface eth0 cost 50 +  - set protocols ospf interface eth0 priority 26 +  - set protocols ospfv3 interface eth0 mtu-ignore +  - set protocols ospfv3 interface eth0 instance-id 33 +  - set protocols ospfv3 interface bond2 passive +  - set protocols ospf interface bond2 transmit-delay 45 + +populate_commands: +  - set protocols ospf interface eth0 cost 50 +  - set protocols ospf interface eth0 priority 26 +  - set protocols ospfv3 interface eth0 mtu-ignore +  - set protocols ospfv3 interface eth0 instance-id 33 +  - set protocols ospfv3 interface bond2 passive +  - set protocols ospf interface bond2 transmit-delay 45 + +remove_commands: +  - delete protocols ospf interface eth0 +  - delete protocols ospf interface bond2 +  - delete protocols ospfv3 interface bond2 +  - delete protocols ospfv3 interface eth0 + +parsed_config_file: "_parsed_config_1_4.cfg" + +replaced_commands: +  - set protocols ospf interface eth0 transmit-delay 50 +  - set protocols ospf interface eth0 network point-to-point +  - set protocols ospfv3 interface eth0 dead-interval 39 +  - delete protocols ospf interface eth0 cost 50 +  - delete protocols ospfv3 interface eth0 instance-id 33 +  - delete protocols ospfv3 interface eth0 mtu-ignore +  - set protocols ospf interface bond2 bandwidth 70 +  - set protocols ospf interface bond2 authentication md5 key-id 10 md5-key ******** + +overridden_commands: +  - delete protocols ospf interface bond2 +  - delete protocols ospfv3 interface bond2 +  - set protocols ospf interface eth0 transmit-delay 50 +  - set protocols ospf interface eth0 network point-to-point +  - set protocols ospfv3 interface eth0 dead-interval 39 +  - delete protocols ospf interface eth0 cost 50 +  - delete protocols ospfv3 interface eth0 instance-id 33 +  - delete protocols ospfv3 interface eth0 mtu-ignore + +deleted_commands: +  - delete protocols ospf interface bond2 +  - delete protocols ospfv3 interface bond2 diff --git a/tests/unit/modules/network/vyos/fixtures/vyos_ospf_interfaces_config.cfg b/tests/unit/modules/network/vyos/fixtures/vyos_ospf_interfaces_config.cfg index 1fab55e3..2dfa661b 100644 --- a/tests/unit/modules/network/vyos/fixtures/vyos_ospf_interfaces_config.cfg +++ b/tests/unit/modules/network/vyos/fixtures/vyos_ospf_interfaces_config.cfg @@ -1,4 +1,4 @@  set interfaces ethernet eth0 ipv6 ospfv3 instance-id '33' -set interfaces ethernet eth0 ipv6 ospfv3 'mtu-ignore' +set interfaces ethernet eth0 ipv6 ospfv3 mtu-ignore  set interfaces ethernet eth1 ip ospf cost '100'  set interfaces ethernet eth1 ipv6 ospfv3 ifmtu '33' diff --git a/tests/unit/modules/network/vyos/fixtures/vyos_ospf_interfaces_config_14.cfg b/tests/unit/modules/network/vyos/fixtures/vyos_ospf_interfaces_config_14.cfg index d630d94c..0053877e 100644 --- a/tests/unit/modules/network/vyos/fixtures/vyos_ospf_interfaces_config_14.cfg +++ b/tests/unit/modules/network/vyos/fixtures/vyos_ospf_interfaces_config_14.cfg @@ -1,4 +1,4 @@  set protocols ospfv3 interface eth0 instance-id '33' -set protocols ospfv3 interface eth0 'mtu-ignore' +set protocols ospfv3 interface eth0 mtu-ignore  set protocols ospf interface eth1 cost '100'  set protocols ospfv3 interface eth1 ifmtu '33' | 
