tag:
priority: 310
type: txt
help: Bridge interface name
val_help: <brN>; Bridge interface name
syntax:expression: pattern $VAR(@) "^br[0-9]+$" ; "Must be (br0 - br999)"

create: /sbin/brctl addbr $VAR(@)
	if [ -n "$VAR(mac/@)" ] ; then
	   sudo ip li set dev $VAR(@) address $VAR(mac/@)
	fi
        sudo ip link set $VAR(@) up

delete: if ! ${vyos_conf_scripts_dir}/bridge_has_members.py $VAR(@); then
          exit 1;
        fi
        sudo ip link set $VAR(@) down;
        sudo /sbin/brctl delbr $VAR(@);
