update ce_vxlan_global to fix bugs. (#57947)

* update to fix bugs.

* add a changelog fragment.

* update a changelog fragment.
pull/58485/head
YuandongXu 5 years ago committed by ansibot
parent 4403f866e3
commit 242f160747

@ -0,0 +1,4 @@
bugfixes:
- ce_vxlan_global - line 242 , bd_info is a string array,and it should be 'extend' operation.
- ce_vxlan_global - line 423, 'if' and 'else' should set a different value. if 'exist', that value is 'enable'.
- ce_vxlan_global - line 477. To get state of result, if it is changed or not.

@ -239,7 +239,7 @@ class VxlanGlobal(object):
if not bd_str:
return bd_info
bd_num = re.findall(r'bridge-domain\s*([0-9]+)', bd_str)
bd_info.append(bd_num)
bd_info.extend(bd_num)
return bd_info
def config_bridge_domain(self):
@ -420,7 +420,7 @@ class VxlanGlobal(object):
cmd = "assign forward nvo3 ecmp hash enable"
exist = is_config_exist(self.config, cmd)
if exist:
self.existing["nvo3_ecmp_hash"] = "disable"
self.existing["nvo3_ecmp_hash"] = "enable"
else:
self.existing["nvo3_ecmp_hash"] = "disable"
@ -474,6 +474,8 @@ class VxlanGlobal(object):
self.end_state["nvo3_ecmp_hash"] = "enable"
else:
self.end_state["nvo3_ecmp_hash"] = "disable"
if self.existing == self.end_state:
self.changed = True
def work(self):
"""worker"""

Loading…
Cancel
Save