xml/schema/lib/elements/he_ipv6.xsd

83 lines
3.4 KiB
XML
Raw Normal View History

2020-05-11 16:21:22 -04:00
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:include schemaLocation="../types/net.xsd"/>
2020-05-11 17:11:12 -04:00
<xs:include schemaLocation="../types/linux.xsd"/>
2020-05-11 16:21:22 -04:00
<xs:include schemaLocation="../types/he_ipv6.xsd"/>
<xs:complexType name="e_he_ipv6_cred">
<xs:all>
<xs:element name="user" type="xs:token" minOccurs="1"/>
<xs:element name="updateKey" type="xs:token" minOccurs="1"/>
</xs:all>
<xs:attribute name="id" type="xs:ID" use="required"/>
</xs:complexType>
<xs:complexType name="e_he_ipv6_tunnel">
<xs:all>
<xs:element name="server" type="t_net_addr_ip4"/>
<xs:element name="client" minOccurs="1" maxOccurs="1">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="t_net_addr_ip6">
<!-- VERY most likely "64" but we can't define a default with required. -->
<xs:attribute name="prefix" type="t_he_ipv6_prefix" use="required"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
<xs:element name="allocations">
2020-05-11 16:21:22 -04:00
<xs:complexType>
<xs:sequence minOccurs="1">
<!-- HE only allocates a single /64 and, upon request, a single /48 per tunnel. -->
<xs:element name="alloc" minOccurs="1" maxOccurs="2">
<xs:complexType>
<xs:simpleContent>
<xs:extension base="t_net_addr_ip6">
2020-05-11 16:23:34 -04:00
<!-- VERY most likely "64" but we can't define a default with required. -->
<xs:attribute name="prefix" type="t_he_ipv6_prefix" use="required"/>
<xs:attribute name="id" type="xs:token" use="required"/>
2020-05-11 16:21:22 -04:00
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
2020-05-11 16:27:27 -04:00
<xs:unique name="uniq_alloc_addr">
2020-05-11 16:50:52 -04:00
<xs:selector xpath=".//*"/>
2020-05-11 16:27:27 -04:00
<xs:field xpath="."/>
</xs:unique>
2020-05-11 16:50:52 -04:00
<xs:unique name="uniq_alloc_prefix">
<xs:selector xpath=".//*"/>
<xs:field xpath="@prefix"/>
</xs:unique>
<xs:unique name="uniq_alloc_id">
<xs:selector xpath=".//*"/>
<xs:field xpath="@id"/>
</xs:unique>
2020-05-11 16:21:22 -04:00
</xs:element>
<xs:element name="assignments" minOccurs="1" maxOccurs="1">
2020-05-11 16:21:22 -04:00
<xs:complexType>
<xs:sequence minOccurs="1" maxOccurs="unbounded">
<xs:element name="assign" minOccurs="1" maxOccurs="unbounded">
<xs:complexType>
<xs:attribute name="prefix" type="t_he_ipv6_prefix" use="optional" default="64"/>
<!-- TODO: alloc must be a defined alloc "id" attribute value. -->
<xs:attribute name="alloc" type="xs:token" use="required"/>
<xs:attribute name="iface" type="t_linux_iface_name" use="required"/>
</xs:complexType>
</xs:element>
</xs:sequence>
<xs:attribute name="radvd" type="xs:boolean" use="optional" default="false"/>
<xs:attribute name="radvdDns" type="xs:boolean" use="optional" default="false"/>
2020-05-11 16:21:22 -04:00
</xs:complexType>
</xs:element>
</xs:all>
<xs:attribute name="id" type="xs:positiveInteger" use="required"/>
<xs:attribute name="creds" type="xs:IDREF" use="required"/>
</xs:complexType>
</xs:schema>