<?xml version="1.0" encoding="gb2312"?>
<xs:schema targetNamespace="http://www.h3c.com/netconf/action:1.0"
                  elementFormDefault="qualified"
                  xmlns:base="http://www.h3c.com/netconf/base:1.0"
                  xmlns="http://www.h3c.com/netconf/action: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 action 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>
  
  <xs:element name="PKEY"> 
    <xs:complexType>
      <xs:choice maxOccurs="unbounded">
        <!--PKEY Table-->
        
        <!--ExportPublicKeys Table-->
        <xs:element name="ExportPublicKeys">
          <xs:annotation>
            <xs:documentation>Export local public key in SSH format</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:choice maxOccurs="unbounded">
              <xs:element name="Export">
                <xs:annotation>
                  <xs:documentation>Row name</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:all>
				    <xs:element name="AlgID" minOccurs="0">
                      <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 character, a key name with 0 characters belongs to a default key
                        </xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="PKEY_PkeyName">
                            <xs:minLength value="0"></xs:minLength>
                            <xs:maxLength value="64"></xs:maxLength>
                          </xs:restriction>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="FormatID" minOccurs="0">
                      <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="FileName" minOccurs="0" nillable="true">
                      <xs:annotation>
                        <xs:documentation>
                         User path of the file, which the public key will be exported to
                           1 to 128 characters, Case insensitive,The path can't be the followed value: "hostkey", "serverkey", "dsakey", "ecdsakey", path which only contain  "." ".", path which first character is "/", path which contains "./" or "../"
                        </xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="base:String">
                            <xs:minLength value="1"></xs:minLength>
                            <xs:maxLength value="128"></xs:maxLength>
                          </xs:restriction>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="ReplaceFile" type="xs:boolean" minOccurs="0">
                      <xs:annotation>
                        <xs:documentation>
                          If replace existed file
                          Boolean:
                          true
                          false
                        </xs:documentation>
                      </xs:annotation>
                    </xs:element>
                  </xs:all>
                </xs:complexType>
              </xs:element>
            </xs:choice>
          </xs:complexType>
        </xs:element>

	<!--ImportPeerKeys Table-->
        <xs:element name="ImportPeerKeys">
          <xs:annotation>
            <xs:documentation>Import peer public key pairs</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:choice maxOccurs="unbounded">
              <xs:element name="Import">
                <xs:annotation>
                  <xs:documentation>Row name</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:all>
                    <xs:element name="PeerKeyName" minOccurs="0">
                      <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="FileName" minOccurs="0">
                      <xs:annotation>
                        <xs:documentation>Path of peer key file, 1 to 128 characters</xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="base:String">
                            <xs:minLength value="1"></xs:minLength>
                            <xs:maxLength value="128"></xs:maxLength>
                          </xs:restriction>
                        </xs:simpleContent>
                      </xs:complexType>   
		            </xs:element>
		            <xs:element name="ReplaceKey" minOccurs="0" type="xs:boolean">
                      <xs:annotation>
                        <xs:documentation>If replace existed peer key, boolean: true, false, default value is false</xs:documentation>
                      </xs:annotation>                        
                    </xs:element>
                  </xs:all>
                </xs:complexType>
              </xs:element>
            </xs:choice>
          </xs:complexType>
        </xs:element>

        <!--CreateLocalKeys Table-->
        <xs:element name="CreateLocalKeys">
          <xs:annotation>
            <xs:documentation>Create local asymmetric key pairs</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:choice maxOccurs="unbounded">
              <xs:element name="Create">
                <xs:annotation>
                  <xs:documentation>Row name</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:all>
				  <xs:element name="AlgID" minOccurs="0">
                      <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, a key name with 0 characters belongs to a default key
                        </xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="PKEY_PkeyName">
                            <xs:minLength value="0"></xs:minLength>
                            <xs:maxLength value="64"></xs:maxLength>
                          </xs:restriction>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                    <xs:element name="Length" minOccurs="0">
                      <xs:annotation>
                        <xs:documentation>
                          Length of public key, See table PKEYCapabilities for supported length
                        </xs:documentation>
                      </xs:annotation>
					  <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="base:UnsignedInteger32">
                            <xs:minInclusive value="192"></xs:minInclusive>
                            <xs:maxInclusive value="2048"></xs:maxInclusive>
                          </xs:restriction>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
					<xs:element name="ReplaceKey" type="base:Boolean" minOccurs="0">
                      <xs:annotation>
                        <xs:documentation>
                          If replace existed local asymmetric key
                        </xs:documentation>
                      </xs:annotation>
                    </xs:element>
                  </xs:all>
                </xs:complexType>
              </xs:element>
            </xs:choice>
          </xs:complexType>
        </xs:element>

        <!--DestroyLocalKeys Table-->
        <xs:element name="DestroyLocalKeys">
          <xs:annotation>
            <xs:documentation>Destroy local asymmetric key pairs</xs:documentation>
          </xs:annotation>
          <xs:complexType>
            <xs:choice maxOccurs="unbounded">
              <xs:element name="Destroy">
                <xs:annotation>
                  <xs:documentation>Row name</xs:documentation>
                </xs:annotation>
                <xs:complexType>
                  <xs:all>
				  <xs:element name="AlgID" minOccurs="0">
                      <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, a key name with 0 characters belongs to a default key
                        </xs:documentation>
                      </xs:annotation>
                      <xs:complexType>
                        <xs:simpleContent>
                          <xs:restriction base="PKEY_PkeyName">
                            <xs:minLength value="0"></xs:minLength>
                            <xs:maxLength value="64"></xs:maxLength>
                          </xs:restriction>
                        </xs:simpleContent>
                      </xs:complexType>
                    </xs:element>
                  </xs:all>
                </xs:complexType>
              </xs:element>
            </xs:choice>
          </xs:complexType>
        </xs:element>
     </xs:choice>
    </xs:complexType>
  </xs:element>
</xs:schema>