diff --git a/changelogs/fragments/129-include-plugin-interfaces-for-assignments.yml b/changelogs/fragments/129-include-plugin-interfaces-for-assignments.yml new file mode 100644 index 00000000..f1a8b01f --- /dev/null +++ b/changelogs/fragments/129-include-plugin-interfaces-for-assignments.yml @@ -0,0 +1,3 @@ +--- +bugfixes: + - interfaces_assignments - Include plugin interfaces such as VLAN, VXLANs etc. in validations. diff --git a/plugins/module_utils/interfaces_assignments_utils.py b/plugins/module_utils/interfaces_assignments_utils.py index be1f0b5f..56d818fd 100644 --- a/plugins/module_utils/interfaces_assignments_utils.py +++ b/plugins/module_utils/interfaces_assignments_utils.py @@ -308,9 +308,16 @@ def get_interfaces(self) -> List[InterfaceAssignment]: "php_requirements" ] php_command = """ + /* get physical network interfaces */ foreach (get_interface_list() as $key => $item) { echo $key.','; } + /* get virtual network interfaces */ + foreach (plugins_devices() as $item){ + foreach ($item["names"] as $key => $if ) { + echo $key.','; + } + } """ # run php function