summaryrefslogtreecommitdiff
path: root/lib/ansible/module_utils/network/eos
diff options
context:
space:
mode:
authorGomathiselviS <gomathiselvi@gmail.com>2020-01-16 15:07:57 -0500
committerGitHub <noreply@github.com>2020-01-16 15:07:57 -0500
commit0ab0e1556b7380e0b432d0b9ce21849539befc8f (patch)
treeb1c3c291442e6d837f686e93ed30517748a57af2 /lib/ansible/module_utils/network/eos
parent599cc0bdfa762819962108c5933b74429623e8d2 (diff)
downloadansible-0ab0e1556b7380e0b432d0b9ce21849539befc8f.tar.gz
eos_lacp_interfaces: Add unit testcases to eos_lacp_interfaces (#64455)
* Add unit testcases to eos_lacp_interfaces * Add unit testcases to eos_lacp_interfaces
Diffstat (limited to 'lib/ansible/module_utils/network/eos')
-rw-r--r--lib/ansible/module_utils/network/eos/facts/lacp_interfaces/lacp_interfaces.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/ansible/module_utils/network/eos/facts/lacp_interfaces/lacp_interfaces.py b/lib/ansible/module_utils/network/eos/facts/lacp_interfaces/lacp_interfaces.py
index 7c1076c5ab..6f0560fe3b 100644
--- a/lib/ansible/module_utils/network/eos/facts/lacp_interfaces/lacp_interfaces.py
+++ b/lib/ansible/module_utils/network/eos/facts/lacp_interfaces/lacp_interfaces.py
@@ -37,6 +37,9 @@ class Lacp_interfacesFacts(object):
self.generated_spec = utils.generate_dict(facts_argument_spec)
+ def get_device_data(self, connection):
+ return connection.get('show running-config | section lacp')
+
def populate_facts(self, connection, ansible_facts, data=None):
""" Populate the facts for lacp_interfaces
:param connection: the device connection
@@ -46,7 +49,7 @@ class Lacp_interfacesFacts(object):
:returns: facts
"""
if not data:
- data = connection.get('show running-config | section lacp')
+ data = self.get_device_data(connection)
# split the config into instances of the resource
resource_delim = 'interface'