summaryrefslogtreecommitdiff
path: root/plugins/module_utils
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/module_utils')
-rw-r--r--plugins/module_utils/network/vyos/argspec/interfaces/interfaces.py18
-rw-r--r--plugins/module_utils/network/vyos/config/interfaces/interfaces.py1
-rw-r--r--plugins/module_utils/network/vyos/facts/interfaces/interfaces.py3
3 files changed, 4 insertions, 18 deletions
diff --git a/plugins/module_utils/network/vyos/argspec/interfaces/interfaces.py b/plugins/module_utils/network/vyos/argspec/interfaces/interfaces.py
index 66e046bf..8ba119f3 100644
--- a/plugins/module_utils/network/vyos/argspec/interfaces/interfaces.py
+++ b/plugins/module_utils/network/vyos/argspec/interfaces/interfaces.py
@@ -4,23 +4,6 @@
# GNU General Public License v3.0+
# (see COPYING or https://www.gnu.org/licenses/gpl-3.0.txt)
-#############################################
-# WARNING #
-#############################################
-#
-# This file is auto generated by the resource
-# module builder playbook.
-#
-# Do not edit this file manually.
-#
-# Changes to this file will be over written
-# by the resource module builder.
-#
-# Changes should be made in the model used to
-# generate this file or in the resource module
-# builder template.
-#
-#############################################
"""
The arg spec for the vyos_interfaces module
"""
@@ -77,6 +60,7 @@ class InterfacesArgs(object): # pylint: disable=R0903
},
"type": "list",
},
+ "vrf": {"type": "str"},
},
"type": "list",
},
diff --git a/plugins/module_utils/network/vyos/config/interfaces/interfaces.py b/plugins/module_utils/network/vyos/config/interfaces/interfaces.py
index 944f7f42..71e4c0d1 100644
--- a/plugins/module_utils/network/vyos/config/interfaces/interfaces.py
+++ b/plugins/module_utils/network/vyos/config/interfaces/interfaces.py
@@ -74,6 +74,7 @@ class Interfaces(ConfigBase):
if self.state in self.ACTION_STATES:
existing_interfaces_facts = self.get_interfaces_facts()
+
else:
existing_interfaces_facts = []
diff --git a/plugins/module_utils/network/vyos/facts/interfaces/interfaces.py b/plugins/module_utils/network/vyos/facts/interfaces/interfaces.py
index 51f3c5f6..30d619a3 100644
--- a/plugins/module_utils/network/vyos/facts/interfaces/interfaces.py
+++ b/plugins/module_utils/network/vyos/facts/interfaces/interfaces.py
@@ -79,6 +79,7 @@ class InterfacesFacts(object):
facts["interfaces"].append(utils.remove_empties(cfg))
ansible_facts["ansible_network_resources"].update(facts)
+
return ansible_facts
def render_config(self, conf):
@@ -93,7 +94,7 @@ class InterfacesFacts(object):
"""
vif_conf = "\n".join(filter(lambda x: ("vif" in x), conf))
eth_conf = "\n".join(filter(lambda x: ("vif" not in x), conf))
- config = self.parse_attribs(["description", "speed", "mtu", "duplex"], eth_conf)
+ config = self.parse_attribs(["description", "speed", "mtu", "duplex", "vrf"], eth_conf)
config["vifs"] = self.parse_vifs(vif_conf)
return utils.remove_empties(config)