getting....there.... (i hope)

This commit is contained in:
brent s. 2019-12-09 08:29:38 -05:00
parent fb9ce235fa
commit e9405db556
8 changed files with 129 additions and 197 deletions

View File

@ -1,26 +1,16 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<xs:schema targetNamespace="https://schema.xml.r00t2.io/lib/types/aif.xsd" <xs:schema xmlns:t_aif="https://schema.xml.r00t2.io/lib/types/aif.xsd"
xmlns="https://schema.xml.r00t2.io/lib/types/aif.xsd"
xmlns:t_aif="https://schema.xml.r00t2.io/lib/types/aif.xsd"
xmlns:linux="https://schema.xml.r00t2.io/lib/types/linux.xsd"
xmlns:net="https://schema.xml.r00t2.io/lib/types/net.xsd"
xmlns:std="https://schema.xml.r00t2.io/lib/types/std.xsd"
xmlns:unix="https://schema.xml.r00t2.io/lib/types/unix.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="unqualified" elementFormDefault="unqualified"
attributeFormDefault="unqualified"> attributeFormDefault="unqualified">


<xs:import namespace="https://schema.xml.r00t2.io/lib/types/linux.xsd" <xs:include schemaLocation="./linux.xsd"/>
schemaLocation="./linux.xsd"/> <xs:include schemaLocation="./net.xsd"/>
<xs:import namespace="https://schema.xml.r00t2.io/lib/types/net.xsd" <xs:include schemaLocation="./std.xsd"/>
schemaLocation="./net.xsd"/> <xs:include schemaLocation="./unix.xsd"/>
<xs:import namespace="https://schema.xml.r00t2.io/lib/types/std.xsd"
schemaLocation="./std.xsd"/>
<xs:import namespace="https://schema.xml.r00t2.io/lib/types/unix.xsd"
schemaLocation="./unix.xsd"/>


<xs:simpleType name="t_auto_ip6"> <xs:simpleType name="t_auto_ip6">
<xs:union memberTypes="net:t_auto_ip6"> <xs:union memberTypes="t_auto_ip6">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:enumeration value="false"/> <xs:enumeration value="false"/>
@ -66,9 +56,8 @@
<xs:element name="address" minOccurs="0" maxOccurs="unbounded"> <xs:element name="address" minOccurs="0" maxOccurs="unbounded">
<xs:complexType> <xs:complexType>
<xs:simpleContent> <xs:simpleContent>
<xs:extension base="net:t_qualified_addr_ip4"> <xs:extension base="t_qualified_addr_ip4">
<xs:attribute name="gateway" <xs:attribute name="gateway" type="t_addr_ip4"
type="net:t_addr_ip4"
use="optional"/> use="optional"/>
</xs:extension> </xs:extension>
</xs:simpleContent> </xs:simpleContent>
@ -88,20 +77,18 @@
<xs:element name="address" minOccurs="0" maxOccurs="unbounded"> <xs:element name="address" minOccurs="0" maxOccurs="unbounded">
<xs:complexType> <xs:complexType>
<xs:simpleContent> <xs:simpleContent>
<xs:extension base="net:t_qualified_addr_ip6"> <xs:extension base="t_qualified_addr_ip6">
<xs:attribute name="gateway" <xs:attribute name="gateway" type="t_addr_ip6"
type="net:t_addr_ip6"
use="optional"/> use="optional"/>
</xs:extension> </xs:extension>
</xs:simpleContent> </xs:simpleContent>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
</xs:sequence> </xs:sequence>
<xs:attribute name="auto" type="net:t_auto_ip6" <xs:attribute name="auto" type="t_auto_ip6" use="optional" default="slaac"/>
use="optional" default="slaac"/>
</xs:complexType> </xs:complexType>
<xs:unique name="uniq_ipv6_addr"> <xs:unique name="uniq_ipv6_addr">
<xs:selector xpath="t_aif:address"/> <xs:selector xpath="address"/>
<xs:field xpath="."/> <xs:field xpath="."/>
</xs:unique> </xs:unique>
</xs:element> </xs:element>
@ -113,7 +100,7 @@
<xs:complexType> <xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="unbounded"> <xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:choice minOccurs="1" maxOccurs="unbounded"> <xs:choice minOccurs="1" maxOccurs="unbounded">
<xs:element name="resolver" minOccurs="1" maxOccurs="unbounded" type="net:t_both_addr"/> <xs:element name="resolver" minOccurs="1" maxOccurs="unbounded" type="t_both_addr"/>
<xs:element name="ipv4" minOccurs="0" maxOccurs="1"> <xs:element name="ipv4" minOccurs="0" maxOccurs="1">
<xs:complexType> <xs:complexType>
<xs:attribute name="auto" type="xs:boolean" <xs:attribute name="auto" type="xs:boolean"
@ -140,9 +127,9 @@
<xs:element name="route" minOccurs="0" maxOccurs="unbounded"> <xs:element name="route" minOccurs="0" maxOccurs="unbounded">
<xs:complexType> <xs:complexType>
<xs:simpleContent> <xs:simpleContent>
<xs:extension base="net:t_qualified_addr_ip4"> <xs:extension base="t_qualified_addr_ip4">
<xs:attribute name="gateway" <xs:attribute name="gateway"
type="net:t_addr_ip4" type="t_addr_ip4"
use="required"/> use="required"/>
</xs:extension> </xs:extension>
</xs:simpleContent> </xs:simpleContent>
@ -152,7 +139,7 @@
<xs:attribute name="auto" type="xs:boolean" use="optional" default="true"/> <xs:attribute name="auto" type="xs:boolean" use="optional" default="true"/>
</xs:complexType> </xs:complexType>
<xs:unique name="uniq_ipv4_route"> <xs:unique name="uniq_ipv4_route">
<xs:selector xpath="t_aif:route"/> <xs:selector xpath="route"/>
<xs:field xpath="."/> <xs:field xpath="."/>
</xs:unique> </xs:unique>
</xs:element> </xs:element>
@ -162,9 +149,9 @@
<xs:element name="address" minOccurs="0" maxOccurs="unbounded"> <xs:element name="address" minOccurs="0" maxOccurs="unbounded">
<xs:complexType> <xs:complexType>
<xs:simpleContent> <xs:simpleContent>
<xs:extension base="net:t_qualified_addr_ip6"> <xs:extension base="t_qualified_addr_ip6">
<xs:attribute name="gateway" <xs:attribute name="gateway"
type="net:t_addr_ip6" type="t_addr_ip6"
use="required"/> use="required"/>
</xs:extension> </xs:extension>
</xs:simpleContent> </xs:simpleContent>
@ -180,7 +167,7 @@
<xs:attribute name="auto" type="xs:boolean" use="optional" default="true"/> <xs:attribute name="auto" type="xs:boolean" use="optional" default="true"/>
</xs:complexType> </xs:complexType>
<xs:unique name="uniq_ipv6_route"> <xs:unique name="uniq_ipv6_route">
<xs:selector xpath="t_aif:route"/> <xs:selector xpath="route"/>
<xs:field xpath="."/> <xs:field xpath="."/>
</xs:unique> </xs:unique>
</xs:element> </xs:element>
@ -191,13 +178,13 @@
</xs:choice> </xs:choice>
</xs:sequence> </xs:sequence>
<xs:attribute name="id" type="xs:ID" use="required"/> <xs:attribute name="id" type="xs:ID" use="required"/>
<xs:attribute name="device" type="linux:t_iface_name" use="required"/> <xs:attribute name="device" type="t_iface_name" use="required"/>
<xs:attribute name="defroute" type="xs:boolean" use="optional" default="false"/> <xs:attribute name="defroute" type="xs:boolean" use="optional" default="false"/>
<xs:attribute name="searchDomain" type="std:t_nonempty" use="optional"/> <xs:attribute name="searchDomain" type="t_nonempty" use="optional"/>
</xs:complexType> </xs:complexType>


