home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Thomson (Residential)
/
TGSTPv7203.iso
/
mac
/
HIW
/
xml
/
mod_setup_hostconfig.xml
< prev
next >
Wrap
Extensible Markup Language
|
2008-02-11
|
2KB
|
52 lines
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE fsm SYSTEM "fsm.dtd">
<!--
Checks for and executes host interface configuration.
Compares the current interface and the new interface and decides what action
(DHCP renew, IP config or nothing) must be done.
Input properties:
- currentInterface: The current interface on the host (required)
- newInterface: The new interface. (required)
Exit events:
- finished: Host configuration is done.
- needReboot: Host configuration is done and a reboot is necessary.
-->
<fsm>
<property key="currentInterface" required="yes"/>
<property key="newInterface" required="yes"/>
<states>
<state type="setupDevice_checkHostConfig" name="checkHostConfig" weight="1"/>
<state type="dhcpRenew" name="dhcpRenew" weight="50"/>
<state type="dhcpRenew" name="retryDhcpRenew" weight="10"/>
<state type="ipConfig" name="ipConfig" weight="10"/>
</states>
<events>
<event name="finished"/>
<event name="needReboot"/>
</events>
<transitions>
<transition startstate="checkHostConfig">
<propertymap target="currentInterface" function="$fsm.currentInterface"/>
<propertymap target="newInterface" function="$fsm.newInterface"/>
</transition>
<transition fromstate="checkHostConfig" tostate="ipConfig" event="ipConfig">
<propertymap target="newInterface" function="$fsm.newInterface"/>
</transition>
<transition fromstate="checkHostConfig" tostate="dhcpRenew" event="dhcpRenew">
<propertymap target="interface" function="$fsm.currentInterface"/>
</transition>
<transition fromstate="dhcpRenew" tostate="retryDhcpRenew" event="renewFailed">
<propertymap target="interface" function="$fsm.currentInterface"/>
</transition>
<transition fromstate="checkHostConfig" toexit="finished" event="doNothing"/>
<transition fromstate="ipConfig" toexit="finished" event="interfaceUpdated"/>
<transition fromstate="ipConfig" toexit="needReboot" event="needReboot"/>
<transition fromstate="dhcpRenew" toexit="finished" event="interfaceRenewed"/>
<transition fromstate="retryDhcpRenew" toexit="finished" event="interfaceRenewed"/>
<transition fromstate="retryDhcpRenew" toexit="needReboot" event="renewFailed"/>
</transitions>
</fsm>