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_evpn_global to fix bugs #61013

Merged
merged 1 commit into from Sep 18, 2019
Merged
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
12 changes: 6 additions & 6 deletions lib/ansible/modules/network/cloudengine/ce_evpn_global.py
Expand Up @@ -102,7 +102,7 @@


from ansible.module_utils.basic import AnsibleModule
from ansible.module_utils.network.cloudengine.ce import get_config, load_config
from ansible.module_utils.network.cloudengine.ce import exec_command, load_config
from ansible.module_utils.network.cloudengine.ce import ce_argument_spec


Expand Down Expand Up @@ -153,11 +153,11 @@ def get_evpn_global_info(self):
""" get current EVPN global configration"""

self.global_info['evpnOverLay'] = 'disable'
flags = list()
exp = " | include evpn-overlay enable"
flags.append(exp)
config = get_config(self.module, flags)
if config:
cmd = "display current-configuration | include ^evpn-overlay enable"
rc, out, err = exec_command(self.module, cmd)
if rc != 0:
self.module.fail_json(msg=err)
if out:
self.global_info['evpnOverLay'] = 'enable'

def get_existing(self):
Expand Down