From d0747257cb78e767d14d581f84991b12385016ce Mon Sep 17 00:00:00 2001 From: Pavel Lazukin <45261138+plazukin@users.noreply.github.com> Date: Mon, 13 Feb 2023 11:33:59 +0300 Subject: [PATCH] Missing no-refresh for exos_facts in Interfaces (#517) * missing no-refresh for exos_facts in Interfaces * exos_fixtures: rename show_port_config --------- Co-authored-by: Pavel Lazukin (cherry picked from commit ffdd7c2844c0e192d77653a95bcf5094d08fbf74) --- .../fragments/517-add-ports-no-refresh-in-exos-facts.yaml | 3 +++ plugins/module_utils/network/exos/facts/legacy/base.py | 2 +- .../{show_port_config => show_port_config_no-refresh} | 0 3 files changed, 4 insertions(+), 1 deletion(-) create mode 100644 changelogs/fragments/517-add-ports-no-refresh-in-exos-facts.yaml rename tests/unit/plugins/modules/exos_fixtures/{show_port_config => show_port_config_no-refresh} (100%) diff --git a/changelogs/fragments/517-add-ports-no-refresh-in-exos-facts.yaml b/changelogs/fragments/517-add-ports-no-refresh-in-exos-facts.yaml new file mode 100644 index 00000000..c81e677c --- /dev/null +++ b/changelogs/fragments/517-add-ports-no-refresh-in-exos-facts.yaml @@ -0,0 +1,3 @@ +bugfixes: + - exos_facts - returns timeout error when we use connection type ``network_cli``. + It happened because we send command without ``no-refresh`` and script ``cli2json.py`` stuck in loop while reading console output (https://github.com/ansible-collections/community.network/pull/517). diff --git a/plugins/module_utils/network/exos/facts/legacy/base.py b/plugins/module_utils/network/exos/facts/legacy/base.py index 5c0bf20b..690b8a87 100644 --- a/plugins/module_utils/network/exos/facts/legacy/base.py +++ b/plugins/module_utils/network/exos/facts/legacy/base.py @@ -130,7 +130,7 @@ class Interfaces(FactsBase): COMMANDS = [ 'show switch', - {'command': 'show port config', 'output': 'json'}, + {'command': 'show port config no-refresh', 'output': 'json'}, {'command': 'show port description', 'output': 'json'}, {'command': 'show vlan detail', 'output': 'json'}, {'command': 'show lldp neighbors', 'output': 'json'} diff --git a/tests/unit/plugins/modules/exos_fixtures/show_port_config b/tests/unit/plugins/modules/exos_fixtures/show_port_config_no-refresh similarity index 100% rename from tests/unit/plugins/modules/exos_fixtures/show_port_config rename to tests/unit/plugins/modules/exos_fixtures/show_port_config_no-refresh