diff -r 000000000000 -r 3da2a79470a7 testexecmgmt/ucc/SampleScripts/script.0002.ucd --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/testexecmgmt/ucc/SampleScripts/script.0002.ucd Mon Mar 08 15:04:18 2010 +0800 @@ -0,0 +1,433 @@ +# +# Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies). +# All rights reserved. +# This component and the accompanying materials are made available +# under the terms of "Eclipse Public License v1.0" +# which accompanies this distribution, and is available +# at the URL "http://www.eclipse.org/legal/epl-v10.html". +# +# Initial Contributors: +# Nokia Corporation - initial contribution. +# +# Contributors: +# +# Description: +# + +####################################################################################### +# +# USE-CASE-2 : Emulate a foreign agent handoff (Linux-to-Linux) +# +####################################################################################### + +####################################################################################### +# +# SECTION-A : General Startup +# +####################################################################################### +####################################################################################### +# +# Start the services +# +####################################################################################### +runcmd svcid=5 svchost="penmn" methodid=1 PORT=7000 + check RESULT=0 +runcmd svcid=5 svchost="penpdsn" methodid=1 PORT=7000 + check RESULT=0 +runcmd svcid=7 svchost="penmn" methodid=1 + check RESULT=0 +runcmd svcid=7 svchost="penpdsn" methodid=1 + check RESULT=0 +runcmd svcid=2 svchost="penha" methodid=1 BASEINTERFACE=0 BASENETMASK=24 BASESTARTRANGE=100 BASEENDRANGE=199 VIRTUALNETWORKPREFIX="192.168.111.0" VIRTUALNETWORKMASK=24 VIRTUALNETWORKSIZE=4 + check RESULT=0 +runcmd svcid=3 svchost="penpdsn" methodid=1 BASEINTERFACEINDEX=0 NETMASK=24 STARTHOSTADDRESSRANGE=100 STOPHOSTADDRESSRANGE=199 + check RESULT=0 +runcmd svcid=4 svchost="penmn" methodid=1 + check RESULT=0 + +####################################################################################### +# +# HOME AGENT: Create a HA session and start the agent +# +####################################################################################### +runcmd svcid=2 svchost="penha" methodid=31 + assign ha0=RESULT +runcmd svcid=2 svchost="penha" methodid=3 AGENTID=ha0 + check RESULT=0 +runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=2000 +runcmd svcid=2 svchost="penha" methodid=9 AGENTID=ha0 + check RESULT=0 + assign home_agent_address0=STATUS_HOME_AGENT_ADDRESS + assign home_address0=VIRTUAL_NETWORK_ADDRESS_0 + + +####################################################################################### +# +# SECTION-B : Start the first mobile ip session +# +####################################################################################### +####################################################################################### +# +# MOBSTER: Create an MT on the MN and the PDSN and link them to each other. Packetise +# PPP frames before sending them over the network. +# +####################################################################################### +runcmd svcid=5 svchost="penmn" methodid=3 DATALINKCONFIG=2 FILTERCONFIG=0 + assign mt0=RESULT +runcmd svcid=5 svchost="penpdsn" methodid=3 DATALINKCONFIG=2 FILTERCONFIG=0 + assign mt1=RESULT +runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=2000 + +runcmd svcid=5 svchost="penmn" methodid=4 DEVICEID=mt0 + assign local_uu_port0=AIR_INPORT +runcmd svcid=5 svchost="penpdsn" methodid=4 DEVICEID=mt1 + assign local_uu_port1=AIR_INPORT +runcmd svcid=5 svchost="penmn" methodid=10 DEVICEID=mt0 REMOTE_ADDRESS="192.169.10.11" REMOTE_PORT=local_uu_port1 + check RESULT=0 +runcmd svcid=5 svchost="penpdsn" methodid=10 DEVICEID=mt1 REMOTE_ADDRESS="10.22.1.6" REMOTE_PORT=local_uu_port0 + check RESULT=0 + + +####################################################################################### +# +# PPP: Create a session on each machine using the new MTs. The PDSN session will +# specify the IP addresses which the other side will accept. +# +####################################################################################### +runcmd svcid=7 svchost="penmn" methodid=31 MADDR="localhost" MPORT=7000 MTID=mt0 CONFIG="defaultroute noauth debug nodetach" + assign sid0=RESULT +runcmd svcid=7 svchost="penpdsn" methodid=31 MADDR="localhost" MPORT=7000 MTID=mt1 CONFIG="noauth 192.168.211.20:192.168.211.10 debug nodetach" + assign sid1=RESULT + + +####################################################################################### +# +# PPP: Wait for the session to become established +# +####################################################################################### +runcmd svcid=7 svchost="penmn" methodid=7 SID=sid0 + waitfor SESSION_STATUS=2 + check RESULT=0 + assign mn_ppp_interface0=SESSION_INTERFACE_NAME +runcmd svcid=7 svchost="penpdsn" methodid=7 SID=sid1 + waitfor SESSION_STATUS=2 + check RESULT=0 + assign pdsn_ppp_interface0=SESSION_INTERFACE_NAME + + +####################################################################################### +# +# FOREIGN AGENT: Create a FA session and start the agent +# +####################################################################################### +runcmd svcid=3 svchost="penpdsn" methodid=31 + assign fa0=RESULT + + +####################################################################################### +# +# FOREIGN AGENT: Start the agent +# +####################################################################################### +runcmd svcid=3 svchost="penpdsn" methodid=3 AGENTID=fa0 INTERFACE=pdsn_ppp_interface0 SOLICITATIONMODE=0 + check RESULT=0 +runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=2000 + + +####################################################################################### +# +# MOBILE NODE AGENT: Create a mip session - set the home address - start the agent +# +####################################################################################### +runcmd svcid=4 svchost="penmn" methodid=31 + assign mn0=RESULT +runcmd svcid=4 svchost="penmn" methodid=23 AGENTID=mn0 HOME_ADDRESS=home_address0 HOME_ADDRESS_PREFIX=24 HOME_AGENT_ADDRESS=home_agent_address0 INTERFACE=mn_ppp_interface0 + check RESULT=0 +runcmd svcid=4 svchost="penmn" methodid=3 AGENTID=mn0 + check RESULT=0 +runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=2000 + + +####################################################################################### +# +# CONNECTION ESTABLISHED - signal to do the handover +# +####################################################################################### +runcmd svcid=9 svchost="localhost" methodid=4 MSG="A Mobile IP session has been established for the penmn machine." +signal +waitforsignal + + +####################################################################################### +# +# SECTION-C : Bring down the first mobile ip session +# +####################################################################################### +####################################################################################### +# +# MOBILE NODE AGENT: Stop the agent and cleanup the session +# +####################################################################################### +runcmd svcid=4 svchost="penmn" methodid=4 AGENTID=mn0 + check RESULT=0 +runcmd svcid=4 svchost="penmn" methodid=32 AGENTID=mn0 + check RESULT=0 +runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=2000 + + +####################################################################################### +# +# FOREIGN AGENT: Stop the agent and cleanup the session +# +####################################################################################### +runcmd svcid=3 svchost="penpdsn" methodid=4 AGENTID=fa0 + check RESULT=0 +runcmd svcid=3 svchost="penpdsn" methodid=32 AGENTID=fa0 + check RESULT=0 + + +####################################################################################### +# +# PPP: Stop the PPP session from the PDSN side and wait for the MN to exit. Retrieve +# all logs before removing the objects. +# +####################################################################################### +runcmd svcid=7 svchost="penpdsn" methodid=6 SID=sid1 + check RESULT=0 +runcmd svcid=7 svchost="penpdsn" methodid=8 SID=sid1 +runcmd svcid=7 svchost="penpdsn" methodid=32 SID=sid1 + check RESULT=0 + +runcmd svcid=7 svchost="penmn" methodid=7 SID=sid0 + waitfor SESSION_PROCESS_STATUS=3 + check RESULT=0 + check SESSION_STATUS=4 +runcmd svcid=7 svchost="penmn" methodid=8 SID=sid0 +runcmd svcid=7 svchost="penmn" methodid=32 SID=sid0 + check RESULT=0 + + +####################################################################################### +# +# MOBSTER: Remove the mobster devices, they should already have stopped +# +####################################################################################### +runcmd svcid=5 svchost="penmn" methodid=6 DEVICEID=mt0 + check RESULT=0 +runcmd svcid=5 svchost="penmn" methodid=7 DEVICEID=mt0 + check RESULT=0 + +runcmd svcid=5 svchost="penpdsn" methodid=6 DEVICEID=mt1 + check RESULT=0 +runcmd svcid=5 svchost="penpdsn" methodid=7 DEVICEID=mt1 + check RESULT=0 + + +####################################################################################### +# +# SECTION-D : Start the first mobile ip session (Exact copy of section-b except that +# the ppp level IP addresses have changed). +# +####################################################################################### +####################################################################################### +# +# MOBSTER: Create an MT on the MN and the PDSN and link them to each other. Packetise +# PPP frames before sending them over the network. +# +####################################################################################### +runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=4000 +runcmd svcid=5 svchost="penmn" methodid=3 DATALINKCONFIG=2 FILTERCONFIG=0 + assign mt0=RESULT +runcmd svcid=5 svchost="penpdsn" methodid=3 DATALINKCONFIG=2 FILTERCONFIG=0 + assign mt1=RESULT +runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=2000 + +runcmd svcid=5 svchost="penmn" methodid=4 DEVICEID=mt0 + assign local_uu_port0=AIR_INPORT +runcmd svcid=5 svchost="penpdsn" methodid=4 DEVICEID=mt1 + assign local_uu_port1=AIR_INPORT +runcmd svcid=5 svchost="penmn" methodid=10 DEVICEID=mt0 REMOTE_ADDRESS="192.169.10.11" REMOTE_PORT=local_uu_port1 + check RESULT=0 +runcmd svcid=5 svchost="penpdsn" methodid=10 DEVICEID=mt1 REMOTE_ADDRESS="10.22.1.6" REMOTE_PORT=local_uu_port0 + check RESULT=0 + + +####################################################################################### +# +# PPP: Create a session on each machine using the new MTs. The PDSN session will +# specify the IP addresses which the other side will accept. +# +####################################################################################### +runcmd svcid=7 svchost="penmn" methodid=31 MADDR="localhost" MPORT=7000 MTID=mt0 CONFIG="defaultroute noauth debug nodetach" + assign sid0=RESULT +runcmd svcid=7 svchost="penpdsn" methodid=31 MADDR="localhost" MPORT=7000 MTID=mt1 CONFIG="noauth 192.168.221.20:192.168.221.10 debug nodetach" + assign sid1=RESULT + + +####################################################################################### +# +# PPP: Wait for the session to become established +# +####################################################################################### +runcmd svcid=7 svchost="penmn" methodid=7 SID=sid0 + waitfor SESSION_STATUS=2 + check RESULT=0 + assign mn_ppp_interface0=SESSION_INTERFACE_NAME +runcmd svcid=7 svchost="penpdsn" methodid=7 SID=sid1 + waitfor SESSION_STATUS=2 + check RESULT=0 + assign pdsn_ppp_interface0=SESSION_INTERFACE_NAME + + +####################################################################################### +# +# FOREIGN AGENT: Create a FA session and start the agent +# +####################################################################################### +runcmd svcid=3 svchost="penpdsn" methodid=31 + assign fa0=RESULT + + +####################################################################################### +# +# FOREIGN AGENT: Start the agent +# +####################################################################################### +runcmd svcid=3 svchost="penpdsn" methodid=3 AGENTID=fa0 INTERFACE=pdsn_ppp_interface0 SOLICITATIONMODE=0 + check RESULT=0 +runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=2000 + + +####################################################################################### +# +# MOBILE NODE AGENT: Create a mip session - set the home address - start the agent +# +####################################################################################### +runcmd svcid=4 svchost="penmn" methodid=31 + assign mn0=RESULT +runcmd svcid=4 svchost="penmn" methodid=23 AGENTID=mn0 HOME_ADDRESS=home_address0 HOME_ADDRESS_PREFIX=24 HOME_AGENT_ADDRESS=home_agent_address0 INTERFACE=mn_ppp_interface0 + check RESULT=0 +runcmd svcid=4 svchost="penmn" methodid=3 AGENTID=mn0 + check RESULT=0 +runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=2000 + + +####################################################################################### +# +# CONNECTION ESTABLISHED - signal to do the handover +# +####################################################################################### +runcmd svcid=9 svchost="localhost" methodid=4 MSG="A Mobile IP session has been established for the penmn machine." +signal +waitforsignal + + +####################################################################################### +# +# SECTION-E : Bring down the first mobile ip session (exact copy of section-c) +# +####################################################################################### +####################################################################################### +# +# MOBILE NODE AGENT: Stop the agent and cleanup the session +# +####################################################################################### +runcmd svcid=4 svchost="penmn" methodid=4 AGENTID=mn0 + check RESULT=0 +runcmd svcid=4 svchost="penmn" methodid=32 AGENTID=mn0 + check RESULT=0 +runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=2000 + + +####################################################################################### +# +# FOREIGN AGENT: Stop the agent and cleanup the session +# +####################################################################################### +runcmd svcid=3 svchost="penpdsn" methodid=4 AGENTID=fa0 + check RESULT=0 +runcmd svcid=3 svchost="penpdsn" methodid=32 AGENTID=fa0 + check RESULT=0 + + +####################################################################################### +# +# PPP: Stop the PPP session from the PDSN side and wait for the MN to exit. Retrieve +# all logs before removing the objects. +# +####################################################################################### +runcmd svcid=7 svchost="penpdsn" methodid=6 SID=sid1 + check RESULT=0 +runcmd svcid=7 svchost="penpdsn" methodid=8 SID=sid1 +runcmd svcid=7 svchost="penpdsn" methodid=32 SID=sid1 + check RESULT=0 + +runcmd svcid=7 svchost="penmn" methodid=7 SID=sid0 + waitfor SESSION_PROCESS_STATUS=3 + check RESULT=0 + check SESSION_STATUS=4 +runcmd svcid=7 svchost="penmn" methodid=8 SID=sid0 +runcmd svcid=7 svchost="penmn" methodid=32 SID=sid0 + check RESULT=0 + + +####################################################################################### +# +# MOBSTER: Remove the mobster devices, they should already have stopped +# +####################################################################################### +runcmd svcid=5 svchost="penmn" methodid=6 DEVICEID=mt0 + check RESULT=0 +runcmd svcid=5 svchost="penmn" methodid=7 DEVICEID=mt0 + check RESULT=0 + +runcmd svcid=5 svchost="penpdsn" methodid=6 DEVICEID=mt1 + check RESULT=0 +runcmd svcid=5 svchost="penpdsn" methodid=7 DEVICEID=mt1 + check RESULT=0 + + + +####################################################################################### +# +# SECTION-X : General Shutdown +# +####################################################################################### +####################################################################################### +# +# HOME AGENT: Stop the agent and cleanup +# +####################################################################################### +runcmd svcid=2 svchost="penha" methodid=4 AGENTID=ha0 + check RESULT=0 +runcmd svcid=2 svchost="penha" methodid=32 AGENTID=ha0 + check RESULT=0 + + +####################################################################################### +# +# Stop all the services +# +####################################################################################### +runcmd svcid=7 svchost="penmn" methodid=2 FORCE=0 + check RESULT=0 +runcmd svcid=7 svchost="penpdsn" methodid=2 FORCE=0 + check RESULT=0 +runcmd svcid=5 svchost="penmn" methodid=2 FORCE=0 + check RESULT=0 +runcmd svcid=5 svchost="penpdsn" methodid=2 FORCE=0 + check RESULT=0 +runcmd svcid=2 svchost="penha" methodid=2 FORCE=0 + check RESULT=0 +runcmd svcid=3 svchost="penpdsn" methodid=2 FORCE=0 + check RESULT=0 +runcmd svcid=4 svchost="penmn" methodid=2 FORCE=0 + check RESULT=0 + + +####################################################################################### +# +# DONE +# +####################################################################################### +rendezvous