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


  
  <xs:complexType name="RIP_InstanceName_NUM">
    <xs:simpleContent >
      <xs:restriction base="base:UnsignedShort">
        <xs:minInclusive value ="1"/>
      </xs:restriction>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="RIP_PwdType">
    <xs:annotation>
      <xs:documentation>Password type 1: Ciphertext, 2:Plaintext</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:restriction base="base:UnsignedChar">
         <!-- Cipher -->
         <xs:enumeration value="1"/>
         <!-- Plain -->
         <xs:enumeration value="2"/>
      </xs:restriction>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="RIP_AuthType">
    <xs:annotation>
      <xs:documentation>Auth type 1: Simple, 2: MD5Rfc2082, 3: MD5Rfc2453 </xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:restriction base="base:UnsignedChar">
         <!-- Simple -->
         <xs:enumeration value="1"/>
         <!-- Md5Rfc2082 -->
         <xs:enumeration value="2"/>
         <!-- Md5Rfc2453 -->
         <xs:enumeration value="3"/>
      </xs:restriction>
    </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="RIP_AuthPwd">
    <xs:annotation>
      <xs:documentation>MD5 password</xs:documentation>
    </xs:annotation>
      <xs:simpleContent>
        <xs:restriction base="base:EncryptString">
          <xs:minLength value="1"/>
          <xs:maxLength value="53"/>
        </xs:restriction>
      </xs:simpleContent>
  </xs:complexType>

  <xs:complexType name="RIP_AuthMd5KeyId">
    <xs:annotation>
      <xs:documentation>MD5 Key ID 1-255</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:restriction base="base:UnsignedChar">
        <xs:minInclusive value="1"/>
      </xs:restriction>
    </xs:simpleContent>
  </xs:complexType>
  
  <xs:annotation>
    <xs:documentation >
      RIP config definition
    </xs:documentation>
  </xs:annotation>
  <xs:element name="RIP">
    <xs:complexType>
      <xs:choice maxOccurs="unbounded">

        <!-- Instances -->
        <xs:element name="Instances" minOccurs="0">
          <xs:annotation><xs:documentation>RIP Instance Table</xs:documentation></xs:annotation>
          <xs:complexType>
            <xs:choice maxOccurs="unbounded">
              <xs:element name="Instance" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation><xs:documentation>Row name</xs:documentation></xs:annotation>
                <xs:complexType>
                  <xs:all>                  
                    <xs:element name="Name"  minOccurs="0"  type="RIP_InstanceName_NUM" nillable="true">
                      <xs:annotation><xs:documentation>Instance name</xs:documentation> </xs:annotation>
                    </xs:element>
                    <xs:element name ="VRF" minOccurs="0" type="base:VRF" nillable="true">
                      <xs:annotation><xs:documentation>Vrf name</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>
        
        <!-- Networks -->
        <xs:element name="Networks" minOccurs="0">
          <xs:annotation>
            <xs:documentation>RIP Network Table</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:choice maxOccurs="unbounded">
              <xs:element name="Network" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                  <xs:documentation>Row name</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:all>
                    <xs:element name="Name"  minOccurs="0"  type="RIP_InstanceName_NUM" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Instance name</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="NetworkAddr"  minOccurs="0"  type="base:IpAddress" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Network address</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="WildcardMask"  minOccurs="0"  type="base:IpAddress" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Wildcard 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>
        
      <!-- Interfaces -->
      <xs:element name="Interfaces" minOccurs="0">
          <xs:annotation><xs:documentation>rip interface  table</xs:documentation></xs:annotation>
          <xs:complexType>
            <xs:choice maxOccurs="unbounded">
              <xs:element name="If" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation><xs:documentation>Row name</xs:documentation></xs:annotation>
                <xs:complexType>
                  <xs:all>
                    <xs:element name="IfIndex"  minOccurs="0"  type="base:NameAndIndexUnion" nillable="true">
                      <xs:annotation><xs:documentation>Interface index</xs:documentation></xs:annotation>
                    </xs:element>
                    
                    <xs:element name="Version"  minOccurs="0" nillable="true">
                      <xs:annotation><xs:documentation>Version</xs:documentation></xs:annotation>
                      	<xs:complexType>
                          <xs:simpleContent >
                            <xs:restriction base="base:UnsignedChar">
                            <!-- RipV1 -->
                            <xs:enumeration value="1"/>
                            <!-- RipV2 -->
                            <xs:enumeration value="2"/>
                            <!-- RipV2 Broadcast -->
                            <xs:enumeration value="3"/>
                            </xs:restriction>
                         </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                    
                    <xs:element name="IfEnable" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Interface enable</xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:all>
                          <xs:element name="Name" minOccurs="0" type="RIP_InstanceName_NUM" nillable="true">
                            <xs:annotation>
                              <xs:documentation>Instance name</xs:documentation>
                            </xs:annotation>
                          </xs:element>
                          <xs:element name="ExcludedSubIp" minOccurs="0" type="base:Boolean" nillable="true">
                            <xs:annotation>
                              <xs:documentation>Whether to exclude secondary IP addresses</xs:documentation>
                            </xs:annotation>
                          </xs:element>
                        </xs:all>
                      </xs:complexType>
                    </xs:element>
                    
                    <xs:element name="Input"  minOccurs="0"  type="base:Boolean" nillable="true">
                      <xs:annotation><xs:documentation>Input</xs:documentation></xs:annotation>
                    </xs:element>
                    
                    <xs:element name="Output"  minOccurs="0"  type="base:Boolean" nillable="true">
                      <xs:annotation><xs:documentation>Input</xs:documentation></xs:annotation>
                    </xs:element>
                   
                    <xs:element name="Authentication" minOccurs="0" nillable="true">
                      <xs:annotation><xs:documentation>Simple authentication</xs:documentation></xs:annotation>
                      <xs:complexType>
                        <xs:all>
                          <xs:element name="AuthType" minOccurs="0"  type="RIP_AuthType" nillable="true">
                            <xs:annotation><xs:documentation>Authentication type</xs:documentation></xs:annotation>
                          </xs:element>
                          <xs:element name="PasswordType" minOccurs="0" type="RIP_PwdType" nillable="true">
                            <xs:annotation><xs:documentation>Password Type</xs:documentation></xs:annotation>
                          </xs:element>
                          <xs:element name="Password" minOccurs="0" type="RIP_AuthPwd" nillable="true">
                            <xs:annotation><xs:documentation>Simple password</xs:documentation></xs:annotation>
                          </xs:element>
                          <xs:element name="KeyId" minOccurs="0" type="RIP_AuthMd5KeyId" nillable="true">
                            <xs:annotation><xs:documentation>Simple password</xs:documentation></xs:annotation>
                          </xs:element>
                        </xs:all>
                      </xs:complexType>
                    </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>

	<!-- Redistributes Table -->
        <xs:element name="Redistributes" minOccurs="0">
          <xs:annotation><xs:documentation>Rip Redistributes Table</xs:documentation></xs:annotation>
          <xs:complexType>
            <xs:choice maxOccurs="unbounded">
              <xs:element name="Redist" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation><xs:documentation>Row name</xs:documentation></xs:annotation>
                <xs:complexType>
                  <xs:all>
                  
                    <xs:element name="Name"  minOccurs="0"  type="RIP_InstanceName_NUM" nillable="true">
                      <xs:annotation> <xs:documentation>Instance Name</xs:documentation> </xs:annotation>
                    </xs:element>

                    <xs:element name="Protocol"  minOccurs="0"  nillable="true">
                      <xs:annotation><xs:documentation>Protocol Type</xs:documentation></xs:annotation>
                        <xs:complexType>
                          <xs:simpleContent >
                            <xs:restriction base="base:UnsignedChar">
                            <!-- Direct -->
                            <xs:enumeration value="1"/>
                            <!-- Static -->
                            <xs:enumeration value="2"/>
                            <!-- RIP -->
                            <xs:enumeration value="3"/>
                            <!-- OSPF -->
                            <xs:enumeration value="4"/>
                            <!-- ISIS -->
                            <xs:enumeration value="5"/>
                            <!-- BGP -->
                            <xs:enumeration value="6"/>
                          </xs:restriction>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                    
                    <xs:element name="RedistName"  minOccurs="0"  type="RIP_InstanceName_NUM" nillable="true">
                      <xs:annotation><xs:documentation>Redistribute Instance Name</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>
