testexecmgmt/ucc/SampleScripts/script.0002.ucd
changeset 0 3da2a79470a7
equal deleted inserted replaced
-1:000000000000 0:3da2a79470a7
       
     1 #
       
     2 # Copyright (c) 2005-2009 Nokia Corporation and/or its subsidiary(-ies).
       
     3 # All rights reserved.
       
     4 # This component and the accompanying materials are made available
       
     5 # under the terms of "Eclipse Public License v1.0"
       
     6 # which accompanies this distribution, and is available
       
     7 # at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 #
       
     9 # Initial Contributors:
       
    10 # Nokia Corporation - initial contribution.
       
    11 #
       
    12 # Contributors:
       
    13 #
       
    14 # Description:
       
    15 #
       
    16 
       
    17 #######################################################################################
       
    18 #
       
    19 # USE-CASE-2 : Emulate a foreign agent handoff (Linux-to-Linux)
       
    20 #
       
    21 #######################################################################################
       
    22 
       
    23 #######################################################################################
       
    24 #
       
    25 # SECTION-A : General Startup
       
    26 #
       
    27 #######################################################################################
       
    28 #######################################################################################
       
    29 #
       
    30 # Start the services
       
    31 #
       
    32 #######################################################################################
       
    33 runcmd svcid=5 svchost="penmn"		methodid=1 PORT=7000
       
    34 	check RESULT=0
       
    35 runcmd svcid=5 svchost="penpdsn"	methodid=1 PORT=7000
       
    36 	check RESULT=0
       
    37 runcmd svcid=7 svchost="penmn"		methodid=1
       
    38 	check RESULT=0
       
    39 runcmd svcid=7 svchost="penpdsn"	methodid=1
       
    40 	check RESULT=0
       
    41 runcmd svcid=2 svchost="penha"		methodid=1 BASEINTERFACE=0 BASENETMASK=24 BASESTARTRANGE=100 BASEENDRANGE=199 VIRTUALNETWORKPREFIX="192.168.111.0" VIRTUALNETWORKMASK=24 VIRTUALNETWORKSIZE=4
       
    42 	check RESULT=0
       
    43 runcmd svcid=3 svchost="penpdsn"	methodid=1 BASEINTERFACEINDEX=0 NETMASK=24 STARTHOSTADDRESSRANGE=100 STOPHOSTADDRESSRANGE=199
       
    44 	check RESULT=0
       
    45 runcmd svcid=4 svchost="penmn"		methodid=1
       
    46 	check RESULT=0
       
    47 
       
    48 #######################################################################################
       
    49 #
       
    50 # HOME AGENT: Create a HA session and start the agent
       
    51 #
       
    52 #######################################################################################
       
    53 runcmd svcid=2 svchost="penha" methodid=31
       
    54 	assign ha0=RESULT
       
    55 runcmd svcid=2 svchost="penha" methodid=3 AGENTID=ha0
       
    56 	check RESULT=0
       
    57 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=2000
       
    58 runcmd svcid=2 svchost="penha" methodid=9 AGENTID=ha0
       
    59 	check RESULT=0
       
    60 	assign home_agent_address0=STATUS_HOME_AGENT_ADDRESS
       
    61 	assign home_address0=VIRTUAL_NETWORK_ADDRESS_0
       
    62 
       
    63 
       
    64 #######################################################################################
       
    65 #
       
    66 # SECTION-B : Start the first mobile ip session
       
    67 #
       
    68 #######################################################################################
       
    69 #######################################################################################
       
    70 #
       
    71 # MOBSTER:  Create an MT on the MN and the PDSN and link them to each other. Packetise
       
    72 #			PPP frames before sending them over the network.
       
    73 #
       
    74 #######################################################################################
       
    75 runcmd svcid=5 svchost="penmn" methodid=3 DATALINKCONFIG=2 FILTERCONFIG=0
       
    76 	assign mt0=RESULT
       
    77 runcmd svcid=5 svchost="penpdsn" methodid=3 DATALINKCONFIG=2 FILTERCONFIG=0
       
    78 	assign mt1=RESULT
       
    79 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=2000
       
    80 
       
    81 runcmd svcid=5 svchost="penmn" methodid=4 DEVICEID=mt0
       
    82 	assign local_uu_port0=AIR_INPORT
       
    83 runcmd svcid=5 svchost="penpdsn" methodid=4 DEVICEID=mt1
       
    84 	assign local_uu_port1=AIR_INPORT
       
    85 runcmd svcid=5 svchost="penmn" methodid=10 DEVICEID=mt0 REMOTE_ADDRESS="192.169.10.11" REMOTE_PORT=local_uu_port1
       
    86 	check RESULT=0
       
    87 runcmd svcid=5 svchost="penpdsn" methodid=10 DEVICEID=mt1 REMOTE_ADDRESS="10.22.1.6" REMOTE_PORT=local_uu_port0
       
    88 	check RESULT=0
       
    89 
       
    90 
       
    91 #######################################################################################
       
    92 #
       
    93 # PPP:	Create a session on each machine using the new MTs. The PDSN session will 
       
    94 #		specify the IP addresses which the other side will accept.
       
    95 #
       
    96 #######################################################################################
       
    97 runcmd svcid=7 svchost="penmn"   methodid=31 MADDR="localhost" MPORT=7000 MTID=mt0 CONFIG="defaultroute noauth debug nodetach"
       
    98 	assign sid0=RESULT
       
    99 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"
       
   100 	assign sid1=RESULT
       
   101 
       
   102 
       
   103 #######################################################################################
       
   104 #
       
   105 # PPP:	Wait for the session to become established
       
   106 #
       
   107 #######################################################################################
       
   108 runcmd svcid=7 svchost="penmn"		methodid=7 SID=sid0
       
   109 	waitfor SESSION_STATUS=2
       
   110 	check RESULT=0
       
   111 	assign mn_ppp_interface0=SESSION_INTERFACE_NAME
       
   112 runcmd svcid=7 svchost="penpdsn"	 methodid=7 SID=sid1
       
   113 	waitfor SESSION_STATUS=2
       
   114 	check RESULT=0
       
   115 	assign pdsn_ppp_interface0=SESSION_INTERFACE_NAME
       
   116 
       
   117 
       
   118 #######################################################################################
       
   119 #
       
   120 # FOREIGN AGENT: Create a FA session and start the agent
       
   121 #
       
   122 #######################################################################################
       
   123 runcmd svcid=3 svchost="penpdsn" methodid=31
       
   124 	assign fa0=RESULT
       
   125 
       
   126 
       
   127 #######################################################################################
       
   128 #
       
   129 # FOREIGN AGENT: Start the agent
       
   130 #
       
   131 #######################################################################################
       
   132 runcmd svcid=3 svchost="penpdsn" methodid=3 AGENTID=fa0 INTERFACE=pdsn_ppp_interface0 SOLICITATIONMODE=0
       
   133 	check RESULT=0
       
   134 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=2000
       
   135 
       
   136 
       
   137 #######################################################################################
       
   138 #
       
   139 # MOBILE NODE AGENT: Create a mip session - set the home address - start the agent
       
   140 #
       
   141 #######################################################################################
       
   142 runcmd svcid=4 svchost="penmn" methodid=31
       
   143 	assign mn0=RESULT
       
   144 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
       
   145 	check RESULT=0
       
   146 runcmd svcid=4 svchost="penmn" methodid=3 AGENTID=mn0
       
   147 	check RESULT=0
       
   148 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=2000
       
   149 
       
   150 
       
   151 #######################################################################################
       
   152 #
       
   153 # CONNECTION ESTABLISHED - signal to do the handover
       
   154 #
       
   155 #######################################################################################
       
   156 runcmd svcid=9 svchost="localhost" methodid=4 MSG="A Mobile IP session has been established for the penmn machine."
       
   157 signal
       
   158 waitforsignal
       
   159 
       
   160 
       
   161 #######################################################################################
       
   162 #
       
   163 # SECTION-C : Bring down the first mobile ip session
       
   164 #
       
   165 #######################################################################################
       
   166 #######################################################################################
       
   167 #
       
   168 # MOBILE NODE AGENT: Stop the agent and cleanup the session
       
   169 #
       
   170 #######################################################################################
       
   171 runcmd svcid=4 svchost="penmn" methodid=4 AGENTID=mn0
       
   172 	check RESULT=0
       
   173 runcmd svcid=4 svchost="penmn" methodid=32 AGENTID=mn0
       
   174 	check RESULT=0
       
   175 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=2000
       
   176 
       
   177 
       
   178 #######################################################################################
       
   179 #
       
   180 # FOREIGN AGENT: Stop the agent and cleanup the session
       
   181 #
       
   182 #######################################################################################
       
   183 runcmd svcid=3 svchost="penpdsn" methodid=4 AGENTID=fa0
       
   184 	check RESULT=0
       
   185 runcmd svcid=3 svchost="penpdsn" methodid=32 AGENTID=fa0
       
   186 	check RESULT=0
       
   187 
       
   188 
       
   189 #######################################################################################
       
   190 #
       
   191 # PPP:	Stop the PPP session from the PDSN side and wait for the MN to exit. Retrieve
       
   192 #		all logs before removing the objects.
       
   193 #
       
   194 #######################################################################################
       
   195 runcmd svcid=7 svchost="penpdsn" methodid=6 SID=sid1
       
   196 	check RESULT=0
       
   197 runcmd svcid=7 svchost="penpdsn" methodid=8 SID=sid1
       
   198 runcmd svcid=7 svchost="penpdsn" methodid=32 SID=sid1
       
   199 	check RESULT=0
       
   200 
       
   201 runcmd svcid=7 svchost="penmn"	methodid=7 SID=sid0
       
   202 	waitfor SESSION_PROCESS_STATUS=3
       
   203 	check RESULT=0
       
   204 	check SESSION_STATUS=4
       
   205 runcmd svcid=7 svchost="penmn" methodid=8 SID=sid0
       
   206 runcmd svcid=7 svchost="penmn" methodid=32 SID=sid0
       
   207 	check RESULT=0
       
   208 
       
   209 
       
   210 #######################################################################################
       
   211 #
       
   212 # MOBSTER: Remove the mobster devices, they should already have stopped
       
   213 #
       
   214 #######################################################################################
       
   215 runcmd svcid=5  svchost="penmn"		methodid=6 DEVICEID=mt0
       
   216 	check RESULT=0
       
   217 runcmd svcid=5  svchost="penmn"		methodid=7 DEVICEID=mt0
       
   218 	check RESULT=0
       
   219 
       
   220 runcmd svcid=5  svchost="penpdsn"	methodid=6 DEVICEID=mt1
       
   221 	check RESULT=0
       
   222 runcmd svcid=5  svchost="penpdsn"	methodid=7 DEVICEID=mt1
       
   223 	check RESULT=0
       
   224 
       
   225 
       
   226 #######################################################################################
       
   227 #
       
   228 # SECTION-D : Start the first mobile ip session (Exact copy of section-b except that
       
   229 #			  the ppp level IP addresses have changed).
       
   230 #
       
   231 #######################################################################################
       
   232 #######################################################################################
       
   233 #
       
   234 # MOBSTER:  Create an MT on the MN and the PDSN and link them to each other. Packetise
       
   235 #			PPP frames before sending them over the network.
       
   236 #
       
   237 #######################################################################################
       
   238 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=4000
       
   239 runcmd svcid=5 svchost="penmn" methodid=3 DATALINKCONFIG=2 FILTERCONFIG=0
       
   240 	assign mt0=RESULT
       
   241 runcmd svcid=5 svchost="penpdsn" methodid=3 DATALINKCONFIG=2 FILTERCONFIG=0
       
   242 	assign mt1=RESULT
       
   243 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=2000
       
   244 
       
   245 runcmd svcid=5 svchost="penmn" methodid=4 DEVICEID=mt0
       
   246 	assign local_uu_port0=AIR_INPORT
       
   247 runcmd svcid=5 svchost="penpdsn" methodid=4 DEVICEID=mt1
       
   248 	assign local_uu_port1=AIR_INPORT
       
   249 runcmd svcid=5 svchost="penmn" methodid=10 DEVICEID=mt0 REMOTE_ADDRESS="192.169.10.11" REMOTE_PORT=local_uu_port1
       
   250 	check RESULT=0
       
   251 runcmd svcid=5 svchost="penpdsn" methodid=10 DEVICEID=mt1 REMOTE_ADDRESS="10.22.1.6" REMOTE_PORT=local_uu_port0
       
   252 	check RESULT=0
       
   253 
       
   254 
       
   255 #######################################################################################
       
   256 #
       
   257 # PPP:	Create a session on each machine using the new MTs. The PDSN session will 
       
   258 #		specify the IP addresses which the other side will accept.
       
   259 #
       
   260 #######################################################################################
       
   261 runcmd svcid=7 svchost="penmn"   methodid=31 MADDR="localhost" MPORT=7000 MTID=mt0 CONFIG="defaultroute noauth debug nodetach"
       
   262 	assign sid0=RESULT
       
   263 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"
       
   264 	assign sid1=RESULT
       
   265 
       
   266 
       
   267 #######################################################################################
       
   268 #
       
   269 # PPP:	Wait for the session to become established
       
   270 #
       
   271 #######################################################################################
       
   272 runcmd svcid=7 svchost="penmn"		methodid=7 SID=sid0
       
   273 	waitfor SESSION_STATUS=2
       
   274 	check RESULT=0
       
   275 	assign mn_ppp_interface0=SESSION_INTERFACE_NAME
       
   276 runcmd svcid=7 svchost="penpdsn"	 methodid=7 SID=sid1
       
   277 	waitfor SESSION_STATUS=2
       
   278 	check RESULT=0
       
   279 	assign pdsn_ppp_interface0=SESSION_INTERFACE_NAME
       
   280 
       
   281 
       
   282 #######################################################################################
       
   283 #
       
   284 # FOREIGN AGENT: Create a FA session and start the agent
       
   285 #
       
   286 #######################################################################################
       
   287 runcmd svcid=3 svchost="penpdsn" methodid=31
       
   288 	assign fa0=RESULT
       
   289 
       
   290 
       
   291 #######################################################################################
       
   292 #
       
   293 # FOREIGN AGENT: Start the agent
       
   294 #
       
   295 #######################################################################################
       
   296 runcmd svcid=3 svchost="penpdsn" methodid=3 AGENTID=fa0 INTERFACE=pdsn_ppp_interface0 SOLICITATIONMODE=0
       
   297 	check RESULT=0
       
   298 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=2000
       
   299 
       
   300 
       
   301 #######################################################################################
       
   302 #
       
   303 # MOBILE NODE AGENT: Create a mip session - set the home address - start the agent
       
   304 #
       
   305 #######################################################################################
       
   306 runcmd svcid=4 svchost="penmn" methodid=31
       
   307 	assign mn0=RESULT
       
   308 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
       
   309 	check RESULT=0
       
   310 runcmd svcid=4 svchost="penmn" methodid=3 AGENTID=mn0
       
   311 	check RESULT=0
       
   312 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=2000
       
   313 
       
   314 
       
   315 #######################################################################################
       
   316 #
       
   317 # CONNECTION ESTABLISHED - signal to do the handover
       
   318 #
       
   319 #######################################################################################
       
   320 runcmd svcid=9 svchost="localhost" methodid=4 MSG="A Mobile IP session has been established for the penmn machine."
       
   321 signal
       
   322 waitforsignal
       
   323 
       
   324 
       
   325 #######################################################################################
       
   326 #
       
   327 # SECTION-E : Bring down the first mobile ip session (exact copy of section-c)
       
   328 #
       
   329 #######################################################################################
       
   330 #######################################################################################
       
   331 #
       
   332 # MOBILE NODE AGENT: Stop the agent and cleanup the session
       
   333 #
       
   334 #######################################################################################
       
   335 runcmd svcid=4 svchost="penmn" methodid=4 AGENTID=mn0
       
   336 	check RESULT=0
       
   337 runcmd svcid=4 svchost="penmn" methodid=32 AGENTID=mn0
       
   338 	check RESULT=0
       
   339 runcmd svcid=9 svchost="localhost" methodid=1 PERIOD=2000
       
   340 
       
   341 
       
   342 #######################################################################################
       
   343 #
       
   344 # FOREIGN AGENT: Stop the agent and cleanup the session
       
   345 #
       
   346 #######################################################################################
       
   347 runcmd svcid=3 svchost="penpdsn" methodid=4 AGENTID=fa0
       
   348 	check RESULT=0
       
   349 runcmd svcid=3 svchost="penpdsn" methodid=32 AGENTID=fa0
       
   350 	check RESULT=0
       
   351 
       
   352 
       
   353 #######################################################################################
       
   354 #
       
   355 # PPP:	Stop the PPP session from the PDSN side and wait for the MN to exit. Retrieve
       
   356 #		all logs before removing the objects.
       
   357 #
       
   358 #######################################################################################
       
   359 runcmd svcid=7 svchost="penpdsn" methodid=6 SID=sid1
       
   360 	check RESULT=0
       
   361 runcmd svcid=7 svchost="penpdsn" methodid=8 SID=sid1
       
   362 runcmd svcid=7 svchost="penpdsn" methodid=32 SID=sid1
       
   363 	check RESULT=0
       
   364 
       
   365 runcmd svcid=7 svchost="penmn"	methodid=7 SID=sid0
       
   366 	waitfor SESSION_PROCESS_STATUS=3
       
   367 	check RESULT=0
       
   368 	check SESSION_STATUS=4
       
   369 runcmd svcid=7 svchost="penmn" methodid=8 SID=sid0
       
   370 runcmd svcid=7 svchost="penmn" methodid=32 SID=sid0
       
   371 	check RESULT=0
       
   372 
       
   373 
       
   374 #######################################################################################
       
   375 #
       
   376 # MOBSTER: Remove the mobster devices, they should already have stopped
       
   377 #
       
   378 #######################################################################################
       
   379 runcmd svcid=5  svchost="penmn"		methodid=6 DEVICEID=mt0
       
   380 	check RESULT=0
       
   381 runcmd svcid=5  svchost="penmn"		methodid=7 DEVICEID=mt0
       
   382 	check RESULT=0
       
   383 
       
   384 runcmd svcid=5  svchost="penpdsn"	methodid=6 DEVICEID=mt1
       
   385 	check RESULT=0
       
   386 runcmd svcid=5  svchost="penpdsn"	methodid=7 DEVICEID=mt1
       
   387 	check RESULT=0
       
   388 
       
   389 
       
   390 
       
   391 #######################################################################################
       
   392 #
       
   393 # SECTION-X : General Shutdown
       
   394 #
       
   395 #######################################################################################
       
   396 #######################################################################################
       
   397 #
       
   398 # HOME AGENT: Stop the agent and cleanup
       
   399 #
       
   400 #######################################################################################
       
   401 runcmd svcid=2 svchost="penha" methodid=4 AGENTID=ha0
       
   402 	check RESULT=0
       
   403 runcmd svcid=2 svchost="penha" methodid=32 AGENTID=ha0
       
   404 	check RESULT=0
       
   405 
       
   406 
       
   407 #######################################################################################
       
   408 #
       
   409 # Stop all the services
       
   410 #
       
   411 #######################################################################################
       
   412 runcmd svcid=7 svchost="penmn"		methodid=2 FORCE=0
       
   413 	check RESULT=0
       
   414 runcmd svcid=7 svchost="penpdsn"	methodid=2 FORCE=0
       
   415 	check RESULT=0
       
   416 runcmd svcid=5 svchost="penmn"		methodid=2 FORCE=0
       
   417 	check RESULT=0
       
   418 runcmd svcid=5 svchost="penpdsn"	methodid=2 FORCE=0
       
   419 	check RESULT=0
       
   420 runcmd svcid=2 svchost="penha"		methodid=2 FORCE=0
       
   421 	check RESULT=0
       
   422 runcmd svcid=3 svchost="penpdsn"	methodid=2 FORCE=0
       
   423 	check RESULT=0
       
   424 runcmd svcid=4 svchost="penmn"		methodid=2 FORCE=0
       
   425 	check RESULT=0
       
   426 
       
   427 
       
   428 #######################################################################################
       
   429 #
       
   430 # DONE
       
   431 #
       
   432 #######################################################################################
       
   433 rendezvous