mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-05-09 10:41:31 -07:00
fix bugs for ce (#54750)
* Update ce.py while to_text(out, errors='surrogate_then_replace').strip().endswith(']'): display.vvvv('wrong context, sending exit to device', self._play_context.remote_addr) conn.exec_command('return') out = conn.get_prompt() connetion has no send_command function and ce device has no 'exit' command to return user-view(a correct context),but 'return' .command. * Add files via upload Some bugs fix. * Add files via upload fix some bugs * fix a bug for ce_command Running a command with prompt via ce_command, It doesn't work.The reason is that the key word for network_cli recognition is answer not response. * fix bugs fix bugs for ce modules * Update ce.py * Delete ce_ftp.py need modify * Delete ce_lacp.py * Add files via upload * Delete ce_aaa_server.py * Delete ce_aaa_server_host.py * Compatible with Python 3 Compatible with Python 3 and fix bugs for ce * Update ce_aaa_server.py * Add files via upload modify doc * Add files via upload Compatible with Python 3 and fix bugs * Add files via upload Compatible with Python 3 and fix bugs * Add files via upload Cancellation of change * Update ce_netconf.py It is a bug that response has no xml attribute:line 183 * Add files via upload * Add files via upload Compatible with Python 3 and fix bugs * updatp ce_config.py a bug for this module.
This commit is contained in:
parent
f8bebc61c8
commit
1017f15c38
9 changed files with 315 additions and 269 deletions
|
@ -19,7 +19,7 @@ from ansible.utils.display import Display
|
|||
|
||||
display = Display()
|
||||
|
||||
CLI_SUPPORTED_MODULES = ['ce_config', 'ce_command']
|
||||
CLI_SUPPORTED_MODULES = ['ce_config', 'ce_command', 'ce_facts']
|
||||
|
||||
|
||||
class ActionModule(ActionNetworkModule):
|
||||
|
@ -89,7 +89,7 @@ class ActionModule(ActionNetworkModule):
|
|||
out = conn.get_prompt()
|
||||
while to_text(out, errors='surrogate_then_replace').strip().endswith(']'):
|
||||
display.vvvv('wrong context, sending exit to device', self._play_context.remote_addr)
|
||||
conn.send_command('exit')
|
||||
conn.exec_command('return')
|
||||
out = conn.get_prompt()
|
||||
|
||||
result = super(ActionModule, self).run(task_vars=task_vars)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue