From 8a731c61cdba177b8399ad19c836684be9413d79 Mon Sep 17 00:00:00 2001 From: Renato Almeida de Oliveira Date: Wed, 26 Aug 2020 01:13:54 -0300 Subject: [PATCH 1/5] Set export on Config to verbose SUMMARY In the configuration export session i think that using /export verbose is better than just /export, because with export only some configurations sections are going to be missed like BGP configuration, as proposed in https://github.com/ansible/ansible/pull/67868 ISSUE TYPE Bugfix Pull Request COMPONENT NAME routeros_facts.py ADDITIONAL INFORMATION extract of the output with /export verbose # software id = # # # /interface ethernet set [ find default-name=ether1 ] advertise=\ 10M-half,10M-full,100M-half,100M-full,1000M-full arp=enabled arp-timeout=\ auto auto-negotiation=yes cable-settings=default disable-running-check=\ yes disabled=no full-duplex=yes loop-protect=default \ loop-protect-disable-time=5m loop-protect-send-interval=5s mac-address=\ 50:00:00:02:00:00 mtu=1500 name=ether1 orig-mac-address=50:00:00:02:00:00 \ rx-flow-control=off speed=1Gbps tx-flow-control=off set [ find default-name=ether2 ] advertise=\ 10M-half,10M-full,100M-half,100M-full,1000M-full arp=enabled arp-timeout=\ auto auto-negotiation=yes cable-settings=default disable-running-check=\ yes disabled=no full-duplex=yes loop-protect=default \ loop-protect-disable-time=5m loop-protect-send-interval=5s mac-address=\ 50:00:00:02:00:01 mtu=1500 name=ether2 orig-mac-address=50:00:00:02:00:01 \ rx-flow-control=off speed=1Gbps tx-flow-control=off set [ find default-name=ether3 ] advertise=\ ..... ..... Extract of Output with only /export: # software id = # # # /interface wireless security-profiles set [ find default=yes ] supplicant-identity=MikroTik /ip dhcp-client add dhcp-options=hostname,clientid disabled=no interface=ether1 --- plugins/modules/network/routeros/routeros_facts.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/modules/network/routeros/routeros_facts.py b/plugins/modules/network/routeros/routeros_facts.py index cd8a67b8..05d89152 100644 --- a/plugins/modules/network/routeros/routeros_facts.py +++ b/plugins/modules/network/routeros/routeros_facts.py @@ -284,7 +284,7 @@ def to_megabytes(self, data): class Config(FactsBase): - COMMANDS = ['/export'] + COMMANDS = ['/export verbose'] def populate(self): super(Config, self).populate() From 807a71df4859527f47b2d79c1c4823e109320d50 Mon Sep 17 00:00:00 2001 From: Renato Almeida de Oliveira Date: Wed, 26 Aug 2020 01:26:13 -0300 Subject: [PATCH 2/5] Create 104_routeros_facts_export_verbose --- changelogs/fragments/104_routeros_facts_export_verbose | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 changelogs/fragments/104_routeros_facts_export_verbose diff --git a/changelogs/fragments/104_routeros_facts_export_verbose b/changelogs/fragments/104_routeros_facts_export_verbose new file mode 100644 index 00000000..056e038e --- /dev/null +++ b/changelogs/fragments/104_routeros_facts_export_verbose @@ -0,0 +1,2 @@ +minor_changes: + - set configuration export on routeros_facts to verbose, for full configuration export From f40894931f9a9644bf33692f0bca265350775b63 Mon Sep 17 00:00:00 2001 From: Renato Almeida de Oliveira Date: Wed, 26 Aug 2020 01:42:00 -0300 Subject: [PATCH 3/5] Update changelogs/fragments/104_routeros_facts_export_verbose Co-authored-by: Felix Fontein --- changelogs/fragments/104_routeros_facts_export_verbose | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/changelogs/fragments/104_routeros_facts_export_verbose b/changelogs/fragments/104_routeros_facts_export_verbose index 056e038e..2f80ea30 100644 --- a/changelogs/fragments/104_routeros_facts_export_verbose +++ b/changelogs/fragments/104_routeros_facts_export_verbose @@ -1,2 +1,2 @@ minor_changes: - - set configuration export on routeros_facts to verbose, for full configuration export + - routeros_facts - set configuration export on to verbose, for full configuration export (https://github.com/ansible-collections/community.network/pull/104). From d6880ae3069c15f217c726d214f479d2243cc79b Mon Sep 17 00:00:00 2001 From: Renato Almeida de Oliveira Date: Wed, 26 Aug 2020 01:52:36 -0300 Subject: [PATCH 4/5] Rename export to export_verbose --- .../routeros/fixtures/routeros_facts/{export => export_verbose} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename tests/unit/plugins/modules/network/routeros/fixtures/routeros_facts/{export => export_verbose} (100%) diff --git a/tests/unit/plugins/modules/network/routeros/fixtures/routeros_facts/export b/tests/unit/plugins/modules/network/routeros/fixtures/routeros_facts/export_verbose similarity index 100% rename from tests/unit/plugins/modules/network/routeros/fixtures/routeros_facts/export rename to tests/unit/plugins/modules/network/routeros/fixtures/routeros_facts/export_verbose From 2f7dc5fd3f362e7028bfa987288437967bfdc558 Mon Sep 17 00:00:00 2001 From: Renato Almeida de Oliveira Date: Wed, 26 Aug 2020 01:58:55 -0300 Subject: [PATCH 5/5] Rename 104_routeros_facts_export_verbose to 104_routeros_facts_export_verbose.yml --- ...facts_export_verbose => 104_routeros_facts_export_verbose.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename changelogs/fragments/{104_routeros_facts_export_verbose => 104_routeros_facts_export_verbose.yml} (100%) diff --git a/changelogs/fragments/104_routeros_facts_export_verbose b/changelogs/fragments/104_routeros_facts_export_verbose.yml similarity index 100% rename from changelogs/fragments/104_routeros_facts_export_verbose rename to changelogs/fragments/104_routeros_facts_export_verbose.yml