okay, this works. nice.

This commit is contained in:
brent s. 2020-05-14 04:04:48 -04:00
parent 8486ca0ecb
commit d103acea18
Signed by: bts
GPG Key ID: 8C004C2F93481F6B
3 changed files with 17 additions and 45 deletions

View File

@ -10,6 +10,7 @@
<xs:complexType name="e_he_ipv6_cred">
<xs:all>
<xs:element name="user" type="xs:token" minOccurs="1"/>
<xs:element name="password" 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"/>
@ -17,55 +18,13 @@

<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">
<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">
<!-- 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"/>
</xs:extension>
</xs:simpleContent>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
<xs:unique name="uniq_alloc_addr">
<xs:selector xpath=".//*"/>
<xs:field xpath="."/>
</xs:unique>
<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>
</xs:element>
<xs:element name="assignments" minOccurs="1" maxOccurs="1">
<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="prefix" type="t_he_ipv6_prefix_local" use="optional" default="64"/>
<xs:attribute name="alloc" type="t_he_ipv6_prefix" use="optional" default="64"/>
<xs:attribute name="iface" type="t_linux_iface_name" use="required"/>
</xs:complexType>
</xs:element>
@ -73,6 +32,12 @@
<xs:attribute name="radvd" type="xs:boolean" use="optional" default="false"/>
<xs:attribute name="radvdDns" type="xs:boolean" use="optional" default="false"/>
</xs:complexType>
<xs:unique name="uniq_he_assign">
<xs:selector xpath=".//*"/>
<!-- <xs:field xpath="@prefix"/> -->
<xs:field xpath="@alloc"/>
<xs:field xpath="@iface"/>
</xs:unique>
</xs:element>
</xs:all>
<xs:attribute name="id" type="xs:positiveInteger" use="required"/>

View File

@ -10,4 +10,11 @@
</xs:restriction>
</xs:simpleType>

<xs:simpleType name="t_he_ipv6_prefix_local">
<xs:restriction base="xs:positiveInteger">
<xs:minInclusive value="64"/>
<xs:maxInclusive value="128"/>
</xs:restriction>
</xs:simpleType>

</xs:schema>

View File

@ -1,7 +1,7 @@
<?xml version="1.0" encoding="UTF-8" ?>
<xs:schema targetNamespace="https://tunnelbroker.net/"
xmlns="https://tunnelbroker.net/"
xmlns:heIPv6="https://tunelbroker.net/"
xmlns:heIPv6="https://tunnelbroker.net/"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified"
attributeFormDefault="unqualified">