Fix ios test pt. 2 (#40628)

* Add missing idempotence assert

* Remove dhcp with other addresses on ipv6
This commit is contained in:
Nathaniel Case 2018-05-23 18:33:36 -04:00 committed by GitHub
parent 21feca6683
commit f88412b7cd
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 2 deletions

View file

@ -107,11 +107,10 @@ from copy import deepcopy
from ansible.module_utils._text import to_text from ansible.module_utils._text import to_text
from ansible.module_utils.basic import AnsibleModule from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.six import iteritems
from ansible.module_utils.network.ios.ios import get_config, load_config from ansible.module_utils.network.ios.ios import get_config, load_config
from ansible.module_utils.network.ios.ios import ios_argument_spec from ansible.module_utils.network.ios.ios import ios_argument_spec
from ansible.module_utils.network.common.config import NetworkConfig from ansible.module_utils.network.common.config import NetworkConfig
from ansible.module_utils.network.common.utils import conditional, remove_default_spec from ansible.module_utils.network.common.utils import remove_default_spec
from ansible.module_utils.network.common.utils import is_netmask, is_masklen, to_netmask, to_masklen from ansible.module_utils.network.common.utils import is_netmask, is_masklen, to_netmask, to_masklen
@ -197,6 +196,8 @@ def map_obj_to_commands(updates, module):
commands.append('no ipv6 address {}'.format(ipv6)) commands.append('no ipv6 address {}'.format(ipv6))
else: else:
commands.append('no ipv6 address') commands.append('no ipv6 address')
if 'dhcp' in obj_in_have['ipv6']:
commands.append('no ipv6 address dhcp')
elif state == 'present': elif state == 'present':
if ipv4: if ipv4:

View file

@ -168,6 +168,8 @@
provider: "{{ cli }}" provider: "{{ cli }}"
register: result register: result
- assert: *unchanged
- name: Delete second interface ipv4 and ipv6 address (setup) - name: Delete second interface ipv4 and ipv6 address (setup)
ios_l3_interface: ios_l3_interface:
name: "{{ test_interface2 }}" name: "{{ test_interface2 }}"