<xs:simpleType name="t_iface_name"> <xs:simpleType name="t_iface_name">
<xs:union memberTypes="linux:t_iface_name"> <xs:union memberTypes="t_iface_name">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:enumeration value="auto"/> <xs:enumeration value="auto"/>
@ -210,18 +197,18 @@
<xs:complexContent> <xs:complexContent>
<xs:extension base="t_iface"> <xs:extension base="t_iface">
<xs:sequence> <xs:sequence>
<xs:element name="encryption" type="net:t_wifi_crypto" minOccurs="0" maxOccurs="1"/> <xs:element name="encryption" type="t_wifi_crypto" minOccurs="0" maxOccurs="1"/>
</xs:sequence> </xs:sequence>
<!-- TODO: SSID needs to support unicode chars in both XML(/XSD type=?) and program --> <!-- TODO: SSID needs to support unicode chars in both XML(/XSD type=?) and program -->
<xs:attribute name="essid" type="xs:string" use="required"/> <xs:attribute name="essid" type="xs:string" use="required"/>
<xs:attribute name="bssid" type="net:t_mac_addr" use="optional"/> <xs:attribute name="bssid" type="t_mac_addr" use="optional"/>
<xs:attribute name="hidden" type="xs:boolean" use="optional" default="false"/> <xs:attribute name="hidden" type="xs:boolean" use="optional" default="false"/>
</xs:extension> </xs:extension>
</xs:complexContent> </xs:complexContent>
</xs:complexType> </xs:complexType>


<xs:simpleType name="t_netproto"> <xs:simpleType name="t_netproto">
<xs:union memberTypes="net:t_netproto"> <xs:union memberTypes="t_netproto">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:enumeration value="both"/> <xs:enumeration value="both"/>

View File

@ -1,23 +1,15 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<xs:schema targetNamespace="https://schema.xml.r00t2.io/lib/types/bsd.xsd" <xs:schema xmlns:bsd="https://schema.xml.r00t2.io/lib/types/bsd.xsd"
xmlns="https://schema.xml.r00t2.io/lib/types/bsd.xsd"
xmlns:bsd="https://schema.xml.r00t2.io/lib/types/bsd.xsd"
xmlns:linux="https://schema.xml.r00t2.io/lib/types/linux.xsd"
xmlns:std="https://schema.xml.r00t2.io/lib/types/std.xsd"
xmlns:unix="https://schema.xml.r00t2.io/lib/types/bsd.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="unqualified" elementFormDefault="unqualified"
attributeFormDefault="unqualified"> attributeFormDefault="unqualified">


<xs:import namespace="https://schema.xml.r00t2.io/lib/types/linux.xsd" <xs:include schemaLocation="./linux.xsd"/>
schemaLocation="./linux.xsd"/> <xs:include schemaLocation="./std.xsd"/>
<xs:import namespace="https://schema.xml.r00t2.io/lib/types/std.xsd" <xs:include schemaLocation="./unix.xsd"/>
schemaLocation="./std.xsd"/>
<xs:import namespace="https://schema.xml.r00t2.io/lib/types/unix.xsd"
schemaLocation="./unix.xsd"/>


<xs:simpleType name="t_passwd_hashtypes"> <xs:simpleType name="t_passwd_hashtypes">
<xs:union memberTypes="linux:t_passwd_hashtypes"> <xs:union memberTypes="t_passwd_hashtypes">
<xs:simpleType> <xs:simpleType>
<xs:restriction> <xs:restriction>
<!-- <xs:enumeration value="des"/> --> <!-- <xs:enumeration value="des"/> -->
@ -30,7 +22,7 @@
</xs:simpleType> </xs:simpleType>


