<?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 namespace="http://www.h3c.com/netconf/base:1.0" schemaLocation="basetype.xsd"></xs:import>
  <xs:annotation>
    <xs:documentation>
      PKEY data definition
    </xs:documentation>
  </xs:annotation>

 <xs:annotation>
  <xs:documentation>
   Key name, case insensitive, only containe character, number, "-"
  </xs:documentation>
 </xs:annotation>
  <xs:complexType name="PKEY_PkeyName">
    <xs:simpleContent>
      <xs:restriction base="base:String">
        <xs:pattern value="^[-A-Za-z0-9]{0,}$"></xs:pattern>
      </xs:restriction>
    </xs:simpleContent>
  </xs:complexType>

  
  <!--PKEY module-->
  <xs:element name="PKEY">
    <xs:complexType>
      <xs:choice maxOccurs="unbounded">
        <!--PKEY Table-->
        
        <!--PeerKeys-->
        <xs:element name="PeerKeys" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Get peer public keys</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:choice maxOccurs="unbounded">
              <xs:element name="Key" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                  <xs:documentation>Row name</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:all>
                    <xs:element name="PeerKeyName" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>
                          Name of peer pubilc key,1 to 31 characters
                        </xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="base:String">
                            <xs:minLength value="1"></xs:minLength>
                            <xs:maxLength value="64"></xs:maxLength>
                          </xs:restriction>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="AlgID" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>
			             Unsigned integer, 1 to 2^32-1
			            </xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="base:UnsignedInteger32">
                          </xs:restriction>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="Length" minOccurs="0" nillable="true" type="base:UnsignedInteger32">
                      <xs:annotation>
                        <xs:documentation>Length of asymmetric key, unsigned integer</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="Value" minOccurs="0" nillable="true" type="base:OctectString">
                      <xs:annotation>
                        <xs:documentation>PKCS#1 formatted hex string</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>

        <!--DefaultLocalKeys-->
        <xs:element name="DefaultLocalKeys" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Get default local public keys</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:choice maxOccurs="unbounded">
              <xs:element name="Key" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                  <xs:documentation>Row name</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:all>
                      <xs:element name="AlgID" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>
                         Unsigned integ, value range: 1 to 2^32-1
                        </xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="base:UnsignedInteger32">
                          <xs:minInclusive value="1"></xs:minInclusive>
                          </xs:restriction>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="Usage" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>
                          Key Usage
                          Enumeration:
                          1-hostkey
                          2-serverkey
                        </xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="base:UnsignedInteger32">
                            <xs:enumeration value="1"></xs:enumeration>
                            <xs:enumeration value="2"></xs:enumeration>
                          </xs:restriction>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="Length" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Length of local asymmetric key,unsigned integer</xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
					    <xs:simpleContent>
					      <xs:restriction base="base:UnsignedInteger32">
					      </xs:restriction>
					    </xs:simpleContent>
					  </xs:complexType>             
                    </xs:element>
                    <xs:element name="CreatedTime" minOccurs="0" nillable="true" >
	                  <xs:annotation>
	                    <xs:documentation>When is the key created</xs:documentation>
	                  </xs:annotation>
	                  <xs:complexType >
	                    <xs:simpleContent>
	                      <xs:restriction base="base:DateTime">
	                      </xs:restriction>
	                    </xs:simpleContent>
	                  </xs:complexType>
	                </xs:element>
                    <xs:element name="Value" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>PKCS#1 formatted hex string</xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="base:OctectString">
                          </xs:restriction>
                        </xs:simpleContent>
                      </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>

        <!--PKEYCapabilities-->
        <xs:element name="PKEYCapabilities" minOccurs="0">
          <xs:annotation>
            <xs:documentation>This table contains supported PKEY algorithm information</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:choice maxOccurs="unbounded">
              <xs:element name="PKEYCapability" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                  <xs:documentation>Row name</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:all>                   
                    <xs:element name="AlgID" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>
                         Unsigned integer, 1 to 2^32-1
                        </xs:documentation>
                      </xs:annotation>
       		           <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="base:UnsignedInteger32">
                          <xs:minInclusive value="1"></xs:minInclusive>
                          </xs:restriction>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="AlgName" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>
                          Name of algorithm
                        </xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="base:String">
                          </xs:restriction>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="MinLength" minOccurs="0" nillable="true" type="base:UnsignedInteger32">
                      <xs:annotation>
                        <xs:documentation>Minimal length of supported algorithm</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="MaxLength" minOccurs="0" nillable="true" type="base:UnsignedInteger32">
                      <xs:annotation>
                        <xs:documentation>Maximal length of supported algorithm</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="DefaultLength" minOccurs="0" nillable="true" type="base:UnsignedInteger32">
                      <xs:annotation>
                        <xs:documentation>Default length of supported algorithm</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="ExportFormatIDList" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Supported export SSH format list, data structure, members include: IDItem</xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:sequence>
			              <xs:element name="IDItem" minOccurs="0" maxOccurs="3" nillable="true" type="base:UnsignedInteger32">
                            <xs:annotation>
                              <xs:documentation>
                                Supported export SSH format list
		                      </xs:documentation>
                            </xs:annotation>
                          </xs:element>
			            </xs:sequence>
                      </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>
        
        <!--LocalKeys-->
        <xs:element name="LocalKeys" minOccurs="0">
          <xs:annotation>
            <xs:documentation> Get local public keys</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:choice maxOccurs="unbounded">
              <xs:element name="Key" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                  <xs:documentation>Row name</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:all>
                    <xs:element name="AlgID" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>
                        Unsigned integer, 1 to 2^32-1
                        </xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="base:UnsignedInteger32">
                         <xs:minInclusive value="1"></xs:minInclusive>
                          </xs:restriction>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="KeyName" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>
                          Name of local asymmetric key, 1 to 64 characters
                        </xs:documentation>
                      </xs:annotation>
                       <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="PKEY_PkeyName">
                            <xs:minLength value="1"></xs:minLength>
                            <xs:maxLength value="64"></xs:maxLength>
                          </xs:restriction>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="Length" minOccurs="0" nillable="true" type="base:UnsignedInteger32">
                      <xs:annotation>
                        <xs:documentation>Length of local asymmetric key, unsigned integer</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="CreatedTime" minOccurs="0" nillable="true" type="base:DateTime">
                      <xs:annotation>
                        <xs:documentation>Format: HH: MM: SS YYYY/MM/DDT</xs:documentation>
                      </xs:annotation>
                    </xs:element>
                    <xs:element name="Value" minOccurs="0" nillable="true" type="base:OctectString">
                      <xs:annotation>
                        <xs:documentation>PKCS#1 formatted hex string</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>
        
        <!--GetSSHPublicKeys-->
        <xs:element name="GetSSHPublicKeys" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Export local public key to SSH formatted data</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:choice maxOccurs="unbounded">
              <xs:element name="Key" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                  <xs:documentation>Row name</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:all>
                    <xs:element name="AlgID" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>
							Identity of algorithm
						</xs:documentation>
                      </xs:annotation>
		              <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="base:UnsignedInteger32">
                          <xs:minInclusive value="1"></xs:minInclusive>
                          </xs:restriction>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="KeyName" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>
                          Name of local asymmetric key, 0 to 64 characters
                        </xs:documentation>
                      </xs:annotation>
                       <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="PKEY_PkeyName">
                            <xs:minLength value="1"></xs:minLength>
                            <xs:maxLength value="64"></xs:maxLength>
                          </xs:restriction>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="FormatID" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Identity of SSH format</xs:documentation>
                      </xs:annotation>
		              <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="base:UnsignedInteger32">
                          <xs:minInclusive value="1"></xs:minInclusive>
                          </xs:restriction>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="Value" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Information of SSH format key</xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="base:OctectString">
                          </xs:restriction>
                        </xs:simpleContent>
                      </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>

        <!--SSHFormats-->
        <xs:element name="SSHFormats" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Supported SSH format</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:choice maxOccurs="unbounded">
              <xs:element name="SSHFormat" minOccurs="0" maxOccurs="unbounded">
                <xs:annotation>
                  <xs:documentation>Row name</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:all>
                    <xs:element name="FormatID" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Identity of SSH format</xs:documentation>
                      </xs:annotation>
		                <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="base:UnsignedInteger32">
                          <xs:minInclusive value="1"></xs:minInclusive>
                          </xs:restriction>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="FormatName" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>Name of supported SSH format</xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="base:String">
                          </xs:restriction>
                        </xs:simpleContent>
                      </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>

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