mirror of
https://github.com/ansible-collections/community.general.git
synced 2026-05-07 13:52:54 +00:00
2.5 Plugin Environment support and Testcases for dellos6 modules (#34890)
* Dellos6_2.5_support * cleanup * Fix pep8 * fix waitfor * fix_facts * fix_assert
This commit is contained in:
@@ -34,7 +34,7 @@ from ansible.module_utils._text import to_text
|
||||
from ansible.module_utils.basic import env_fallback, return_values
|
||||
from ansible.module_utils.network.common.utils import to_list, ComplexList
|
||||
from ansible.module_utils.connection import exec_command
|
||||
from ansible.module_utils.network.common.config import NetworkConfig, ConfigLine, ignore_line, DEFAULT_COMMENT_TOKENS
|
||||
from ansible.module_utils.network.common.config import NetworkConfig, ConfigLine, ignore_line
|
||||
|
||||
_DEVICE_CONFIGS = {}
|
||||
|
||||
@@ -122,8 +122,7 @@ def load_config(module, commands):
|
||||
for command in to_list(commands):
|
||||
if command == 'end':
|
||||
continue
|
||||
cmd = {'command': command, 'prompt': WARNING_PROMPTS_RE, 'answer': 'yes'}
|
||||
rc, out, err = exec_command(module, module.jsonify(cmd))
|
||||
rc, out, err = exec_command(module, command)
|
||||
if rc != 0:
|
||||
module.fail_json(msg=to_text(err, errors='surrogate_or_strict'), command=command, rc=rc)
|
||||
exec_command(module, 'end')
|
||||
@@ -233,7 +232,7 @@ def os6_parse(lines, indent=None, comment_tokens=None):
|
||||
class Dellos6NetworkConfig(NetworkConfig):
|
||||
|
||||
def load(self, contents):
|
||||
self._items = os6_parse(contents, self._indent, DEFAULT_COMMENT_TOKENS)
|
||||
self._items = os6_parse(contents, self._indent)
|
||||
|
||||
def _diff_line(self, other, path=None):
|
||||
diff = list()
|
||||
|
||||
Reference in New Issue
Block a user