Update ce_evpn_global to fix bugs (#61013)
This commit is contained in:
parent
80ead00838
commit
3cde0b5693
1 changed files with 6 additions and 6 deletions
|
@ -102,7 +102,7 @@ changed:
|
|||
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
@ -153,11 +153,11 @@ class EvpnGlobal(object):
|
|||
""" get current EVPN global configuration"""
|
||||
|
||||
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):
|
||||
|
|
Loading…
Reference in a new issue