<xs:simpleType name="t_shadowhash"> <xs:simpleType name="t_shadowhash">
<xs:union memberTypes="linux:t_shadowhash"> <xs:union memberTypes="t_shadowhash">
<xs:simpleType> <xs:simpleType>
<xs:restriction> <xs:restriction>
<!-- Blowfish/bcrypt --> <!-- Blowfish/bcrypt -->

View File

@ -1,20 +1,11 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<xs:schema targetNamespace="https://schema.xml.r00t2.io/lib/types/linux.xsd" <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="https://schema.xml.r00t2.io/lib/types/linux.xsd"
xmlns:linux="https://schema.xml.r00t2.io/lib/types/linux.xsd"
xmlns:std="https://schema.xml.r00t2.io/lib/types/std.xsd"
xmlns:sys="https://schema.xml.r00t2.io/lib/types/sys.xsd"
xmlns:unix="https://schema.xml.r00t2.io/lib/types/unix.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="unqualified" elementFormDefault="unqualified"
attributeFormDefault="unqualified"> attributeFormDefault="unqualified">


<xs:import namespace="https://schema.xml.r00t2.io/lib/types/std.xsd" <xs:include schemaLocation="./std.xsd"/>
schemaLocation="./std.xsd"/> <xs:include schemaLocation="./sys.xsd"/>
<xs:import namespace="https://schema.xml.r00t2.io/lib/types/sys.xsd" <xs:include schemaLocation="./unix.xsd"/>
schemaLocation="./sys.xsd"/>
<xs:import namespace="https://schema.xml.r00t2.io/lib/types/unix.xsd"
schemaLocation="./unix.xsd"/>


<xs:simpleType name="t_console_pageformats"> <xs:simpleType name="t_console_pageformats">
<xs:restriction base="xs:positiveInteger"> <xs:restriction base="xs:positiveInteger">
@ -26,11 +17,11 @@


<xs:complexType name="t_disk"> <xs:complexType name="t_disk">
<xs:sequence> <xs:sequence>
<xs:element name="part" minOccurs="1" maxOccurs="unbounded" type="linux:t_partition"/> <xs:element name="part" minOccurs="1" maxOccurs="unbounded" type="t_partition"/>
</xs:sequence> </xs:sequence>
<xs:attribute name="id" type="xs:ID" use="required"/> <xs:attribute name="id" type="xs:ID" use="required"/>
<xs:attribute name="device" type="linux:t_diskdev" use="required"/> <xs:attribute name="device" type="t_diskdev" use="required"/>
<xs:attribute name="diskFormat" type="sys:t_diskfmt" use="required"/> <xs:attribute name="diskFormat" type="t_diskfmt" use="required"/>
</xs:complexType> </xs:complexType>


<xs:simpleType name="t_diskdev"> <xs:simpleType name="t_diskdev">
@ -49,7 +40,7 @@
</xs:simpleType> </xs:simpleType>


<xs:simpleType name="t_fstype"> <xs:simpleType name="t_fstype">
<xs:union memberTypes="std:t_UUID4"> <xs:union memberTypes="t_UUID4">
<xs:simpleType> <xs:simpleType>
<!-- parted names --> <!-- parted names -->
<!-- https://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs --> <!-- https://en.wikipedia.org/wiki/GUID_Partition_Table#Partition_type_GUIDs -->
@ -118,7 +109,7 @@
<xs:element name="secrets" minOccurs="1" maxOccurs="10" type="t_luks_secrets"/> <xs:element name="secrets" minOccurs="1" maxOccurs="10" type="t_luks_secrets"/>
</xs:sequence> </xs:sequence>
<xs:attribute name="id" type="xs:ID" use="required"/> <xs:attribute name="id" type="xs:ID" use="required"/>
<xs:attribute name="name" type="std:t_nonempty" use="required"/> <xs:attribute name="name" type="t_nonempty" use="required"/>
<xs:attribute name="source" type="xs:IDREF" use="required"/> <xs:attribute name="source" type="xs:IDREF" use="required"/>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
@ -127,13 +118,12 @@


