mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-07-22 12:50:22 -07:00
Fixes to httpapi for EAPI (#40675)
* Replace errant uses of str * Hook up become to eapi * Hook become up to nxapi, too
This commit is contained in:
parent
38c86b7eef
commit
0ad4b7b785
4 changed files with 36 additions and 17 deletions
|
@ -100,7 +100,7 @@ def map_obj_to_commands(updates, module):
|
|||
state = module.params['state']
|
||||
|
||||
if state == 'absent' and have.get('text'):
|
||||
if isinstance(have['text'], str):
|
||||
if isinstance(have['text'], string_types):
|
||||
commands.append('no banner %s' % module.params['banner'])
|
||||
elif have['text'].get('loginBanner') or have['text'].get('motd'):
|
||||
commands.append({'cmd': 'no banner %s' % module.params['banner']})
|
||||
|
@ -147,7 +147,7 @@ def map_config_to_obj(module):
|
|||
def map_params_to_obj(module):
|
||||
text = module.params['text']
|
||||
if text:
|
||||
text = str(text).strip()
|
||||
text = to_text(text).strip()
|
||||
|
||||
return {
|
||||
'banner': module.params['banner'],
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue