home *** CD-ROM | disk | FTP | other *** search
/ Thomson (Residential) / TGSTPv7203.iso / mac / HIW / xml / mod_setup_hostconfig.xml < prev    next >
Extensible Markup Language  |  2008-02-11  |  2KB  |  52 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!DOCTYPE fsm SYSTEM "fsm.dtd">
  3. <!-- 
  4.     Checks for and executes host interface configuration.
  5.     Compares the current interface and the new interface and decides what action
  6.     (DHCP renew, IP config or nothing) must be done.
  7.     
  8.     Input properties:
  9.     - currentInterface: The current interface on the host (required)
  10.     - newInterface: The new interface. (required)
  11.  
  12.   Exit events:
  13.   - finished: Host configuration is done.
  14.   - needReboot: Host configuration is done and a reboot is necessary.
  15. -->
  16.  
  17. <fsm>
  18.   <property key="currentInterface" required="yes"/>
  19.   <property key="newInterface" required="yes"/>
  20.     <states>
  21.         <state type="setupDevice_checkHostConfig" name="checkHostConfig" weight="1"/>
  22.     <state type="dhcpRenew" name="dhcpRenew" weight="50"/>
  23.     <state type="dhcpRenew" name="retryDhcpRenew" weight="10"/>
  24.     <state type="ipConfig" name="ipConfig" weight="10"/>
  25.     </states>
  26.     <events>
  27.         <event name="finished"/>
  28.         <event name="needReboot"/>
  29.     </events>
  30.     <transitions>
  31.         <transition startstate="checkHostConfig">
  32.             <propertymap target="currentInterface" function="$fsm.currentInterface"/>
  33.             <propertymap target="newInterface" function="$fsm.newInterface"/>
  34.         </transition>
  35.         <transition fromstate="checkHostConfig" tostate="ipConfig" event="ipConfig">
  36.             <propertymap target="newInterface" function="$fsm.newInterface"/>
  37.         </transition>
  38.         <transition fromstate="checkHostConfig" tostate="dhcpRenew" event="dhcpRenew">
  39.             <propertymap target="interface" function="$fsm.currentInterface"/>
  40.         </transition>
  41.         <transition fromstate="dhcpRenew" tostate="retryDhcpRenew" event="renewFailed">
  42.             <propertymap target="interface" function="$fsm.currentInterface"/>
  43.         </transition>
  44.         <transition fromstate="checkHostConfig" toexit="finished" event="doNothing"/>
  45.         <transition fromstate="ipConfig" toexit="finished" event="interfaceUpdated"/>
  46.         <transition fromstate="ipConfig" toexit="needReboot" event="needReboot"/>
  47.         <transition fromstate="dhcpRenew" toexit="finished" event="interfaceRenewed"/>
  48.         <transition fromstate="retryDhcpRenew" toexit="finished" event="interfaceRenewed"/>
  49.         <transition fromstate="retryDhcpRenew" toexit="needReboot" event="renewFailed"/>
  50.     </transitions>
  51. </fsm>
  52.