96 lines
3.7 KiB
YAML
96 lines
3.7 KiB
YAML
|
---
|
||
|
- 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: "<filter type=\"subtree\">
|
||
|
<ifmtrunk xmlns=\"http://www.huawei.com/netconf/vrp\" content-version=\"1.0\" format-version=\"1.0\">
|
||
|
<TrunkIfs>
|
||
|
<TrunkIf>
|
||
|
<ifName>Eth-Trunk10</ifName>
|
||
|
<lacpTrunk>
|
||
|
<isSupportPrmpt></isSupportPrmpt>
|
||
|
<rcvTimeoutType></rcvTimeoutType>
|
||
|
<fastTimeoutUserDefinedValue></fastTimeoutUserDefinedValue>
|
||
|
<selectPortStd></selectPortStd>
|
||
|
<promptDelay></promptDelay>
|
||
|
<maxActiveNum></maxActiveNum>
|
||
|
<collectMaxDelay></collectMaxDelay>
|
||
|
<mixRateEnable></mixRateEnable>
|
||
|
<dampStaFlapEn></dampStaFlapEn>
|
||
|
<dampUnexpMacEn></dampUnexpMacEn>
|
||
|
<trunkSysMac></trunkSysMac>
|
||
|
<trunkPortIdExt></trunkPortIdExt>
|
||
|
</lacpTrunk>
|
||
|
</TrunkIf>
|
||
|
</TrunkIfs>
|
||
|
</ifmtrunk>
|
||
|
</filter>"
|
||
|
register: result_ifs_merged
|
||
|
|
||
|
- name: Get lacp config by ce_netconf.
|
||
|
ce_netconf:
|
||
|
rpc: get
|
||
|
cfg_xml: "<filter type=\"subtree\">
|
||
|
<ifmtrunk xmlns=\"http://www.huawei.com/netconf/vrp\" content-version=\"1.0\" format-version=\"1.0\">
|
||
|
<lacpSysInfo>
|
||
|
<priority></priority>
|
||
|
</lacpSysInfo>
|
||
|
</ifmtrunk>
|
||
|
</filter>"
|
||
|
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"
|
||
|
- "'<isSupportPrmpt>false</isSupportPrmpt>' == result_ifs_merged.end_state.result"
|
||
|
- "'<rcvTimeoutType>Slow</rcvTimeoutType>' == result_ifs_merged.end_state.result"
|
||
|
- "'<fastTimeoutUserDefinedValue>90</fastTimeoutUserDefinedValue>' == result_ifs_merged.end_state.result"
|
||
|
- "'<selectPortStd>Prority</selectPortStd>' == result_ifs_merged.end_state.result"
|
||
|
- "'<promptDelay>30</promptDelay>' == result_ifs_merged.end_state.result"
|
||
|
- "'<collectMaxDelay>0</collectMaxDelay>' in result_ifs_merged.end_state.result"
|
||
|
- "'<mixRateEnable>false</mixRateEnable>' in result_ifs_merged.end_state.result"
|
||
|
- "'<dampStaFlapEn>false</dampStaFlapEn>' in result_ifs_merged.end_state.result"
|
||
|
- "'<dampUnexpMacEn>false</dampUnexpMacEn>' in result_ifs_merged.end_state.result"
|
||
|
- "'<trunkSysMac>false</trunkSysMac>' in result_ifs_merged.end_state.result"
|
||
|
- "'<priority>32768</priority>' in result_global_merged.end_state.result"
|
||
|
|
||
|
- debug:
|
||
|
msg: "END ce_lacp merged integration tests on connection={{ ansible_connection }}"
|