diff --git a/alterator-net-functions/alterator-net-functions b/alterator-net-functions/alterator-net-functions index cc5ec0f..d3607b9 100644 --- a/alterator-net-functions/alterator-net-functions +++ b/alterator-net-functions/alterator-net-functions @@ -624,6 +624,13 @@ list_bond() list_etcnet_iface_filtered "$dir" __filter_iface_type "bond" } +list_vlan() +{ + local dir="${1:-$etcnet_iface_dir}" + + list_etcnet_iface_filtered "$dir" __filter_iface_type "vlan" +} + list_eth() { netdev_list| @@ -814,6 +821,16 @@ list_bond_with_cache() } | sort -u | __filter_out_removed_ifaces "$cachedir" } +list_vlan_with_cache() +{ + local cachedir="$1"; shift + + { + [ -d "$cachedir" ] && list_vlan "$cachedir" + list_vlan "$etcnet_iface_dir" + } | sort -uV | __filter_out_removed_ifaces "$cachedir" +} + # list_static_iface [ ip_version ] list_static_iface_with_cache() {