summaryrefslogtreecommitdiff
path: root/interface-definitions/include/constraint/dependent-warning-interface-name.xml.i
diff options
context:
space:
mode:
authorJohn Estabrook <jestabro@vyos.io>2026-09-15 13:51:30 -0500
committerJohn Estabrook <jestabro@vyos.io>2026-10-08 07:41:04 -0500
commitdf7c3fc0017fb27d2945ac2818ac2d5fc343ca37 (patch)
treef21d7c3ece96d8377a99b53d47a99cd576548787 /interface-definitions/include/constraint/dependent-warning-interface-name.xml.i
parentec64edcb5b014125dfd5574f40704423b0c0831b (diff)
downloadvyos-1x-df7c3fc0017fb27d2945ac2818ac2d5fc343ca37.tar.gz
vyos-1x-df7c3fc0017fb27d2945ac2818ac2d5fc343ca37.zip
T7886: add basic cases of reverse interface dependency verification
Add cases for which a config mode script calls verify_interface_exists, excluding those of dynamic_interface_pattern, to be handled separately. The dependency verification raises error, resp., gives a warning, when verify_interface_exists is called with warning_only=False, resp., True. These are the critical cases that motivated the original design, for if a removal of an interface is allowed, a subsequent reboot will raise ConfigError on config load and invalidate the config subtree for that component.
Diffstat (limited to 'interface-definitions/include/constraint/dependent-warning-interface-name.xml.i')
-rw-r--r--interface-definitions/include/constraint/dependent-warning-interface-name.xml.i7
1 files changed, 7 insertions, 0 deletions
diff --git a/interface-definitions/include/constraint/dependent-warning-interface-name.xml.i b/interface-definitions/include/constraint/dependent-warning-interface-name.xml.i
new file mode 100644
index 000000000..bc646c3c9
--- /dev/null
+++ b/interface-definitions/include/constraint/dependent-warning-interface-name.xml.i
@@ -0,0 +1,7 @@
+<!-- include start from constraint/dependent-warning-interface-name.xml.i -->
+<constraint>
+ <regex>(bond|br|dum|en|ersp|eth|gnv|ifb|ipoe|lan|l2tp|l2tpeth|macsec|peth|ppp|pppoe|pptp|sstp|sstpc|tun|veth|vpptap|vpptun|vti|vtun|vxlan|wg|wlan|wwan)[0-9]+(.\d+)?|pod-[-_a-zA-Z0-9]{1,11}|lo</regex>
+ <validator name="interface-exists"/>
+</constraint>
+<dependency kind="interface" alert="warning"/>
+<!-- include end -->