2019-12-08 00:29:43 -05:00
|
|
|
<?xml version="1.0" encoding="UTF-8" ?>
|
2019-12-08 05:52:47 -05:00
|
|
|
<xs:schema targetNamespace="https://aif-ng.io/"
|
|
|
|
xmlns="https://aif-ng.io/"
|
|
|
|
xmlns:aif="https://aif-ng.io/"
|
2019-12-08 00:29:43 -05:00
|
|
|
xmlns:xs="http://www.w3.org/2001/XMLSchema"
|
|
|
|
elementFormDefault="qualified"
|
2019-12-08 14:57:32 -05:00
|
|
|
attributeFormDefault="unqualified">
|
2019-12-08 00:29:43 -05:00
|
|
|
|
2019-12-10 07:00:13 -05:00
|
|
|
<xs:include schemaLocation="../lib/types/aif.xsd"/>
|
2019-12-08 01:42:33 -05:00
|
|
|
|
2019-12-08 02:07:21 -05:00
|
|
|
<!-- ROOT -->
|
|
|
|
<xs:element name="aif">
|
|
|
|
<xs:complexType>
|
|
|
|
<xs:all>
|
|
|
|
<!-- BEGIN BOOTSTRAP -->
|
|
|
|
<xs:element name="bootstrap" minOccurs="1" maxOccurs="1">
|
|
|
|
<xs:complexType>
|
|
|
|
<xs:all>
|
2019-12-12 22:26:08 -05:00
|
|
|
<xs:element name="tarball" minOccurs="1" maxOccurs="1" type="t_net_generic_resource"/>
|
2019-12-11 03:40:06 -05:00
|
|
|
<xs:element name="verify" minOccurs="0" maxOccurs="1" type="t_sys_verifyfile"/>
|
2019-12-08 02:07:21 -05:00
|
|
|
</xs:all>
|
|
|
|
</xs:complexType>
|
|
|
|
</xs:element>
|
|
|
|
<!-- END BOOTSTRAP -->
|
|
|
|
<!-- BEGIN STORAGE -->
|
|
|
|
<xs:element name="storage" minOccurs="1" maxOccurs="1">
|
|
|
|
<xs:complexType>
|
|
|
|
<xs:all>
|
|
|
|
<!-- BEGIN BLOCKDEVICES -->
|
|
|
|
<xs:element name="blockDevices" minOccurs="0" maxOccurs="1">
|
|
|
|
<xs:complexType>
|
|
|
|
<xs:sequence minOccurs="1" maxOccurs="unbounded">
|
2019-12-10 07:00:13 -05:00
|
|
|
<xs:element name="disk" minOccurs="1" maxOccurs="unbounded" type="t_linux_disk">
|
2019-12-08 02:07:21 -05:00
|
|
|
<xs:unique name="uniq_diskdev">
|
|
|
|
<xs:selector xpath="aif:disk"/>
|
|
|
|
<xs:field xpath="@device"/>
|
|
|
|
</xs:unique>
|
|
|
|
</xs:element>
|
|
|
|
</xs:sequence>
|
|
|
|
</xs:complexType>
|
|
|
|
</xs:element>
|
|
|
|
<!-- END DISK -->
|
|
|
|
<!-- BEGIN FILESYSTEMS -->
|
|
|
|
<xs:element name="fileSystems" minOccurs="1" maxOccurs="1">
|
|
|
|
<xs:complexType>
|
|
|
|
<xs:sequence>
|
|
|
|
<xs:element name="fs" minOccurs="1" maxOccurs="unbounded">
|
|
|
|
<xs:complexType>
|
|
|
|
<xs:sequence>
|
|
|
|
<xs:element name="opt" minOccurs="0" maxOccurs="unbounded"
|
2019-12-10 07:00:13 -05:00
|
|
|
type="t_std_cmdopts"/>
|
2019-12-08 02:07:21 -05:00
|
|
|
</xs:sequence>
|
|
|
|
<xs:attribute name="id" type="xs:ID" use="required"/>
|
|
|
|
<xs:attribute name="source" type="xs:IDREF" use="required"/>
|
|
|
|
<!-- We validate this in-code because there's way too many and
|
|
|
|
it's way too variable per-host. -->
|
2019-12-10 07:00:13 -05:00
|
|
|
<xs:attribute name="type" type="t_std_nonempty" use="required"/>
|
2019-12-08 02:07:21 -05:00
|
|
|
</xs:complexType>
|
|
|
|
</xs:element>
|
|
|
|
</xs:sequence>
|
|
|
|
</xs:complexType>
|
|
|
|
</xs:element>
|
|
|
|
<!-- END FILESYSTEMS -->
|
|
|
|
<!-- BEGIN LUKS -->
|
2019-12-10 07:00:13 -05:00
|
|
|
<xs:element name="luks" minOccurs="0" maxOccurs="1" type="t_linux_luks">
|
2019-12-08 02:07:21 -05:00
|
|
|
<xs:unique name="uniq_luks_name">
|
|
|
|
<xs:selector xpath="aif:luksDev"/>
|
|
|
|
<xs:field xpath="@name"/>
|
|
|
|
</xs:unique>
|
|
|
|
</xs:element>
|
|
|
|
<!-- END LUKS -->
|
|
|
|
<!-- BEGIN LVM -->
|
2019-12-10 07:00:13 -05:00
|
|
|
<xs:element name="lvm" minOccurs="0" maxOccurs="1" type="t_linux_lvm">
|
2019-12-08 02:07:21 -05:00
|
|
|
<xs:unique name="uniq_vg_names">
|
|
|
|
<xs:selector xpath="aif:volumeGroup"/>
|
|
|
|
<xs:field xpath="@name"/>
|
|
|
|
</xs:unique>
|
|
|
|
<xs:unique name="uniq_vg_lv">
|
|
|
|
<xs:selector xpath=".//aif:lv"/>
|
|
|
|
<xs:field xpath="@name"/>
|
|
|
|
</xs:unique>
|
|
|
|
<xs:unique name="uniq_vg_pv">
|
|
|
|
<xs:selector xpath=".//aif:pv"/>
|
|
|
|
<xs:field xpath="@source"/>
|
|
|
|
</xs:unique>
|
|
|
|
</xs:element>
|
|
|
|
<!-- END LVM -->
|
|
|
|
<!-- BEGIN MDADM -->
|
2019-12-10 07:00:13 -05:00
|
|
|
<xs:element name="mdadm" minOccurs="0" maxOccurs="1" type="t_linux_mdadm">
|
2019-12-08 02:07:21 -05:00
|
|
|
<xs:unique name="uniq_array_name">
|
|
|
|
<xs:selector xpath="aif:array"/>
|
|
|
|
<xs:field xpath="@name"/>
|
|
|
|
</xs:unique>
|
|
|
|
</xs:element>
|
|
|
|
<!-- END MDADM -->
|
|
|
|
<!-- BEGIN MOUNTPOINTS -->
|
2019-12-10 07:00:13 -05:00
|
|
|
<xs:element name="mountPoints" minOccurs="1" maxOccurs="1" type="t_linux_mounts">
|
2019-12-08 05:30:06 -05:00
|
|
|
<xs:unique name="uniq_mnts_src">
|
|
|
|
<xs:selector xpath="aif:mount"/>
|
|
|
|
<xs:field xpath="@source"/>
|
|
|
|
</xs:unique>
|
|
|
|
<xs:unique name="uniq_mnts_tgt">
|
|
|
|
<xs:selector xpath="aif:mount"/>
|
|
|
|
<xs:field xpath="@target"/>
|
|
|
|
</xs:unique>
|
2019-12-08 02:07:21 -05:00
|
|
|
</xs:element>
|
|
|
|
<!-- END MOUNTPOINTS -->
|
|
|
|
</xs:all>
|
|
|
|
</xs:complexType>
|
|
|
|
</xs:element>
|
|
|
|
<!-- END STORAGE -->
|
|
|
|
<!-- BEGIN NETWORK -->
|
|
|
|
<xs:element name="network" minOccurs="1" maxOccurs="1">
|
|
|
|
<xs:complexType>
|
|
|
|
<xs:choice minOccurs="1" maxOccurs="unbounded">
|
2019-12-10 07:00:13 -05:00
|
|
|
<xs:element name="ethernet" type="t_aif_iface" minOccurs="0" maxOccurs="unbounded"/>
|
|
|
|
<xs:element name="wireless" type="t_aif_iface_wifi" minOccurs="0" maxOccurs="unbounded"/>
|
2019-12-08 02:07:21 -05:00
|
|
|
</xs:choice>
|
|
|
|
<!-- It's nearly impossible to validate FQDNs/hostnames in XSD, so we do it in-code. -->
|
2019-12-10 07:00:13 -05:00
|
|
|
<xs:attribute name="hostname" type="t_std_nonempty" use="required"/>
|
|
|
|
<xs:attribute name="provider" type="t_aif_netprov" use="optional" default="networkd"/>
|
|
|
|
<xs:attribute name="dhcpClient" type="t_aif_dhcp_clients" use="optional" default="dhcpcd"/>
|
2019-12-08 02:07:21 -05:00
|
|
|
</xs:complexType>
|
|
|
|
<xs:unique name="uniq_iface_eth">
|
|
|
|
<xs:selector xpath="aif:ethernet|aif:wireless"/>
|
|
|
|
<xs:field xpath="@device"/>
|
|
|
|
</xs:unique>
|
|
|
|
</xs:element>
|
|
|
|
<!-- END NETWORK -->
|
|
|
|
<!-- BEGIN SYSTEM -->
|
|
|
|
<xs:element name="system" maxOccurs="1" minOccurs="1">
|
|
|
|
<xs:complexType>
|
|
|
|
<xs:all>
|
2019-12-10 07:00:13 -05:00
|
|
|
<xs:element name="rootPassword" minOccurs="0" maxOccurs="1" type="t_linux_nixpass"/>
|
2019-12-08 02:07:21 -05:00
|
|
|
<xs:element name="locales" minOccurs="1" maxOccurs="1">
|
|
|
|
<xs:complexType>
|
|
|
|
<xs:sequence minOccurs="1" maxOccurs="unbounded">
|
|
|
|
<xs:element name="locale" minOccurs="1" maxOccurs="unbounded">
|
|
|
|
<xs:complexType>
|
|
|
|
<xs:simpleContent>
|
|
|
|
<xs:extension base="xs:token">
|
2019-12-10 07:00:13 -05:00
|
|
|
<xs:attribute name="name" type="t_std_nonempty" use="required"/>
|
2019-12-08 02:07:21 -05:00
|
|
|
</xs:extension>
|
|
|
|
</xs:simpleContent>
|
|
|
|
</xs:complexType>
|
|
|
|
</xs:element>
|
|
|
|
</xs:sequence>
|
|
|
|
</xs:complexType>
|
|
|
|
</xs:element>
|
|
|
|
<xs:element name="console" minOccurs="0" maxOccurs="1">
|
|
|
|
<!-- vconsole.conf(5) -->
|
|
|
|
<!-- timezone and kbd/xkbd are validated in-code. -->
|
|
|
|
<xs:complexType>
|
|
|
|
<xs:all minOccurs="1">
|
|
|
|
<!-- These are validated in-code -->
|
|
|
|
<xs:element name="keyboard" minOccurs="1" maxOccurs="1">
|
|
|
|
<xs:complexType>
|
|
|
|
<xs:choice>
|
|
|
|
<xs:element name="map" minOccurs="0" maxOccurs="1"
|
2019-12-10 07:00:13 -05:00
|
|
|
type="t_std_nonempty" default="us"/>
|
2019-12-08 02:07:21 -05:00
|
|
|
<xs:element name="toggle" minOccurs="0" maxOccurs="1"
|
2019-12-10 07:00:13 -05:00
|
|
|
type="t_std_nonempty"/>
|
2019-12-08 02:07:21 -05:00
|
|
|
</xs:choice>
|
|
|
|
</xs:complexType>
|
|
|
|
</xs:element>
|
|
|
|
<xs:element name="text" minOccurs="0" maxOccurs="1">
|
|
|
|
<xs:complexType>
|
|
|
|
<xs:choice minOccurs="1" maxOccurs="3">
|
|
|
|
<xs:element name="font" minOccurs="0" maxOccurs="1"
|
2019-12-10 07:00:13 -05:00
|
|
|
type="t_std_nonempty"/>
|
2019-12-08 02:07:21 -05:00
|
|
|
<xs:element name="map" minOccurs="0" maxOccurs="1"
|
2019-12-10 07:00:13 -05:00
|
|
|
type="t_std_nonempty"/>
|
2019-12-08 02:07:21 -05:00
|
|
|
<xs:element name="unicodeMap" minOccurs="0" maxOccurs="1"
|
2019-12-10 07:00:13 -05:00
|
|
|
type="t_std_nonempty"/>
|
2019-12-08 02:07:21 -05:00
|
|
|
</xs:choice>
|
|
|
|
</xs:complexType>
|
|
|
|
</xs:element>
|
|
|
|
</xs:all>
|
|
|
|
</xs:complexType>
|
|
|
|
</xs:element>
|
|
|
|
<xs:element name="users" minOccurs="0" maxOccurs="1">
|
|
|
|
<xs:complexType>
|
|
|
|
<xs:sequence>
|
2019-12-08 03:05:00 -05:00
|
|
|
<xs:element name="user" minOccurs="1" maxOccurs="unbounded"
|
2019-12-10 07:00:13 -05:00
|
|
|
type="t_linux_user"/>
|
2019-12-08 02:07:21 -05:00
|
|
|
</xs:sequence>
|
|
|
|
</xs:complexType>
|
|
|
|
<xs:unique name="uniq_usr">
|
|
|
|
<xs:selector xpath="aif:user"/>
|
|
|
|
<xs:field xpath="@name"/>
|
|
|
|
</xs:unique>
|
|
|
|
</xs:element>
|
|
|
|
<xs:element name="services" minOccurs="0" maxOccurs="1">
|
|
|
|
<xs:complexType>
|
|
|
|
<xs:sequence>
|
2019-12-08 03:05:00 -05:00
|
|
|
<xs:element name="service" minOccurs="1" maxOccurs="unbounded"
|
2019-12-10 07:00:13 -05:00
|
|
|
type="t_linux_service"/>
|
2019-12-08 02:07:21 -05:00
|
|
|
</xs:sequence>
|
|
|
|
</xs:complexType>
|
2019-12-08 05:30:06 -05:00
|
|
|
<xs:unique name="uniq_svc">
|
|
|
|
<xs:selector xpath="aif:service"/>
|
|
|
|
<xs:field xpath="@name"/>
|
|
|
|
<xs:field xpath="@status"/>
|
|
|
|
</xs:unique>
|
2019-12-08 02:07:21 -05:00
|
|
|
</xs:element>
|
|
|
|
</xs:all>
|
2019-12-10 07:00:13 -05:00
|
|
|
<xs:attribute name="timezone" type="t_std_nonempty" use="optional" default="UTC"/>
|
2019-12-08 02:07:21 -05:00
|
|
|
</xs:complexType>
|
|
|
|
</xs:element>
|
|
|
|
<!-- END SYSTEM -->
|
|
|
|
<!-- BEGIN PACMAN -->
|
|
|
|
<xs:element name="pacman" maxOccurs="1" minOccurs="1">
|
|
|
|
<xs:complexType>
|
|
|
|
<xs:sequence>
|
2020-01-02 16:08:05 -05:00
|
|
|
<xs:element name="mirrorList" maxOccurs="1" minOccurs="0">
|
|
|
|
<xs:complexType>
|
|
|
|
<xs:sequence>
|
|
|
|
<xs:element name="mirror" type="t_aif_pacuri" maxOccurs="unbounded"
|
|
|
|
minOccurs="1"/>
|
|
|
|
</xs:sequence>
|
|
|
|
</xs:complexType>
|
|
|
|
</xs:element>
|
2019-12-08 02:07:21 -05:00
|
|
|
<xs:element name="repos" maxOccurs="1" minOccurs="1">
|
|
|
|
<xs:complexType>
|
|
|
|
<xs:sequence>
|
|
|
|
<xs:element name="repo" maxOccurs="unbounded" minOccurs="1">
|
|
|
|
<xs:complexType>
|
2020-01-02 14:06:33 -05:00
|
|
|
<xs:choice minOccurs="1" maxOccurs="unbounded">
|
|
|
|
<xs:element name="include" minOccurs="0" maxOccurs="unbounded"
|
|
|
|
type="t_aif_pacuri"/>
|
|
|
|
<xs:element name="mirror" minOccurs="0" maxOccurs="unbounded"
|
|
|
|
type="t_aif_pacuri"/>
|
|
|
|
</xs:choice>
|
2019-12-10 07:00:13 -05:00
|
|
|
<xs:attribute name="name" type="t_std_nonempty" use="required"/>
|
2020-01-02 16:08:05 -05:00
|
|
|
<xs:attribute name="enabled" type="xs:boolean" use="optional"
|
|
|
|
default="true"/>
|
2019-12-30 20:14:29 -05:00
|
|
|
<xs:attribute name="sigLevel" type="t_std_nonempty" use="optional"/>
|
2019-12-08 02:07:21 -05:00
|
|
|
</xs:complexType>
|
|
|
|
</xs:element>
|
|
|
|
</xs:sequence>
|
|
|
|
</xs:complexType>
|
|
|
|
<xs:unique name="uniq_repo">
|
|
|
|
<xs:selector xpath="aif:repo"/>
|
|
|
|
<xs:field xpath="@name"/>
|
|
|
|
</xs:unique>
|
|
|
|
</xs:element>
|
|
|
|
<xs:element name="software" maxOccurs="1" minOccurs="0">
|
|
|
|
<xs:complexType>
|
|
|
|
<xs:sequence>
|
2019-12-08 03:05:00 -05:00
|
|
|
<xs:element name="package" maxOccurs="unbounded" minOccurs="1"
|
2019-12-10 07:00:13 -05:00
|
|
|
type="t_linux_package"/>
|
2019-12-08 02:07:21 -05:00
|
|
|
</xs:sequence>
|
|
|
|
</xs:complexType>
|
|
|
|
<xs:unique name="uniq_mirror">
|
|
|
|
<xs:selector xpath="aif:mirrorList"/>
|
|
|
|
<xs:field xpath="mirror"/>
|
|
|
|
</xs:unique>
|
|
|
|
<xs:unique name="uniq_pkg">
|
|
|
|
<xs:selector xpath="aif:software"/>
|
|
|
|
<xs:field xpath="package"/>
|
|
|
|
</xs:unique>
|
|
|
|
</xs:element>
|
|
|
|
</xs:sequence>
|
2019-12-10 07:00:13 -05:00
|
|
|
<xs:attribute name="command" type="t_std_nonempty" use="optional" default="pacman -S"/>
|
2019-12-08 02:07:21 -05:00
|
|
|
</xs:complexType>
|
|
|
|
</xs:element>
|
|
|
|
<!-- END PACMAN -->
|
|
|
|
<!-- BEGIN BOOTLOADER -->
|
|
|
|
<xs:element name="bootloader" maxOccurs="1" minOccurs="1">
|
|
|
|
<xs:complexType>
|
2019-12-10 07:00:13 -05:00
|
|
|
<xs:attribute name="type" type="t_aif_bootloaders" use="required"/>
|
|
|
|
<xs:attribute name="target" type="t_std_nonempty" use="required"/>
|
2020-03-27 09:03:43 -04:00
|
|
|
<xs:attribute name="efi" type="xs:boolean" use="optional" default="true"/>
|
2019-12-08 02:07:21 -05:00
|
|
|
</xs:complexType>
|
|
|
|
</xs:element>
|
|
|
|
<!-- END BOOTLOADER -->
|
|
|
|
<!--- BEGIN SCRIPTS -->
|
|
|
|
<xs:element name="scripts" maxOccurs="1" minOccurs="0">
|
|
|
|
<xs:complexType>
|
2019-12-12 22:26:08 -05:00
|
|
|
<xs:choice minOccurs="1" maxOccurs="unbounded">
|
|
|
|
<xs:element name="pre" minOccurs="0" maxOccurs="unbounded" type="t_aif_script"/>
|
|
|
|
<xs:element name="pkg" minOccurs="0" maxOccurs="unbounded" type="t_aif_script"/>
|
|
|
|
<xs:element name="post" minOccurs="0" maxOccurs="unbounded" type="t_aif_script"/>
|
|
|
|
</xs:choice>
|
2019-12-08 02:07:21 -05:00
|
|
|
</xs:complexType>
|
|
|
|
</xs:element>
|
|
|
|
<!-- END SCRIPTS -->
|
|
|
|
</xs:all>
|
2019-12-10 07:00:13 -05:00
|
|
|
<xs:attribute name="chrootPath" type="t_unix_filepath" use="required"/>
|
2019-12-08 02:07:21 -05:00
|
|
|
<xs:attribute name="reboot" type="xs:boolean" use="optional" default="false"/>
|
|
|
|
</xs:complexType>
|
|
|
|
</xs:element>
|
|
|
|
|
2019-12-08 00:29:43 -05:00
|
|
|
</xs:schema>
|