<xs:complexType name="t_luks_secrets"> <xs:complexType name="t_luks_secrets">
<xs:sequence minOccurs="1" maxOccurs="unbounded"> <xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="passphrase" minOccurs="0" maxOccurs="unbounded" <xs:element name="passphrase" minOccurs="0" maxOccurs="unbounded" type="t_nonempty"/>
type="std:t_nonempty"/>
<!-- TODO: support URI to *read* bytes from? --> <!-- TODO: support URI to *read* bytes from? -->
<xs:element name="keyFile" minOccurs="0" maxOccurs="unbounded"> <xs:element name="keyFile" minOccurs="0" maxOccurs="unbounded">
<xs:complexType> <xs:complexType>
<xs:simpleContent> <xs:simpleContent>
<xs:extension base="unix:t_filepath"> <xs:extension base="t_filepath">
<xs:attribute name="size" type="xs:positiveInteger" use="optional"/> <xs:attribute name="size" type="xs:positiveInteger" use="optional"/>
</xs:extension> </xs:extension>
</xs:simpleContent> </xs:simpleContent>
@ -150,15 +140,15 @@
<xs:element name="physicalVolumes" minOccurs="1" maxOccurs="1"> <xs:element name="physicalVolumes" minOccurs="1" maxOccurs="1">
<xs:complexType> <xs:complexType>
<xs:sequence> <xs:sequence>
<xs:element name="pv" minOccurs="1" maxOccurs="unbounded" type="linux:t_lvm_pv"/> <xs:element name="pv" minOccurs="1" maxOccurs="unbounded" type="t_lvm_pv"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
<xs:element name="logicalVolumes" minOccurs="1" maxOccurs="1" type="linux:t_lvm_lv"/> <xs:element name="logicalVolumes" minOccurs="1" maxOccurs="1" type="t_lvm_lv"/>
</xs:all> </xs:all>
<xs:attribute name="id" type="xs:ID" use="required"/> <xs:attribute name="id" type="xs:ID" use="required"/>
<xs:attribute name="name" type="std:t_nonempty" use="required"/> <xs:attribute name="name" type="t_nonempty" use="required"/>
<xs:attribute name="extentSize" type="linux:t_pesize" use="optional" default="0"/> <xs:attribute name="extentSize" type="t_pesize" use="optional" default="0"/>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
</xs:sequence> </xs:sequence>
@ -176,8 +166,8 @@
</xs:element> </xs:element>
</xs:sequence> </xs:sequence>
<xs:attribute name="id" type="xs:ID" use="required"/> <xs:attribute name="id" type="xs:ID" use="required"/>
<xs:attribute name="name" type="std:t_nonempty" use="required"/> <xs:attribute name="name" type="t_nonempty" use="required"/>
<xs:attribute name="size" type="linux:t_lvsize" use="required"/> <xs:attribute name="size" type="t_lvsize" use="required"/>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
</xs:sequence> </xs:sequence>
@ -203,29 +193,26 @@
<xs:sequence minOccurs="1" maxOccurs="unbounded"> <xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="member" minOccurs="1" maxOccurs="unbounded"> <xs:element name="member" minOccurs="1" maxOccurs="unbounded">
<xs:complexType> <xs:complexType>
<xs:attribute name="source" type="xs:IDREF" <xs:attribute name="source" type="xs:IDREF" use="required"/>
use="required"/>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
</xs:sequence> </xs:sequence>
<xs:attribute name="id" use="required" type="xs:ID"/> <xs:attribute name="id" use="required" type="xs:ID"/>
<xs:attribute name="name" use="required" type="std:t_nonempty"/> <xs:attribute name="name" use="required" type="t_nonempty"/>
<xs:attribute name="meta" use="optional" default="1.2" type="linux:t_raid_meta"/> <xs:attribute name="meta" use="optional" default="1.2" type="t_raid_meta"/>
<xs:attribute name="level" use="required" type="linux:t_raid_levels"/> <xs:attribute name="level" use="required" type="t_raid_levels"/>
<!-- KB *only*. --> <!-- KB *only*. -->
<!-- Can be pretty important! <!-- Can be pretty important!
https://www.zdnet.com/article/chunks-the-hidden-key-to-raid-performance/ --> https://www.zdnet.com/article/chunks-the-hidden-key-to-raid-performance/ -->
<xs:attribute name="chunkSize" use="optional" type="xs:positiveInteger" <xs:attribute name="chunkSize" use="optional" type="xs:positiveInteger" default="512"/>
default="512"/> <xs:attribute name="layout" use="optional" type="t_raid_layout" default="none"/>
<xs:attribute name="layout" use="optional" type="linux:t_raid_layout"
default="none"/>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>


<xs:simpleType name="t_mountpath"> <xs:simpleType name="t_mountpath">
<xs:union memberTypes="unix:t_filepath"> <xs:union memberTypes="t_filepath">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:enumeration value="swap"/> <xs:enumeration value="swap"/>
@ -239,11 +226,10 @@
<xs:element name="mount" minOccurs="1" maxOccurs="unbounded"> <xs:element name="mount" minOccurs="1" maxOccurs="unbounded">
<xs:complexType> <xs:complexType>
<xs:sequence minOccurs="0" maxOccurs="unbounded"> <xs:sequence minOccurs="0" maxOccurs="unbounded">
<xs:element name="opt" minOccurs="1" maxOccurs="unbounded" <xs:element name="opt" minOccurs="1" maxOccurs="unbounded" type="t_cmdopts"/>
type="std:t_cmdopts"/>
</xs:sequence> </xs:sequence>
<xs:attribute name="source" type="xs:IDREF" use="required"/> <xs:attribute name="source" type="xs:IDREF" use="required"/>
<xs:attribute name="target" type="linux:t_mountpath" use="required"/> <xs:attribute name="target" type="t_mountpath" use="required"/>
</xs:complexType> </xs:complexType>
</xs:element> </xs:element>
</xs:sequence> </xs:sequence>
@ -255,8 +241,7 @@
<xs:complexType> <xs:complexType>
<xs:simpleContent> <xs:simpleContent>
<xs:extension base="xs:string"> <xs:extension base="xs:string">
<xs:attribute name="hashType" use="optional" default="sha512" <xs:attribute name="hashType" use="optional" default="sha512" type="t_passwd_hashtypes"/>
type="linux:t_passwd_hashtypes"/>
<xs:attribute name="rounds" use="optional" default="5000" type="xs:positiveInteger"/> <xs:attribute name="rounds" use="optional" default="5000" type="xs:positiveInteger"/>
</xs:extension> </xs:extension>
</xs:simpleContent> </xs:simpleContent>
@ -265,9 +250,9 @@
<xs:element name="passwordHash"> <xs:element name="passwordHash">
<xs:complexType> <xs:complexType>
<xs:simpleContent> <xs:simpleContent>
<xs:extension base="linux:t_shadowhash"> <xs:extension base="t_shadowhash">
<xs:attribute name="hashType" use="optional" default="(detect)" <xs:attribute name="hashType" use="optional" default="(detect)"
type="linux:t_passwd_hashtypes_detect"/> type="t_passwd_hashtypes_detect"/>
</xs:extension> </xs:extension>
</xs:simpleContent> </xs:simpleContent>
</xs:complexType> </xs:complexType>
@ -278,8 +263,8 @@


