<?xml version="1.0" encoding="gb2312"?>
<xs:schema targetNamespace="http://www.h3c.com/netconf/config:1.0"
                  elementFormDefault="qualified"
                  xmlns="http://www.h3c.com/netconf/config:1.0"
                  xmlns:base="http://www.h3c.com/netconf/base:1.0"
                  xmlns:netconf ="urn:ietf:params:xml:ns:netconf:base:1.0"
                  xmlns:xs="http://www.w3.org/2001/XMLSchema">
  <xs:import namespace="http://www.h3c.com/netconf/base:1.0" schemaLocation="basetype.xsd"/>
  <xs:import schemaLocation="netconf.xsd" namespace="urn:ietf:params:xml:ns:netconf:base:1.0"/>

  <xs:annotation>
    <xs:documentation>WebAuth module config definition</xs:documentation>
  </xs:annotation>

  <xs:complexType name="WEBAUTH_Name">
    <xs:simpleContent>
      <xs:restriction base="base:String">
        <xs:annotation>
          <xs:documentation>String[1 ~ 32]</xs:documentation>
        </xs:annotation>
        <xs:minLength value ="1"/>
        <xs:maxLength value ="32"/>
      </xs:restriction>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="WEBAUTH_URL">
    <xs:simpleContent>
      <xs:restriction base="base:URLString">
        <xs:annotation>
          <xs:documentation>String[1 ~ 256]</xs:documentation>
        </xs:annotation>
        <xs:minLength value ="1"/>
        <xs:maxLength value ="256"/>
      </xs:restriction>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="WEBAUTH_Port">
    <xs:simpleContent>
      <xs:restriction base="base:UnsignedInteger32">
        <xs:minInclusive value ="1"></xs:minInclusive>
        <xs:maxInclusive value ="65535"></xs:maxInclusive>
      </xs:restriction>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="WEBAUTH_Domain">
    <xs:simpleContent>
      <xs:restriction base="base:String">
        <xs:annotation>
          <xs:documentation>String[1 ~ 24]</xs:documentation>
        </xs:annotation>
        <xs:minLength value ="1"/>
        <xs:maxLength value ="24"/>
      </xs:restriction>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="WEBAUTH_VlanID">
    <xs:simpleContent>
      <xs:restriction base="base:UnsignedInteger32">
        <xs:minInclusive value ="1"></xs:minInclusive>
        <xs:maxInclusive value ="4094"></xs:maxInclusive>
      </xs:restriction>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="WEBAUTH_DetectIdleTime">
    <xs:simpleContent>
      <xs:restriction base="base:UnsignedInteger32">
        <xs:minInclusive value ="60"></xs:minInclusive>
        <xs:maxInclusive value ="65535"></xs:maxInclusive>
      </xs:restriction>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="WEBAUTH_RedirectWaitTime">
    <xs:simpleContent>
      <xs:restriction base="base:UnsignedInteger32">
        <xs:minInclusive value ="1"></xs:minInclusive>
        <xs:maxInclusive value ="90"></xs:maxInclusive>
      </xs:restriction>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="WEBAUTH_ParamType">
    <xs:simpleContent>
      <xs:restriction base="base:UnsignedInteger32">
        <xs:annotation>
          <xs:documentation>0:source-address 1: source-mac 2:original-url 3:selfDefine </xs:documentation>
        </xs:annotation>
        <xs:enumeration value ="0"/>
        <xs:enumeration value ="1"/>
        <xs:enumeration value ="2"/>
        <xs:enumeration value ="3"/>
      </xs:restriction>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="WEBAUTH_MaxUser">
    <xs:simpleContent>
      <xs:restriction base="base:UnsignedInteger32">
        <xs:minInclusive value ="1"></xs:minInclusive>
        <xs:maxInclusive value ="2048"></xs:maxInclusive>
      </xs:restriction>
    </xs:simpleContent>
  </xs:complexType>

  <xs:element name="WebAuth">
    <xs:complexType>
   	  <xs:choice minOccurs="0" maxOccurs="unbounded">
   	    <xs:element name="WebServers">
   	      <xs:annotation>
   	        <xs:documentation>WebServers table</xs:documentation>
   	      </xs:annotation>
   	      <xs:complexType>
   	        <xs:choice minOccurs="0" maxOccurs="unbounded">
   	          <xs:element name="WebServer">
   	            <xs:annotation>
                  <xs:documentation>Row name WebServer</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:all>
                    <xs:element name="ServerName" type="WEBAUTH_Name" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Name of the web-auth server</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="Url" type="WEBAUTH_URL" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>URL of the web-auth server</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="IPAddress" type="base:Ipv4Address" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>IpV4 address of the web-auth server</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="Port" type="WEBAUTH_Port" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Port number of the web-auth server</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="RedirectWaitTime" type="WEBAUTH_RedirectWaitTime" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>The wait period before pushing the page</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                  </xs:all>
                  <xs:attributeGroup ref="base:RowAttributeGroup"></xs:attributeGroup>
                </xs:complexType>
   	          </xs:element>
   	        </xs:choice>
   	        <xs:attributeGroup ref="base:TableAttributeGroup"></xs:attributeGroup>
   	      </xs:complexType>
   	    </xs:element>
        <xs:element name="FreeIPs">
          <xs:annotation>
            <xs:documentation>FreeIPs table</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
              <xs:element name="FreeIP">
                <xs:annotation>
                  <xs:documentation>Row name FreeIP</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:all>
                    <xs:element name="IPv4Address" type="base:Ipv4Address" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>IP address used in EAD assistance feature</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="IPv4Mask" type="base:Ipv4Mask" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>IP address mask</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                  </xs:all>
                  <xs:attributeGroup ref="base:RowAttributeGroup"></xs:attributeGroup>
                </xs:complexType>
              </xs:element>
            </xs:choice>
            <xs:attributeGroup ref="base:TableAttributeGroup"></xs:attributeGroup>
          </xs:complexType>
        </xs:element>
        <xs:element name="Interfaces">
          <xs:annotation>
            <xs:documentation>Interfaces table</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
              <xs:element name="Interface">
                <xs:annotation>
                  <xs:documentation>Row name Interface</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:all>
                    <xs:element name ="IfIndex" type="base:IfIndex" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Interface index</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name ="AuthEnable" type="base:Boolean" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Enable the Web-Auth function</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name ="ApplyServer" type="WEBAUTH_Name" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Apply authentication server</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name ="ApplyDomain" type="WEBAUTH_Domain" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Apply IPv4 authentication domain</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name ="MaxUser" type="WEBAUTH_MaxUser" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Maximum number of users on the interface</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name ="AuthFailVlan" type="WEBAUTH_VlanID" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>VLAN for users failed in authentication</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name ="OfflineDetectInterval" type="WEBAUTH_DetectIdleTime" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Detecting offline user timer</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                  </xs:all>
                  <xs:attributeGroup ref="base:RowAttributeGroup"></xs:attributeGroup>
                </xs:complexType>
   		      </xs:element>
            </xs:choice>
            <xs:attributeGroup ref="base:TableAttributeGroup"></xs:attributeGroup>
          </xs:complexType>
        </xs:element>
        <xs:element name="UrlParams">
          <xs:annotation>
            <xs:documentation>UrlParams table</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
              <xs:element name="UrlParam">
                <xs:annotation>
                  <xs:documentation>Row name UrlParam</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:all>
                    <xs:element name ="ServerName" type="WEBAUTH_Name" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Name of the web-auth server</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name ="ParamName" type="WEBAUTH_Name" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Parameter name of the URL</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name ="ParamType" type="WEBAUTH_ParamType" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Parameter type</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name ="SelfDefValue" type="WEBAUTH_URL" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Self-defined parameter</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                  </xs:all>
                  <xs:attributeGroup ref="base:RowAttributeGroup"></xs:attributeGroup>
                </xs:complexType>
   		      </xs:element>
            </xs:choice>
            <xs:attributeGroup ref="base:TableAttributeGroup"></xs:attributeGroup>
          </xs:complexType>
        </xs:element>
         <xs:element name="ProxyPorts">
           <xs:annotation>
             <xs:documentation>ProxyPorts table</xs:documentation>
           </xs:annotation>
           <xs:complexType>
             <xs:choice minOccurs="0" maxOccurs="unbounded">
               <xs:element name="ProxyPort">
                 <xs:annotation>
                   <xs:documentation>Row name UrlParam</xs:documentation>
                 </xs:annotation>
                 <xs:complexType>
                   <xs:all>
                     <xs:element name ="PortNumber" type="WEBAUTH_Port" minOccurs="0" nillable="true">
                       <xs:annotation>
                         <xs:documentation>Port number of TCP</xs:documentation>
                       </xs:annotation>
                     </xs:element>
                   </xs:all>
                   <xs:attributeGroup ref="base:RowAttributeGroup"></xs:attributeGroup>
                 </xs:complexType>
			   </xs:element>
             </xs:choice>
             <xs:attributeGroup ref="base:TableAttributeGroup"></xs:attributeGroup>
           </xs:complexType>
         </xs:element>

   	  </xs:choice>
   	  <xs:attributeGroup ref="base:NodeAttributeGroup"></xs:attributeGroup>
    </xs:complexType>
  </xs:element>
</xs:schema>