<?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>
  
  <!-- system boot type as follows: main: 1 backup: 2 -->
  <xs:complexType name="BootTypeEnum">
    <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>
  
  <!-- install ation type as follows: activate: 1 deactivate: 2 -->
  <xs:complexType name="InstallActionType">
    <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>
  
  <!-- ISSU action type as follows: none: 1 test:2 install:3 rollback: 4 done:5 -->
  <xs:complexType name="IssuActionType">
    <xs:simpleContent>
      <xs:restriction base="base:UnsignedInteger32">
        <xs:enumeration value="1"></xs:enumeration>
        <xs:enumeration value="2"></xs:enumeration>
        <xs:enumeration value="3"></xs:enumeration>
        <xs:enumeration value="4"></xs:enumeration>
        <xs:enumeration value="5"></xs:enumeration>
      </xs:restriction> 
    </xs:simpleContent>
  </xs:complexType>
  
  <!-- issu string 1-63 -->
  <xs:complexType name="IssuStringType1_63">
    <xs:simpleContent >
      <xs:restriction base="base:String">
        <xs:minLength value="1" />
        <xs:maxLength value="63" />
      </xs:restriction> 
    </xs:simpleContent>
  </xs:complexType>
  
  <!-- issu string 1-127 -->
  <xs:complexType name="IssuStringType1_127">
    <xs:simpleContent >
      <xs:restriction base="base:String">
        <xs:minLength value="1" />
        <xs:maxLength value="127" />
      </xs:restriction> 
    </xs:simpleContent>
  </xs:complexType>
  
  <xs:element name="OverwriteLocalFile" type="base:Boolean" nillable="true" default="false" />
  <xs:element name="DeleteIPEFile" type="base:Boolean" nillable="true" default="false" />
  <xs:element name="AutoDeleteFile" type="base:Boolean" nillable="true" default="false" />
  
  <!-- issu bin pkg type -->
  <xs:complexType name="IssuBinImagesType1_127">
    <xs:sequence>
      <xs:element name="Boot" type="IssuStringType1_127" minOccurs="0" maxOccurs="1" />
      <xs:element name="System" type="IssuStringType1_127" minOccurs="0" maxOccurs="1" />
      <xs:element name="Feature" type="IssuStringType1_127" minOccurs="0" maxOccurs="30" />
    </xs:sequence>
  </xs:complexType>
  
  <xs:complexType name="IssuBinImagesType1_63">
    <xs:sequence>
      <xs:element name="Boot" type="IssuStringType1_63" minOccurs="0" maxOccurs="1" />
      <xs:element name="System" type="IssuStringType1_63" minOccurs="0" maxOccurs="1" />
      <xs:element name="Feature" type="IssuStringType1_63" minOccurs="0" maxOccurs="30" />
    </xs:sequence>
  </xs:complexType>
  
  <!-- config boot images type -->
  <xs:complexType name="BootImagesType1_127">
    <xs:sequence>
      <xs:element name="Boot" type="IssuStringType1_127" minOccurs="1" maxOccurs="1" />
      <xs:element name="System" type="IssuStringType1_127" minOccurs="1" maxOccurs="1" />
      <xs:element name="Feature" type="IssuStringType1_127" minOccurs="0" maxOccurs="30" />
    </xs:sequence>
  </xs:complexType>
  
  <xs:complexType name="DeviceNodeType">
    <xs:all>
      <xs:element name="Chassis" type="base:UnsignedShort" minOccurs="1" maxOccurs="1" />
      <xs:element name="Slot" type="base:UnsignedShort" minOccurs="1" maxOccurs="1" />
      <xs:element name="CPUID" type="base:UnsignedShort" minOccurs="1" maxOccurs="1" />
    </xs:all>
  </xs:complexType>
  
  <!-- Package -->
  <xs:element name="Package">
    <xs:complexType>
      <xs:choice>
      
        <!-- boot-loader file  -->
        <xs:element name="SetBootImage"> 
          <xs:complexType>
            <xs:all>
              <xs:element name="DeviceNode" type="DeviceNodeType" minOccurs="0" maxOccurs="1" nillable="true"/>
              <xs:element name="ImageFiles" type="BootImagesType1_127" minOccurs="0" maxOccurs="1" />
              <xs:element name="IPEFileName" type="IssuStringType1_127" minOccurs="0" maxOccurs="1" />
              <xs:element name="Type" type="BootTypeEnum" minOccurs="1" maxOccurs="1" />
              <xs:element ref="OverwriteLocalFile" minOccurs="0" maxOccurs="1" />
              <xs:element ref="DeleteIPEFile" minOccurs="0" maxOccurs="1" />
            </xs:all>
          </xs:complexType>
        </xs:element>
        
        <!-- boot-loader Extend  -->
        <xs:element name="SetExtendImage"> 
          <xs:complexType>
            <xs:choice maxOccurs="unbounded">
              <xs:element name="ExtendImage">
                <xs:complexType>
                  <xs:all>
                    <xs:element name="Model" type="IssuStringType1_63" minOccurs="1" maxOccurs="1" />
                    <xs:element name="ImageFiles" type="BootImagesType1_127" minOccurs="0" maxOccurs="1" />
                    <xs:element name="IPEFileName" type="IssuStringType1_127" minOccurs="0" maxOccurs="1" />
                    <xs:element name="Type" type="BootTypeEnum" minOccurs="1" maxOccurs="1" />
                    <xs:element ref="OverwriteLocalFile" minOccurs="0" maxOccurs="1" />
                    <xs:element ref="DeleteIPEFile" minOccurs="0" maxOccurs="1" />
                  </xs:all>
                </xs:complexType>
              </xs:element>
            </xs:choice>
          </xs:complexType>
        </xs:element>
        
        <!-- install activate|deactive (mpu)  -->
        <xs:element name="InstallImage">
          <xs:complexType>
            <xs:all>
              <xs:element name="Action" type="InstallActionType" minOccurs="1" maxOccurs="1" />
              <xs:element name="ImageFiles" minOccurs="0">
                <xs:complexType>
                  <xs:sequence>
                    <xs:element name="Feature" type="IssuStringType1_127" minOccurs="1" maxOccurs="30" />
                  </xs:sequence>
                </xs:complexType>
              </xs:element>
              <xs:element name="PatchFile" type="IssuStringType1_127" minOccurs="0" />
              <xs:element ref="OverwriteLocalFile" minOccurs="0" maxOccurs="1" />
              <xs:element name="DeviceNode" type="DeviceNodeType" minOccurs="0" maxOccurs="1" />
            </xs:all>
          </xs:complexType>
        </xs:element>
        
        <!-- issu mpu file -->
        <xs:element name="SetIssuMPUFile">
          <xs:complexType>
            <xs:all>
              <xs:element name="ImageFiles" type="IssuBinImagesType1_63" minOccurs="0" maxOccurs="1" />
              <xs:element name="IPEFileName" type="IssuStringType1_63" minOccurs="0" maxOccurs="1" />
              <xs:element ref="OverwriteLocalFile" minOccurs="0" maxOccurs="1" />
              <xs:element ref="DeleteIPEFile" minOccurs="0" maxOccurs="1" />
            </xs:all>
          </xs:complexType>
        </xs:element>
        
                <!-- issu Extend file -->
        <xs:element name="SetIssuExtendFile">
           <xs:complexType>
            <xs:choice maxOccurs="unbounded">
              <xs:element name="IssuExtendFile"> 
                <xs:complexType>
                  <xs:all>
                    <xs:element name="Model" type="IssuStringType1_63" minOccurs="1" maxOccurs="1" />
                    <xs:element name="ImageFiles" type="IssuBinImagesType1_127" minOccurs="0" maxOccurs="1" />
                    <xs:element name="IPEFileName" type="IssuStringType1_127" minOccurs="0" maxOccurs="1" />
                    <xs:element ref="OverwriteLocalFile" minOccurs="0" maxOccurs="1" />
                    <xs:element ref="AutoDeleteFile" minOccurs="0" maxOccurs="1" />
                  </xs:all>
                </xs:complexType>
              </xs:element>
            </xs:choice>
          </xs:complexType>
        </xs:element>
        
        <!-- issu action execute as follows: none test,install,rollback,done -->
        <xs:element name="IssuUpgrade">
          <xs:complexType>
            <xs:all>
              <xs:element name="Action" type="IssuActionType" minOccurs="1" maxOccurs="1" />
              <xs:element name="Timeout" minOccurs="0" maxOccurs="1" nillable="true">
                <xs:complexType>
                  <xs:simpleContent>
                    <xs:restriction base="base:UnsignedInteger32">
                      <xs:minInclusive value="0" />
                      <xs:maxInclusive value="120" />
                    </xs:restriction> 
                  </xs:simpleContent>
                </xs:complexType>
              </xs:element>
              <xs:element name="Delay" minOccurs="0" maxOccurs="1" nillable="true">
                <xs:complexType>
                  <xs:simpleContent>
                    <xs:restriction base="base:UnsignedInteger32">
                      <xs:minInclusive value="0" />
                      <xs:maxInclusive value="1440" />
                    </xs:restriction> 
                  </xs:simpleContent>
                </xs:complexType>
              </xs:element>
            </xs:all>
          </xs:complexType>
        </xs:element>
        
        <!-- install add -->
        <xs:element name="AddIPE">
          <xs:complexType>
            <xs:all>
              <xs:element name="IPEFileName" type="IssuStringType1_127" minOccurs="1" maxOccurs="1" />
              <xs:element name="StorageCard" type="base:String" minOccurs="1" maxOccurs="1" />
              <xs:element ref="OverwriteLocalFile" minOccurs="0" maxOccurs="1" />
              <xs:element ref="DeleteIPEFile" minOccurs="0" maxOccurs="1" />
            </xs:all>
          </xs:complexType>
        </xs:element>
        
      </xs:choice>
    </xs:complexType>
  </xs:element>
</xs:schema>