<xs:complexType name="t_package"> <xs:complexType name="t_package">
<xs:simpleContent> <xs:simpleContent>
<xs:extension base="std:t_nonempty"> <xs:extension base="t_nonempty">
<xs:attribute name="repo" type="std:t_nonempty" use="optional"/> <xs:attribute name="repo" type="t_nonempty" use="optional"/>
</xs:extension> </xs:extension>
</xs:simpleContent> </xs:simpleContent>
</xs:complexType> </xs:complexType>
@ -339,18 +324,18 @@


<xs:complexType name="t_partition"> <xs:complexType name="t_partition">
<xs:sequence minOccurs="0" maxOccurs="1"> <xs:sequence minOccurs="0" maxOccurs="1">
<xs:element name="partitionFlag" minOccurs="1" maxOccurs="unbounded" type="linux:t_part_flags"/> <xs:element name="partitionFlag" minOccurs="1" maxOccurs="unbounded" type="t_part_flags"/>
</xs:sequence> </xs:sequence>
<xs:attribute name="id" type="xs:ID" use="required"/> <xs:attribute name="id" type="xs:ID" use="required"/>
<xs:attribute name="name" type="std:t_nonempty" use="optional"/> <xs:attribute name="name" type="t_nonempty" use="optional"/>
<xs:attribute name="label" type="std:t_nonempty" use="optional"/> <xs:attribute name="label" type="t_nonempty" use="optional"/>
<xs:attribute name="start" type="linux:t_disksize" use="required"/> <xs:attribute name="start" type="t_disksize" use="required"/>
<xs:attribute name="stop" type="linux:t_disksize" use="required"/> <xs:attribute name="stop" type="t_disksize" use="required"/>
<xs:attribute name="fsType" type="linux:t_fstype" use="required"/> <xs:attribute name="fsType" type="t_fstype" use="required"/>
</xs:complexType> </xs:complexType>


