Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

update ce_vxlan_global to fix bugs. #57947

Merged
merged 3 commits into from
Jun 28, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -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.
6 changes: 4 additions & 2 deletions lib/ansible/modules/network/cloudengine/ce_vxlan_global.py
Original file line number Diff line number Diff line change
Expand Up @@ -239,7 +239,7 @@ def get_bd_list(self):
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):
Expand Down Expand Up @@ -420,7 +420,7 @@ def get_existing(self):
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"

Expand Down Expand Up @@ -474,6 +474,8 @@ def get_end_state(self):
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"""
Expand Down