summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--changelogs/fragments/l3_interfaces-support.yaml3
-rw-r--r--galaxy.yml2
-rw-r--r--plugins/module_utils/network/vyos/facts/interfaces/interfaces.py2
-rw-r--r--plugins/module_utils/network/vyos/facts/l3_interfaces/l3_interfaces.py2
-rw-r--r--plugins/module_utils/network/vyos/utils/utils.py6
5 files changed, 12 insertions, 3 deletions
diff --git a/changelogs/fragments/l3_interfaces-support.yaml b/changelogs/fragments/l3_interfaces-support.yaml
new file mode 100644
index 00000000..41bcd07b
--- /dev/null
+++ b/changelogs/fragments/l3_interfaces-support.yaml
@@ -0,0 +1,3 @@
+---
+minor_changes:
+ - vyos-l3_interface_support - Add support for Tunnel, Bridge and Dummy interfaces. (https://github.com/ansible-collections/vyos.vyos/issues/265)
diff --git a/galaxy.yml b/galaxy.yml
index fb02e073..d2d6ce3d 100644
--- a/galaxy.yml
+++ b/galaxy.yml
@@ -11,4 +11,4 @@ readme: README.md
repository: https://github.com/ansible-collections/vyos.vyos
issues: https://github.com/ansible-collections/vyos.vyos/issues
tags: [vyos, networking]
-version: 4.0.3-dev
+version: 4.1.0-dev
diff --git a/plugins/module_utils/network/vyos/facts/interfaces/interfaces.py b/plugins/module_utils/network/vyos/facts/interfaces/interfaces.py
index 9fd00c1e..51c3a10a 100644
--- a/plugins/module_utils/network/vyos/facts/interfaces/interfaces.py
+++ b/plugins/module_utils/network/vyos/facts/interfaces/interfaces.py
@@ -59,7 +59,7 @@ class InterfacesFacts(object):
objs = []
interface_names = findall(
- r"^set interfaces (?:ethernet|bonding|vti|loopback|vxlan|openvpn|wireguard) (?:\'*)(\S+)(?:\'*)",
+ r"^set interfaces (?:ethernet|bonding|bridge|dummy|tunnel|vti|loopback|vxlan|openvpn|wireguard) (?:\'*)(\S+)(?:\'*)",
data,
M,
)
diff --git a/plugins/module_utils/network/vyos/facts/l3_interfaces/l3_interfaces.py b/plugins/module_utils/network/vyos/facts/l3_interfaces/l3_interfaces.py
index ebfab030..845d79e7 100644
--- a/plugins/module_utils/network/vyos/facts/l3_interfaces/l3_interfaces.py
+++ b/plugins/module_utils/network/vyos/facts/l3_interfaces/l3_interfaces.py
@@ -60,7 +60,7 @@ class L3_interfacesFacts(object):
# operate on a collection of resource x
objs = []
interface_names = re.findall(
- r"set interfaces (?:ethernet|bonding|vti|vxlan) (?:\'*)(\S+)(?:\'*)",
+ r"set interfaces (?:ethernet|bonding|bridge|dummy|tunnel|vti|vxlan) (?:\'*)(\S+)(?:\'*)",
data,
re.M,
)
diff --git a/plugins/module_utils/network/vyos/utils/utils.py b/plugins/module_utils/network/vyos/utils/utils.py
index 4d447448..d2ca7038 100644
--- a/plugins/module_utils/network/vyos/utils/utils.py
+++ b/plugins/module_utils/network/vyos/utils/utils.py
@@ -40,6 +40,12 @@ def get_interface_type(interface):
return "openvpn"
elif interface.startswith("wg"):
return "wireguard"
+ elif interface.startswith("tun"):
+ return "tunnel"
+ elif interface.startswith("br"):
+ return "bridge"
+ elif interface.startswith("dum"):
+ return "dummy"
def dict_delete(base, comparable):