<xs:simpleType name="t_passwd_hashtypes"> <xs:simpleType name="t_passwd_hashtypes">
<xs:union memberTypes="unix:t_passwd_hashtypes"> <xs:union memberTypes="t_passwd_hashtypes">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<!-- Unsupported in glibc. libxcrypt (https://github.com/besser82/libxcrypt/) has additional support. --> <!-- Unsupported in glibc. libxcrypt (https://github.com/besser82/libxcrypt/) has additional support. -->
@ -366,7 +351,7 @@
</xs:simpleType> </xs:simpleType>


<xs:simpleType name="t_passwd_hashtypes_detect"> <xs:simpleType name="t_passwd_hashtypes_detect">
<xs:union memberTypes="linux:t_passwd_hashtypes"> <xs:union memberTypes="t_passwd_hashtypes">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:enumeration value="(detect)"/> <xs:enumeration value="(detect)"/>
@ -425,14 +410,14 @@


<xs:complexType name="t_service"> <xs:complexType name="t_service">
<xs:simpleContent> <xs:simpleContent>
<xs:extension base="std:t_nonempty"> <xs:extension base="t_nonempty">
<xs:attribute name="status" type="xs:boolean" use="optional" default="true"/> <xs:attribute name="status" type="xs:boolean" use="optional" default="true"/>
</xs:extension> </xs:extension>
</xs:simpleContent> </xs:simpleContent>
</xs:complexType> </xs:complexType>


<xs:simpleType name="t_shadowhash"> <xs:simpleType name="t_shadowhash">
<xs:union memberTypes="unix:t_shadowhash"> <xs:union memberTypes="t_shadowhash">
<xs:simpleType> <xs:simpleType>
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
<xs:pattern value="($5)?($[a-zA-Z0-9./]{1,16})$[a-zA-Z0-9./]{43}"/><!-- sha256 --> <xs:pattern value="($5)?($[a-zA-Z0-9./]{1,16})$[a-zA-Z0-9./]{43}"/><!-- sha256 -->
@ -445,15 +430,12 @@
<xs:complexType name="t_user"> <xs:complexType name="t_user">
<xs:sequence> <xs:sequence>
<xs:element name="password" minOccurs="0" maxOccurs="1" <xs:element name="password" minOccurs="0" maxOccurs="1"
type="linux:t_nixpass"/> type="t_nixpass"/>
<xs:element name="xGroup" minOccurs="0" maxOccurs="unbounded"> <xs:element name="xGroup" minOccurs="0" maxOccurs="unbounded">
<xs:complexType> <xs:complexType>
<xs:attribute name="name" type="unix:t_posixUserGroup" <xs:attribute name="name" type="t_posixUserGroup" use="required"/>
use="required"/> <xs:attribute name="create" type="xs:boolean" use="optional" default="false"/>
<xs:attribute name="create" type="xs:boolean" use="optional" <xs:attribute name="gid" type="xs:positiveInteger" use="optional"/>
default="false"/>
<xs:attribute name="gid" type="xs:positiveInteger"
use="optional"/>
</xs:complexType> </xs:complexType>
<xs:unique name="uniq_grp"> <xs:unique name="uniq_grp">
<xs:selector xpath="."/> <xs:selector xpath="."/>
@ -461,29 +443,23 @@
</xs:unique> </xs:unique>
</xs:element> </xs:element>
</xs:sequence> </xs:sequence>
<xs:attribute name="name" type="unix:t_posixUserGroup" use="required"/> <xs:attribute name="name" type="t_posixUserGroup" use="required"/>
<xs:attribute name="home" type="unix:t_filepath" use="optional"/> <xs:attribute name="home" type="t_filepath" use="optional"/>
<xs:attribute name="uid" type="xs:positiveInteger" use="optional"/> <xs:attribute name="uid" type="xs:positiveInteger" use="optional"/>
<xs:attribute name="group" type="unix:t_posixUserGroup" use="optional"/> <xs:attribute name="group" type="t_posixUserGroup" use="optional"/>
<xs:attribute name="gid" type="xs:positiveInteger" use="optional"/> <xs:attribute name="gid" type="xs:positiveInteger" use="optional"/>
<xs:attribute name="comment" type="std:t_nonempty" use="optional"/> <xs:attribute name="comment" type="t_nonempty" use="optional"/>
<xs:attribute name="sudo" type="xs:boolean" use="optional" <xs:attribute name="sudo" type="xs:boolean" use="optional" default="false"/>
default="false"/> <xs:attribute name="sudoPassword" type="xs:boolean" use="optional" default="true"/>
<xs:attribute name="sudoPassword" type="xs:boolean" use="optional" <xs:attribute name="shell" type="t_filepath" use="optional" default="/bin/bash"/>
default="true"/>
<xs:attribute name="shell" type="unix:t_filepath" use="optional"
default="/bin/bash"/>
<!-- TODO: change the positiveIntegers to xs:duration? or union? --> <!-- TODO: change the positiveIntegers to xs:duration? or union? -->
<!-- Might be pointless since the smallest increment is 1 day in <!-- Might be pointless since the smallest increment is 1 day in
shadow(5). --> shadow(5). -->
<xs:attribute name="minAge" type="xs:positiveInteger" use="optional"/> <xs:attribute name="minAge" type="xs:positiveInteger" use="optional"/>
<xs:attribute name="maxAge" type="xs:positiveInteger" use="optional"/> <xs:attribute name="maxAge" type="xs:positiveInteger" use="optional"/>
<xs:attribute name="warnDays" type="xs:positiveInteger" <xs:attribute name="warnDays" type="xs:positiveInteger" use="optional"/>
use="optional"/> <xs:attribute name="inactiveDays" type="xs:positiveInteger" use="optional"/>
<xs:attribute name="inactiveDays" type="xs:positiveInteger" <xs:attribute name="expireDate" type="t_epoch_or_iso" use="optional"/>
use="optional"/>
<xs:attribute name="expireDate" type="std:t_epoch_or_iso"
use="optional"/>
</xs:complexType> </xs:complexType>


</xs:schema> </xs:schema>

View File

@ -1,14 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<xs:schema targetNamespace="https://schema.xml.r00t2.io/lib/types/net.xsd" <xs:schema xmlns:net="https://schema.xml.r00t2.io/lib/types/net.xsd"
xmlns="https://schema.xml.r00t2.io/lib/types/net.xsd"
xmlns:net="https://schema.xml.r00t2.io/lib/types/net.xsd"
xmlns:std="https://schema.xml.r00t2.io/lib/types/std.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="unqualified" elementFormDefault="unqualified"
attributeFormDefault="unqualified"> attributeFormDefault="unqualified">


<xs:import namespace="https://schema.xml.r00t2.io/lib/types/std.xsd" <xs:include schemaLocation="./std.xsd"/>
schemaLocation="./std.xsd"/>


<xs:simpleType name="t_addr_ip4"> <xs:simpleType name="t_addr_ip4">
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
@ -45,20 +41,20 @@
</xs:simpleType> </xs:simpleType>


<xs:simpleType name="t_both_addr"> <xs:simpleType name="t_both_addr">
<xs:union memberTypes="net:t_addr_ip4 net:t_addr_ip6"/> <xs:union memberTypes="t_addr_ip4 t_addr_ip6"/>
</xs:simpleType> </xs:simpleType>


<xs:simpleType name="t_both_qualified_addr"> <xs:simpleType name="t_both_qualified_addr">
<xs:union memberTypes="net:t_qualified_addr_ip4 net:t_qualified_addr_ip6"/> <xs:union memberTypes="t_qualified_addr_ip4 t_qualified_addr_ip6"/>
</xs:simpleType> </xs:simpleType>


<xs:complexType name="t_http_resource"> <xs:complexType name="t_http_resource">
<xs:simpleContent> <xs:simpleContent>
<xs:extension base="std:t_uri"> <xs:extension base="t_uri">
<xs:attribute name="user" type="std:t_nonempty" use="optional"/> <xs:attribute name="user" type="t_nonempty" use="optional"/>
<xs:attribute name="password" type="std:t_nonempty" use="optional"/> <xs:attribute name="password" type="t_nonempty" use="optional"/>
<xs:attribute name="realm" type="std:t_nonempty" use="optional"/> <xs:attribute name="realm" type="t_nonempty" use="optional"/>
<xs:attribute name="authtype" type="net:t_authselect" use="optional" default="none"/> <xs:attribute name="authtype" type="t_authselect" use="optional" default="none"/>
</xs:extension> </xs:extension>
</xs:simpleContent> </xs:simpleContent>
</xs:complexType> </xs:complexType>

View File

@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<xs:schema targetNamespace="https://schema.xml.r00t2.io/lib/types/std.xsd" <xs:schema xmlns:std="https://schema.xml.r00t2.io/lib/types/std.xsd"
xmlns="https://schema.xml.r00t2.io/lib/types/std.xsd"
xmlns:std="https://schema.xml.r00t2.io/lib/types/std.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="unqualified" elementFormDefault="unqualified"
attributeFormDefault="unqualified"> attributeFormDefault="unqualified">
@ -15,16 +13,16 @@


<xs:complexType name="t_cksum"> <xs:complexType name="t_cksum">
<xs:simpleContent> <xs:simpleContent>
<xs:extension base="std:t_cksum_hashtypes"> <xs:extension base="t_cksum_hashtypes">
<xs:attribute name="hashType" use="required" type="std:t_cksum_hashtypes"/> <xs:attribute name="hashType" use="required" type="t_cksum_hashtypes"/>
</xs:extension> </xs:extension>
</xs:simpleContent> </xs:simpleContent>
</xs:complexType> </xs:complexType>


<xs:complexType name="t_cksum_file"> <xs:complexType name="t_cksum_file">
<xs:simpleContent> <xs:simpleContent>
<xs:extension base="std:t_uri"> <xs:extension base="t_uri">
<xs:attribute name="hashType" use="required" type="std:t_cksum_hashtypes"/> <xs:attribute name="hashType" use="required" type="t_cksum_hashtypes"/>
</xs:extension> </xs:extension>
</xs:simpleContent> </xs:simpleContent>
</xs:complexType> </xs:complexType>
@ -66,7 +64,7 @@


<xs:complexType name="t_gpg_keys"> <xs:complexType name="t_gpg_keys">
<xs:sequence minOccurs="1" maxOccurs="unbounded"> <xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="keyID" minOccurs="1" maxOccurs="unbounded" type="std:t_gpg_key_id"/> <xs:element name="keyID" minOccurs="1" maxOccurs="unbounded" type="t_gpg_key_id"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>
@ -102,7 +100,7 @@


<xs:complexType name="t_verifyfile"> <xs:complexType name="t_verifyfile">
<xs:all minOccurs="1"> <xs:all minOccurs="1">
<xs:element name="gpg" minOccurs="0" maxOccurs="1" type="std:t_verify_gpg"> <xs:element name="gpg" minOccurs="0" maxOccurs="1" type="t_verify_gpg">
<xs:unique name="uniq_gpg_sig"> <xs:unique name="uniq_gpg_sig">
<xs:selector xpath="std:signature"/> <xs:selector xpath="std:signature"/>
<xs:field xpath="."/> <xs:field xpath="."/>
@ -112,22 +110,22 @@
<xs:field xpath="."/> <xs:field xpath="."/>
</xs:unique> </xs:unique>
</xs:element> </xs:element>
<xs:element name="hash" minOccurs="0" maxOccurs="1" type="std:t_verify_cksum"/> <xs:element name="hash" minOccurs="0" maxOccurs="1" type="t_verify_cksum"/>
</xs:all> </xs:all>
</xs:complexType> </xs:complexType>


<xs:complexType name="t_verify_cksum"> <xs:complexType name="t_verify_cksum">
<xs:sequence> <xs:sequence>
<xs:element name="checksum" minOccurs="0" maxOccurs="unbounded" type="std:t_cksum"/> <xs:element name="checksum" minOccurs="0" maxOccurs="unbounded" type="t_cksum"/>
<xs:element name="checksumFile" minOccurs="0" maxOccurs="unbounded" type="std:t_cksum_file"/> <xs:element name="checksumFile" minOccurs="0" maxOccurs="unbounded" type="t_cksum_file"/>
</xs:sequence> </xs:sequence>
</xs:complexType> </xs:complexType>


<xs:complexType name="t_verify_gpg"> <xs:complexType name="t_verify_gpg">
<xs:choice minOccurs="1" maxOccurs="1"> <xs:choice minOccurs="1" maxOccurs="1">
<xs:element name="signature" minOccurs="0" maxOccurs="unbounded" type="std:t_gpg_sig"/> <xs:element name="signature" minOccurs="0" maxOccurs="unbounded" type="t_gpg_sig"/>
<xs:element name="signatureFile" minOccurs="0" maxOccurs="unbounded" type="std:t_uri"/> <xs:element name="signatureFile" minOccurs="0" maxOccurs="unbounded" type="t_uri"/>
<xs:element name="gpgKeyIDs" minOccurs="1" maxOccurs="1" type="std:t_gpg_keys"> <xs:element name="gpgKeyIDs" minOccurs="1" maxOccurs="1" type="t_gpg_keys">
<xs:unique name="uniq_key_id"> <xs:unique name="uniq_key_id">
<xs:selector xpath="std:keyID"/> <xs:selector xpath="std:keyID"/>
<xs:field xpath="."/> <xs:field xpath="."/>

View File

@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<xs:schema targetNamespace="https://schema.xml.r00t2.io/lib/types/sys.xsd" <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="https://schema.xml.r00t2.io/lib/types/sys.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="unqualified" elementFormDefault="unqualified"
attributeFormDefault="unqualified"> attributeFormDefault="unqualified">



View File

@ -1,14 +1,10 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<xs:schema targetNamespace="https://schema.xml.r00t2.io/lib/types/unix.xsd" <xs:schema xmlns:unix="https://schema.xml.r00t2.io/lib/types/unix.xsd"
xmlns="https://schema.xml.r00t2.io/lib/types/unix.xsd"
xmlns:std="https://schema.xml.r00t2.io/lib/types/std.xsd"
xmlns:unix="https://schema.xml.r00t2.io/lib/types/unix.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="unqualified" elementFormDefault="unqualified"
attributeFormDefault="unqualified"> attributeFormDefault="unqualified">


<xs:import namespace="https://schema.xml.r00t2.io/lib/types/std.xsd" <xs:include schemaLocation="./std.xsd"/>
schemaLocation="./std.xsd"/>


<xs:simpleType name="t_filepath"> <xs:simpleType name="t_filepath">
<xs:restriction base="xs:string"> <xs:restriction base="xs:string">
@ -22,7 +18,7 @@
<xs:complexType> <xs:complexType>
<xs:simpleContent> <xs:simpleContent>
<xs:extension base="xs:string"> <xs:extension base="xs:string">
<xs:attribute name="hashType" use="optional" default="md5" type="unix:t_passwd_hashtypes"/> <xs:attribute name="hashType" use="optional" default="md5" type="t_passwd_hashtypes"/>
<xs:attribute name="rounds" use="optional" default="5000" type="xs:positiveInteger"/> <xs:attribute name="rounds" use="optional" default="5000" type="xs:positiveInteger"/>
</xs:extension> </xs:extension>
</xs:simpleContent> </xs:simpleContent>
@ -31,8 +27,8 @@
<xs:element name="passwordHash"> <xs:element name="passwordHash">
<xs:complexType> <xs:complexType>
<xs:simpleContent> <xs:simpleContent>
<xs:extension base="unix:t_shadowhash"> <xs:extension base="t_shadowhash">
<xs:attribute name="hashType" use="optional" default="md5" type="unix:t_passwd_hashtypes"/> <xs:attribute name="hashType" use="optional" default="md5" type="t_passwd_hashtypes"/>
</xs:extension> </xs:extension>
</xs:simpleContent> </xs:simpleContent>
</xs:complexType> </xs:complexType>
@ -67,15 +63,12 @@


<xs:complexType name="t_user"> <xs:complexType name="t_user">
<xs:sequence> <xs:sequence>
<xs:element name="password" minOccurs="0" maxOccurs="1" type="unix:t_nixpass"/> <xs:element name="password" minOccurs="0" maxOccurs="1" type="t_nixpass"/>
<xs:element name="xGroup" minOccurs="0" maxOccurs="unbounded"> <xs:element name="xGroup" minOccurs="0" maxOccurs="unbounded">
<xs:complexType> <xs:complexType>
<xs:attribute name="name" type="unix:t_posixUserGroup" <xs:attribute name="name" type="t_posixUserGroup" use="required"/>
use="required"/> <xs:attribute name="create" type="xs:boolean" use="optional" default="false"/>
<xs:attribute name="create" type="xs:boolean" use="optional" <xs:attribute name="gid" type="xs:positiveInteger" use="optional"/>
default="false"/>
<xs:attribute name="gid" type="xs:positiveInteger"
use="optional"/>
</xs:complexType> </xs:complexType>
<xs:unique name="uniq_grp"> <xs:unique name="uniq_grp">
<xs:selector xpath="unix:xGroup"/> <xs:selector xpath="unix:xGroup"/>
@ -83,29 +76,23 @@
</xs:unique> </xs:unique>
</xs:element> </xs:element>
</xs:sequence> </xs:sequence>
<xs:attribute name="name" type="unix:t_posixUserGroup" use="required"/> <xs:attribute name="name" type="t_posixUserGroup" use="required"/>
<xs:attribute name="home" type="unix:t_filepath" use="optional"/> <xs:attribute name="home" type="t_filepath" use="optional"/>
<xs:attribute name="uid" type="xs:positiveInteger" use="optional"/> <xs:attribute name="uid" type="xs:positiveInteger" use="optional"/>
<xs:attribute name="group" type="unix:t_posixUserGroup" use="optional"/> <xs:attribute name="group" type="t_posixUserGroup" use="optional"/>
<xs:attribute name="gid" type="xs:positiveInteger" use="optional"/> <xs:attribute name="gid" type="xs:positiveInteger" use="optional"/>
<xs:attribute name="comment" type="std:t_nonempty" use="optional"/> <xs:attribute name="comment" type="t_nonempty" use="optional"/>
<xs:attribute name="sudo" type="xs:boolean" use="optional" <xs:attribute name="sudo" type="xs:boolean" use="optional" default="false"/>
default="false"/> <xs:attribute name="sudoPassword" type="xs:boolean" use="optional" default="true"/>
<xs:attribute name="sudoPassword" type="xs:boolean" use="optional" <xs:attribute name="shell" type="t_filepath" use="optional" default="/bin/bash"/>
default="true"/>
<xs:attribute name="shell" type="unix:t_filepath" use="optional"
default="/bin/bash"/>
<!-- TODO: change the positiveIntegers to xs:duration? or union? --> <!-- TODO: change the positiveIntegers to xs:duration? or union? -->
<!-- Might be pointless since the smallest increment is 1 day in <!-- Might be pointless since the smallest increment is 1 day in
shadow(5). --> shadow(5). -->
<xs:attribute name="minAge" type="xs:positiveInteger" use="optional"/> <xs:attribute name="minAge" type="xs:positiveInteger" use="optional"/>
<xs:attribute name="maxAge" type="xs:positiveInteger" use="optional"/> <xs:attribute name="maxAge" type="xs:positiveInteger" use="optional"/>
<xs:attribute name="warnDays" type="xs:positiveInteger" <xs:attribute name="warnDays" type="xs:positiveInteger" use="optional"/>
use="optional"/> <xs:attribute name="inactiveDays" type="xs:positiveInteger" use="optional"/>
<xs:attribute name="inactiveDays" type="xs:positiveInteger" <xs:attribute name="expireDate" type="t_epoch_or_iso" use="optional"/>
use="optional"/>
<xs:attribute name="expireDate" type="std:t_epoch_or_iso"
use="optional"/>
</xs:complexType> </xs:complexType>


</xs:schema> </xs:schema>

View File

@ -1,7 +1,5 @@
<?xml version="1.0" encoding="UTF-8" ?> <?xml version="1.0" encoding="UTF-8" ?>
<xs:schema targetNamespace="http://schema.xml.r00t2.io/bdisk.xsd" <xs:schema xmlns:bdisk="http://schema.xml.r00t2.io/bdisk.xsd"
xmlns="http://schema.xml.r00t2.io/bdisk.xsd"
xmlns:bdisk="http://schema.xml.r00t2.io/bdisk.xsd"
xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="unqualified" elementFormDefault="unqualified"
attributeFormDefault="unqualified"> attributeFormDefault="unqualified">