From 715de33467cb109a760d9ae7f7a58209d6ef3901 Mon Sep 17 00:00:00 2001 From: YuandongXu Date: Sat, 29 Jun 2019 05:10:24 +0800 Subject: [PATCH] ce_netstream_aging: update to fix a bug. (#58231) * update to fix a bug * update to for shippable. --- .../modules/network/cloudengine/ce_netstream_aging.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/ansible/modules/network/cloudengine/ce_netstream_aging.py b/lib/ansible/modules/network/cloudengine/ce_netstream_aging.py index 2765a553cbc..42ac8950dde 100644 --- a/lib/ansible/modules/network/cloudengine/ce_netstream_aging.py +++ b/lib/ansible/modules/network/cloudengine/ce_netstream_aging.py @@ -315,7 +315,6 @@ class NetStreamAging(object): tcp_tmp["vxlan"] = "absent" flags = list() exp = " | ignore-case include netstream timeout" - exp = "| ignore-case include evpn-overlay enable" flags.append(exp) config = get_config(self.module, flags) if config: @@ -324,14 +323,14 @@ class NetStreamAging(object): for config_mem in config_list: config_mem = config_mem.lstrip() config_mem_list = config_mem.split(' ') - if config_mem_list[2] == "ip": + if len(config_mem_list) > 4 and config_mem_list[2] == "ip": if config_mem_list[3] == "active": active_tmp["ip"] = config_mem_list[4] if config_mem_list[3] == "inactive": inactive_tmp["ip"] = config_mem_list[4] if config_mem_list[3] == "tcp-session": tcp_tmp["ip"] = "present" - if config_mem_list[2] == "vxlan": + if len(config_mem_list) > 5 and config_mem_list[2] == "vxlan": if config_mem_list[4] == "active": active_tmp["vxlan"] = config_mem_list[5] if config_mem_list[4] == "inactive":