iface naming tweaks

This commit is contained in:
brent s. 2020-05-13 13:42:44 -04:00
parent 0be3cfc386
commit 36991914d9
Signed by: bts
GPG Key ID: 8C004C2F93481F6B
1 changed files with 437 additions and 430 deletions

View File

@ -82,18 +82,25 @@
</xs:simpleType>

<xs:simpleType name="t_linux_iface_name">
<xs:union memberTypes="t_linux_iface_name_legacy t_linux_iface_name_predictable"/>
</xs:simpleType>

<xs:simpleType name="t_linux_iface_name_legacy">
<xs:restriction base="xs:token">
<!-- I have no idea if this will work. TODO: simplify, validate in-code. -->
<xs:pattern value="(eth|wl(an)?)[0-9]*"/>
<xs:whiteSpace value="collapse"/>
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="t_linux_iface_name_predictable">
<!-- I have no idea if this will work. You'll probably want to validate in-code. -->
<!--
"New" predictable iface naming.
https://github.com/systemd/systemd/blob/master/src/udev/udev-builtin-net_id.c.
-->
<xs:restriction base="xs:token">
<xs:pattern
value="((en|sl|wl|ww)(b[0-9]+|c[a-z0-9]|o[0-9]+(n.*(d.*)?)?|s[0-9]+(f.*)?([nd].*)?|x([A-Fa-f0-9]:){5}[A-Fa-f0-9]|(P.*)?p[0-9]+s[0-9]+(([fnd].*)|u.*)?))"/>
<!--
Legacy naming.
-->
<xs:pattern value="(eth|wl(an)?)[0-9]*"/>
<xs:whiteSpace value="collapse"/>
</xs:restriction>
</xs:simpleType>