summaryrefslogtreecommitdiff
path: root/lib/ansible/module_utils/network/eos
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ansible/module_utils/network/eos')
-rw-r--r--lib/ansible/module_utils/network/eos/eos.py5
-rw-r--r--lib/ansible/module_utils/network/eos/facts/legacy/base.py7
-rw-r--r--lib/ansible/module_utils/network/eos/facts/vlans/vlans.py3
3 files changed, 3 insertions, 12 deletions
diff --git a/lib/ansible/module_utils/network/eos/eos.py b/lib/ansible/module_utils/network/eos/eos.py
index 6721c0e54c..22c675153e 100644
--- a/lib/ansible/module_utils/network/eos/eos.py
+++ b/lib/ansible/module_utils/network/eos/eos.py
@@ -418,9 +418,6 @@ class HttpApi:
self._session_support = self._connection.supports_sessions()
return self._session_support
- def get(self, command, **kwargs):
- return self._connection.send_request(command)
-
def run_commands(self, commands, check_rc=True):
"""Runs list of commands on remote device and returns results
"""
@@ -514,7 +511,7 @@ class HttpApi:
"""
return self.edit_config(config, commit, replace)
- def edit_config(self, config, commit=True, replace=False):
+ def edit_config(self, config, commit=False, replace=False):
"""Loads the configuration onto the remote devices
If the device doesn't support configuration sessions, this will
diff --git a/lib/ansible/module_utils/network/eos/facts/legacy/base.py b/lib/ansible/module_utils/network/eos/facts/legacy/base.py
index 6093dedd09..50bb82e849 100644
--- a/lib/ansible/module_utils/network/eos/facts/legacy/base.py
+++ b/lib/ansible/module_utils/network/eos/facts/legacy/base.py
@@ -130,13 +130,6 @@ class Interfaces(FactsBase):
self.facts['all_ipv6_addresses'] = list()
data = self.responses[0]
- if not isinstance(data, dict):
- # EAPI kills the whole request on an error.
- self.COMMANDS.pop()
- super(Interfaces, self).populate()
- self.responses.append(None)
- data = self.responses[0]
-
self.facts['interfaces'] = self.populate_interfaces(data)
data = self.responses[1]
diff --git a/lib/ansible/module_utils/network/eos/facts/vlans/vlans.py b/lib/ansible/module_utils/network/eos/facts/vlans/vlans.py
index 63d21b169b..0e01b6c216 100644
--- a/lib/ansible/module_utils/network/eos/facts/vlans/vlans.py
+++ b/lib/ansible/module_utils/network/eos/facts/vlans/vlans.py
@@ -63,7 +63,8 @@ class VlansFacts(object):
if obj:
objs.extend(obj)
- facts = {'vlans': []}
+ ansible_facts['ansible_network_resources'].pop('vlans', None)
+ facts = {}
if objs:
params = utils.validate_config(self.argument_spec, {'config': objs})
facts['vlans'] = [utils.remove_empties(cfg) for cfg in params['config']]