<?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>
  <xs:import schemaLocation="netconf.xsd" namespace="urn:ietf:params:xml:ns:netconf:base:1.0"></xs:import>

  <xs:annotation>
    <xs:documentation>Primap config define</xs:documentation>
  </xs:annotation>

  <xs:complexType name="PRIMAP_Precedence">
    <xs:simpleContent>
      <xs:restriction base="base:UnsignedInteger32">
        <xs:minInclusive value ="0"></xs:minInclusive>
        <xs:maxInclusive value ="7"></xs:maxInclusive>
      </xs:restriction>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="PRIMAP_Dscp">
    <xs:simpleContent>
      <xs:restriction base="base:UnsignedInteger32">
        <xs:minInclusive value ="0"></xs:minInclusive>
        <xs:maxInclusive value ="63"></xs:maxInclusive>
      </xs:restriction>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="PRIMAP_DropPriority">
    <xs:simpleContent>
      <xs:restriction base="base:UnsignedInteger32">
        <xs:minInclusive value ="0"></xs:minInclusive>
        <xs:maxInclusive value ="2"></xs:maxInclusive>
      </xs:restriction>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="PRIMAP_TrustMode">
    <xs:simpleContent >
      <xs:restriction base="base:UnsignedInteger32">
        <xs:annotation>
          <xs:documentation>Enumeration: 1(Untrust) 2(Dot1p) 3(DSCP) 4(EXP) 5(IP precedence) 6(Dot11e) 7(Auto)</xs:documentation>
        </xs:annotation>
        <xs:enumeration value="1" />
        <xs:enumeration value="2" />
        <xs:enumeration value="3" />
        <xs:enumeration value="4" />
        <xs:enumeration value="5" />
        <xs:enumeration value="6" />
        <xs:enumeration value="7" />
      </xs:restriction>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="PRIMAP_SourceType">
    <xs:simpleContent >
      <xs:restriction base="base:UnsignedInteger32">
        <xs:annotation>
          <xs:documentation>Enumeration: 1(Dot11e) 2(Dot1p) 3(Dscp) 4(Exp) 5(IP precedence) 6(Local precedence) 7(User priority)</xs:documentation>
        </xs:annotation>
        <xs:enumeration value="1" />
        <xs:enumeration value="2" />
        <xs:enumeration value="3" />
        <xs:enumeration value="4" />
        <xs:enumeration value="5" />
        <xs:enumeration value="6" />
        <xs:enumeration value="7" />
      </xs:restriction>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="PRIMAP_TargetType">
    <xs:simpleContent >
      <xs:restriction base="base:UnsignedInteger32">
        <xs:annotation>
          <xs:documentation>Enumeration: 1(Dot11e) 2(Dot1p) 3(Drop priority) 4(Dscp) 5(Exp) 6(Forwarding-class priority) 7(Local precedence) 8(RPR priority) 9(User priority)</xs:documentation>
        </xs:annotation>
        <xs:enumeration value="1" />
        <xs:enumeration value="2" />
        <xs:enumeration value="3" />
        <xs:enumeration value="4" />
        <xs:enumeration value="5" />
        <xs:enumeration value="6" />
        <xs:enumeration value="7" />
        <xs:enumeration value="8" />
        <xs:enumeration value="9" />
      </xs:restriction>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="PRIMAP_Color">
    <xs:simpleContent >
      <xs:restriction base="base:UnsignedInteger32">
        <xs:annotation>
          <xs:documentation>Pkt color. 0£ºnocolor 1£ºgreen 2£ºred 3£ºyellow</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="PRIMAP_Direction">
    <xs:simpleContent >
      <xs:restriction base="base:UnsignedInteger32">
        <xs:annotation>
          <xs:documentation>Enumeration: 0 (inbound) 1(outbound) 2(both)</xs:documentation>
        </xs:annotation>
        <xs:enumeration value="0" />
        <xs:enumeration value="1" />
        <xs:enumeration value="2" />
      </xs:restriction>
    </xs:simpleContent>
  </xs:complexType>

  <xs:element name="PRIMAP">
    <xs:complexType>
      <xs:choice minOccurs="0" maxOccurs="unbounded">
        <xs:element name="MapTables">
          <xs:annotation>
            <xs:documentation>Priority mapping table</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
              <xs:element name="MapTable">
                <xs:annotation>
                  <xs:documentation>Row name</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:all>
                    <xs:element name="Source" type="PRIMAP_SourceType" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Interface Index</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="Target" type="PRIMAP_TargetType" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Port priority trust mode</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="Color" type="PRIMAP_Color" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Port priority trust mode</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="Direction" type="PRIMAP_Direction" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Port priority trust mode</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="Import" type="PRIMAP_Dscp" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Port priority trust mode</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="Export" type="PRIMAP_Dscp" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Port priority trust mode</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="PortPriority">
          <xs:annotation>
            <xs:documentation>Port priority table</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
              <xs:element name="Port">
                <xs:annotation>
                  <xs:documentation>Row name</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:all>
                    <xs:element name="IfIndex" type="base:NameAndIndexUnion" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Interface Index</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="Dscp" type="PRIMAP_Dscp" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>DSCP</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="Dot1p" type="PRIMAP_Precedence" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>802.1p priority</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="Exp" type="PRIMAP_Precedence" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>MPLS EXP</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="DropPriority" type="PRIMAP_DropPriority" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Drop priority</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="LocalPrecedence" type="PRIMAP_Precedence" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Local precedence</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="Priority" type="PRIMAP_Precedence" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Port default priority</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="PortTrustMode">
          <xs:annotation>
            <xs:documentation>Port priority trust mode table</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:choice minOccurs="0" maxOccurs="unbounded">
              <xs:element name="Port">
                <xs:annotation>
                  <xs:documentation>Row name</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:all>
                    <xs:element name="IfIndex" type="base:NameAndIndexUnion" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Interface Index</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="TrustMode" type="PRIMAP_TrustMode" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Port priority trust mode</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="Override" type="xs:boolean" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Overwrite the original priority carried in the packet</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>
        <!-- Trust Tunnel Dscp Table -->
        <xs:element name="GlobalTrustMode" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Trust tunnel dscp table</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:all>
              <xs:element name="TunnelDscp" type="xs:boolean" minOccurs="0" nillable="true">
                <xs:annotation>
                  <xs:documentation>Whether trust tunnel dscp.</xs:documentation>
                </xs:annotation>
              </xs:element>
            </xs:all>
            <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>