---
- debug:
msg: "START ce_lacp merged integration tests on connection={{ ansible_connection }}"
# befor removing, it should be merged
- include_tasks: merge.yaml
- name: Merge the provided configuration with the exisiting running configuration
ce_lacp: &absent
mode: Dynamic
trunk_id: 10
preempt_enable: True
state_flapping: True
port_id_extension_enable: True
unexpected_mac_disable: True
system_id: 1111-2222-3333
timeout_type: Fast
fast_timeout: 12
mixed_rate_link_enable: True
preempt_delay: 12
collector_delay: 12
max_active_linknumber: 2
select: Prority
priority: 23
global_priority: 123
state: absent
register: result
- name: Assert the configuration is reflected on host
assert:
that:
- "result['changed'] == true"
- name: Get lacp config by ce_netconf.
ce_netconf:
rpc: get
cfg_xml: "
Eth-Trunk10
"
register: result_ifs_merged
- name: Get lacp config by ce_netconf.
ce_netconf:
rpc: get
cfg_xml: "
"
register: result_global_merged
- name: Merge the provided configuration with the existing running configuration (IDEMPOTENT)
ce_lacp: *absent
register: result_re_merged
- name: Assert that the previous task was idempotent, some become ot default values, others depend on devices.
assert:
that:
- "result_re_merged.changed == false"
- "'false' == result_ifs_merged.end_state.result"
- "'Slow' == result_ifs_merged.end_state.result"
- "'90' == result_ifs_merged.end_state.result"
- "'Prority' == result_ifs_merged.end_state.result"
- "'30' == result_ifs_merged.end_state.result"
- "'0' in result_ifs_merged.end_state.result"
- "'false' in result_ifs_merged.end_state.result"
- "'false' in result_ifs_merged.end_state.result"
- "'false' in result_ifs_merged.end_state.result"
- "'false' in result_ifs_merged.end_state.result"
- "'32768' in result_global_merged.end_state.result"
- debug:
msg: "END ce_lacp merged integration tests on connection={{ ansible_connection }}"