Network - Outbound Tests
Updated Code for CoreOS.
This commit is contained in:
Родитель
b4f8f3f028
Коммит
0a26e9742d
|
@ -36,8 +36,8 @@ if ($isDeployed)
|
||||||
LogMsg "Test Machine : $hs1VIP : $hs1vm1sshport"
|
LogMsg "Test Machine : $hs1VIP : $hs1vm1sshport"
|
||||||
LogMsg "DTAP Machine : $dtapServerIp : $hs1vm1sshport"
|
LogMsg "DTAP Machine : $dtapServerIp : $hs1vm1sshport"
|
||||||
$iperfTimeoutSeconds = $currentTestData.iperfTimeoutSeconds
|
$iperfTimeoutSeconds = $currentTestData.iperfTimeoutSeconds
|
||||||
$cmd1="./start-server.py -p $dtapServerUdpport -u yes && mv Runtime.log start-server.py.log -f"
|
$cmd1="python start-server.py -p $dtapServerUdpport -u yes && mv Runtime.log start-server.py.log -f"
|
||||||
$cmd2="./start-client.py -c $dtapServerIp -p $dtapServerUdpport -t$iperfTimeoutSeconds -u yes -l"
|
$cmd2="python start-client.py -c $dtapServerIp -p $dtapServerUdpport -t$iperfTimeoutSeconds -u yes -l"
|
||||||
|
|
||||||
$server = CreateIperfNode -nodeIp $dtapServerIp -nodeSshPort $dtapServerSshport -nodeTcpPort $dtapServerTcpport -nodeIperfCmd $cmd1 -user $user -password $password -files $currentTestData.files -logDir $LogDir
|
$server = CreateIperfNode -nodeIp $dtapServerIp -nodeSshPort $dtapServerSshport -nodeTcpPort $dtapServerTcpport -nodeIperfCmd $cmd1 -user $user -password $password -files $currentTestData.files -logDir $LogDir
|
||||||
$client = CreateIperfNode -nodeIp $hs1VIP -nodeSshPort $hs1vm1sshport -nodeTcpPort $hs1vm1tcpport -nodeIperfCmd $cmd2 -user $user -password $password -files $currentTestData.files -logDir $LogDir
|
$client = CreateIperfNode -nodeIp $hs1VIP -nodeSshPort $hs1vm1sshport -nodeTcpPort $hs1vm1tcpport -nodeIperfCmd $cmd2 -user $user -password $password -files $currentTestData.files -logDir $LogDir
|
||||||
|
@ -47,7 +47,7 @@ if ($isDeployed)
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
$testResult = $null
|
$testResult = $null
|
||||||
$client.cmd = "./start-client.py -c $dtapServerIp -p $dtapServerUdpport -t10 -u yes -l $Value"
|
$client.cmd = "python start-client.py -c $dtapServerIp -p $dtapServerUdpport -t10 -u yes -l $Value"
|
||||||
LogMsg "Test Started for UDP Datagram size $Value"
|
LogMsg "Test Started for UDP Datagram size $Value"
|
||||||
mkdir $LogDir\$Value -ErrorAction SilentlyContinue | out-null
|
mkdir $LogDir\$Value -ErrorAction SilentlyContinue | out-null
|
||||||
$server.logDir = $LogDir + "\$Value"
|
$server.logDir = $LogDir + "\$Value"
|
||||||
|
|
|
@ -38,8 +38,8 @@ if ($isDeployed)
|
||||||
LogMsg "DTAP Machine : $dtapServerIp : $hs1vm1sshport"
|
LogMsg "DTAP Machine : $dtapServerIp : $hs1vm1sshport"
|
||||||
$iperfTimeoutSeconds = $currentTestData.iperfTimeoutSeconds
|
$iperfTimeoutSeconds = $currentTestData.iperfTimeoutSeconds
|
||||||
|
|
||||||
$cmd1="./start-server.py -i1 -p $dtapServerTcpport && mv Runtime.log start-server.py.log -f"
|
$cmd1="$python_cmd start-server.py -i1 -p $dtapServerTcpport && mv Runtime.log start-server.py.log -f"
|
||||||
$cmd2="./start-client.py -c $dtapServerIp -p $dtapServerTcpport -t$iperfTimeoutSeconds -P$Value"
|
$cmd2="$python_cmd start-client.py -c $dtapServerIp -p $dtapServerTcpport -t$iperfTimeoutSeconds -P$Value"
|
||||||
|
|
||||||
$server = CreateIperfNode -nodeIp $dtapServerIp -nodeSshPort $dtapServerSshport -nodeTcpPort $dtapServerTcpport -nodeIperfCmd $cmd1 -user $user -password $password -files $currentTestData.files -logDir $LogDir
|
$server = CreateIperfNode -nodeIp $dtapServerIp -nodeSshPort $dtapServerSshport -nodeTcpPort $dtapServerTcpport -nodeIperfCmd $cmd1 -user $user -password $password -files $currentTestData.files -logDir $LogDir
|
||||||
LogMsg "$dtapServerIp set as iperf server"
|
LogMsg "$dtapServerIp set as iperf server"
|
||||||
|
@ -51,7 +51,7 @@ if ($isDeployed)
|
||||||
{
|
{
|
||||||
$testResult = $null
|
$testResult = $null
|
||||||
LogMsg "Test Started for Parallel Connections $Value"
|
LogMsg "Test Started for Parallel Connections $Value"
|
||||||
$client.cmd = "./start-client.py -c $dtapServerIp -p $dtapServerTcpport -t20 -P$Value"
|
$client.cmd = "$python_cmd start-client.py -c $dtapServerIp -p $dtapServerTcpport -t20 -P$Value"
|
||||||
mkdir $LogDir\$Value -ErrorAction SilentlyContinue | out-null
|
mkdir $LogDir\$Value -ErrorAction SilentlyContinue | out-null
|
||||||
$client.logDir = $LogDir + "\$Value"
|
$client.logDir = $LogDir + "\$Value"
|
||||||
$server.logDir = $LogDir + "\$Value"
|
$server.logDir = $LogDir + "\$Value"
|
||||||
|
|
|
@ -37,8 +37,8 @@ if($isDeployed)
|
||||||
LogMsg "DTAP Machine : $dtapServerIp : $hs1vm1sshport"
|
LogMsg "DTAP Machine : $dtapServerIp : $hs1vm1sshport"
|
||||||
$iperfTimeoutSeconds = $currentTestData.iperfTimeoutSeconds
|
$iperfTimeoutSeconds = $currentTestData.iperfTimeoutSeconds
|
||||||
|
|
||||||
$cmd1="./start-server.py -p $dtapServerUDPport -u yes && mv Runtime.log start-server.py.log -f"
|
$cmd1="python start-server.py -p $dtapServerUDPport -u yes && mv Runtime.log start-server.py.log -f"
|
||||||
$cmd2="./start-client.py -c $dtapServerIp -p $dtapServerUDPport -t20 -P1 -u yes"
|
$cmd2="python start-client.py -c $dtapServerIp -p $dtapServerUDPport -t20 -P1 -u yes"
|
||||||
|
|
||||||
$server = CreateIperfNode -nodeIp $dtapServerIp -nodeSshPort $dtapServerSshport -nodeTcpPort $dtapServerTcpport -nodeIperfCmd $cmd1 -user $user -password $password -files $currentTestData.files -logDir $LogDir
|
$server = CreateIperfNode -nodeIp $dtapServerIp -nodeSshPort $dtapServerSshport -nodeTcpPort $dtapServerTcpport -nodeIperfCmd $cmd1 -user $user -password $password -files $currentTestData.files -logDir $LogDir
|
||||||
$client = CreateIperfNode -nodeIp $hs1VIP -nodeSshPort $hs1vm1sshport -nodeTcpPort $hs1vm1tcpport -nodeIperfCmd $cmd2 -user $user -password $password -files $currentTestData.files -logDir $LogDir
|
$client = CreateIperfNode -nodeIp $hs1VIP -nodeSshPort $hs1vm1sshport -nodeTcpPort $hs1vm1tcpport -nodeIperfCmd $cmd2 -user $user -password $password -files $currentTestData.files -logDir $LogDir
|
||||||
|
@ -51,7 +51,7 @@ if($isDeployed)
|
||||||
{
|
{
|
||||||
$testResult = $null
|
$testResult = $null
|
||||||
LogMsg "Test Started for Parallel Connections $Value"
|
LogMsg "Test Started for Parallel Connections $Value"
|
||||||
$client.cmd = "./start-client.py -c $dtapServerIp -p $dtapServerUDPport -t$iperfTimeoutSeconds -P$Value -u yes"
|
$client.cmd = "python start-client.py -c $dtapServerIp -p $dtapServerUDPport -t$iperfTimeoutSeconds -P$Value -u yes"
|
||||||
mkdir $LogDir\$Value -ErrorAction SilentlyContinue | out-null
|
mkdir $LogDir\$Value -ErrorAction SilentlyContinue | out-null
|
||||||
$server.logDir = $LogDir + "\$Value"
|
$server.logDir = $LogDir + "\$Value"
|
||||||
$client.logDir = $LogDir + "\$Value"
|
$client.logDir = $LogDir + "\$Value"
|
||||||
|
|
|
@ -42,8 +42,8 @@ if ($isDeployed)
|
||||||
$suppressedOut = RunLinuxCmd -username $user -password $password -ip $hs1VIP -port $hs1vm1sshport -command "chmod +x * && rm -rf *.log *.txt" -runAsSudo
|
$suppressedOut = RunLinuxCmd -username $user -password $password -ip $hs1VIP -port $hs1vm1sshport -command "chmod +x * && rm -rf *.log *.txt" -runAsSudo
|
||||||
$suppressedOut = RunLinuxCmd -username $user -password $password -ip $dtapServerIp -port $dtapServerSshport -command "chmod +x * && rm -rf *.log *.txt" -runAsSudo
|
$suppressedOut = RunLinuxCmd -username $user -password $password -ip $dtapServerIp -port $dtapServerSshport -command "chmod +x * && rm -rf *.log *.txt" -runAsSudo
|
||||||
|
|
||||||
$cmd1="./start-server.py -p $dtapServerTcpport && mv Runtime.log start-server.py.log -f"
|
$cmd1="python start-server.py -p $dtapServerTcpport && mv Runtime.log start-server.py.log -f"
|
||||||
$cmd2="./start-client.py -c $dtapServerIp -p $dtapServerTcpport -t$iperfTimeoutSeconds"
|
$cmd2="python start-client.py -c $dtapServerIp -p $dtapServerTcpport -t$iperfTimeoutSeconds"
|
||||||
$server = CreateIperfNode -nodeIp $dtapServerIp -nodeSshPort $dtapServerSshport -nodeTcpPort $dtapServerTcpport -nodeIperfCmd $cmd1 -user $user -password $password -files $currentTestData.files -logDir $LogDir
|
$server = CreateIperfNode -nodeIp $dtapServerIp -nodeSshPort $dtapServerSshport -nodeTcpPort $dtapServerTcpport -nodeIperfCmd $cmd1 -user $user -password $password -files $currentTestData.files -logDir $LogDir
|
||||||
$client = CreateIperfNode -nodeIp $hs1VIP -nodeSshPort $hs1vm1sshport -nodeTcpPort $hs1vm1tcpport -nodeIperfCmd $cmd2 -user $user -password $password -files $currentTestData.files -logDir $LogDir
|
$client = CreateIperfNode -nodeIp $hs1VIP -nodeSshPort $hs1vm1sshport -nodeTcpPort $hs1vm1tcpport -nodeIperfCmd $cmd2 -user $user -password $password -files $currentTestData.files -logDir $LogDir
|
||||||
$testresult=IperfClientServerTest -server $server -client $client
|
$testresult=IperfClientServerTest -server $server -client $client
|
||||||
|
|
|
@ -30,10 +30,13 @@ if ($isDeployed)
|
||||||
$dtapServerUrl = $dtapServerUrl.Replace("/","")
|
$dtapServerUrl = $dtapServerUrl.Replace("/","")
|
||||||
$dtapServerTcpport = GetPort -Endpoints $dtapServerEndpoints -usage tcp
|
$dtapServerTcpport = GetPort -Endpoints $dtapServerEndpoints -usage tcp
|
||||||
$dtapServerUdpport = GetPort -Endpoints $dtapServerEndpoints -usage udp
|
$dtapServerUdpport = GetPort -Endpoints $dtapServerEndpoints -usage udp
|
||||||
$dtapServerSshport = GetPort -Endpoints $dtapServerEndpoints -usage ssh
|
$dtapServerSshport = GetPort -Endpoints $dtapServerEndpoints -usage ssh
|
||||||
LogMsg "Test Machine : $hs1VIP : $hs1vm1sshport"
|
LogMsg "Test Machine : $hs1VIP : $hs1vm1sshport"
|
||||||
LogMsg "DTAP Machine : $dtapServerIp : $hs1vm1sshport"
|
LogMsg "DTAP Machine : $dtapServerIp : $hs1vm1sshport"
|
||||||
|
|
||||||
$iperfTimeoutSeconds = $currentTestData.iperfTimeoutSeconds
|
$iperfTimeoutSeconds = $currentTestData.iperfTimeoutSeconds
|
||||||
|
$cmd1="python start-server.py -p $dtapServerUdpport -u yes && mv Runtime.log start-server.py.log -f"
|
||||||
|
$server = CreateIperfNode -nodeIp $dtapServerIp -nodeSshPort $dtapServerSshport -nodeTcpPort $dtapServerUdpport -nodeIperfCmd $cmd1 -user $user -password $password -files $currentTestData.files -logDir $LogDir
|
||||||
RemoteCopy -uploadTo $hs1VIP -port $hs1vm1sshport -files $currentTestData.files -username $user -password $password -upload
|
RemoteCopy -uploadTo $hs1VIP -port $hs1vm1sshport -files $currentTestData.files -username $user -password $password -upload
|
||||||
RemoteCopy -uploadTo $dtapServerIp -port $dtapServerSshport -files $currentTestData.files -username $user -password $password -upload
|
RemoteCopy -uploadTo $dtapServerIp -port $dtapServerSshport -files $currentTestData.files -username $user -password $password -upload
|
||||||
$suppressedOut = RunLinuxCmd -username $user -password $password -ip $hs1VIP -port $hs1vm1sshport -command "chmod +x * && rm -rf *.log *.txt" -runAsSudo
|
$suppressedOut = RunLinuxCmd -username $user -password $password -ip $hs1VIP -port $hs1vm1sshport -command "chmod +x * && rm -rf *.log *.txt" -runAsSudo
|
||||||
|
@ -42,18 +45,19 @@ if ($isDeployed)
|
||||||
{
|
{
|
||||||
#Start server...
|
#Start server...
|
||||||
LogMsg "Startin iperf Server...on $dtapServerIp"
|
LogMsg "Startin iperf Server...on $dtapServerIp"
|
||||||
$suppressedOut = RunLinuxCmd -username $user -password $password -ip $dtapServerIp -port $dtapServerSshport -command "./start-server.py -i1 -p $dtapServerUDPport -u yes && mv Runtime.log start-server.py.log -f" -runAsSudo
|
$suppressedOut = StartIperfServer -node $server
|
||||||
RemoteCopy -download -downloadFrom $dtapServerIp -files "/home/$user/start-server.py.log" -downloadTo $LogDir -port $dtapServerSshport -username $user -password $password
|
#$suppressedOut = RunLinuxCmd -username $user -password $password -ip $dtapServerIp -port $dtapServerSshport -command "python start-server.py -i1 -p $dtapServerUDPport -u yes && mv Runtime.log start-server.py.log -f" -runAsSudo
|
||||||
|
#RemoteCopy -download -downloadFrom $dtapServerIp -files "/home/$user/start-server.py.log" -downloadTo $LogDir -port $dtapServerSshport -username $user -password $password
|
||||||
#Verify, if server started...
|
#Verify, if server started...
|
||||||
LogMsg "Verifying if server is started or not.."
|
LogMsg "Verifying if server is started or not.."
|
||||||
RemoteCopy -download -downloadFrom $dtapServerIp -files "/home/$user/isServerStarted.txt" -downloadTo $LogDir -port $dtapServerSshport -username $user -password $password
|
#RemoteCopy -download -downloadFrom $dtapServerIp -files "/home/$user/isServerStarted.txt" -downloadTo $LogDir -port $dtapServerSshport -username $user -password $password
|
||||||
$isServerStarted = Get-Content $LogDir\isServerStarted.txt
|
#$isServerStarted = Get-Content $LogDir\isServerStarted.txt
|
||||||
if($isServerStarted -eq "yes")
|
if(IsIperfServerStarted -node $server)
|
||||||
{
|
{
|
||||||
LogMsg "iperf Server started successfully. Listening TCP port $hs1vm1tcpport..."
|
LogMsg "iperf Server started successfully. Listening TCP port $hs1vm1tcpport..."
|
||||||
#On confirmation, of server starting, let's start iperf client...
|
#On confirmation, of server starting, let's start iperf client...
|
||||||
LogMsg "Startin iperf client and trying to connect to port $dtapServerTcpport..."
|
LogMsg "Startin iperf client and trying to connect to port $dtapServerTcpport..."
|
||||||
$suppressedOut = RunLinuxCmd -username $user -password $password -ip $hs1VIP -port $hs1vm1sshport -command "./start-client.py -c $dtapServerIp -i1 -p $dtapServerUDPport -t$iperfTimeoutSeconds -u yes" -runAsSudo
|
$suppressedOut = RunLinuxCmd -username $user -password $password -ip $hs1VIP -port $hs1vm1sshport -command "python start-client.py -c $dtapServerIp -p $dtapServerUDPport -t$iperfTimeoutSeconds -u yes -l 1400" -runAsSudo
|
||||||
$suppressedOut = RunLinuxCmd -username $user -password $password -ip $hs1VIP -port $hs1vm1sshport -command "mv Runtime.log start-client.py.log -f" -runAsSudo
|
$suppressedOut = RunLinuxCmd -username $user -password $password -ip $hs1VIP -port $hs1vm1sshport -command "mv Runtime.log start-client.py.log -f" -runAsSudo
|
||||||
RemoteCopy -download -downloadFrom $hs1VIP -files "/home/$user/start-client.py.log, /home/$user/iperf-client.txt" -downloadTo $LogDir -port $hs1vm1sshport -username $user -password $password
|
RemoteCopy -download -downloadFrom $hs1VIP -files "/home/$user/start-client.py.log, /home/$user/iperf-client.txt" -downloadTo $LogDir -port $hs1vm1sshport -username $user -password $password
|
||||||
RemoteCopy -download -downloadFrom $hs1VIP -files "/home/$user/state.txt, /home/$user/Summary.log" -downloadTo $LogDir -port $hs1vm1sshport -username $user -password $password
|
RemoteCopy -download -downloadFrom $hs1VIP -files "/home/$user/state.txt, /home/$user/Summary.log" -downloadTo $LogDir -port $hs1vm1sshport -username $user -password $password
|
||||||
|
@ -65,7 +69,7 @@ if ($isDeployed)
|
||||||
if($clientState -eq "TestCompleted" -and $clientSummary -eq "PASS")
|
if($clientState -eq "TestCompleted" -and $clientSummary -eq "PASS")
|
||||||
{
|
{
|
||||||
#Now we know that our client was connected. Let's go and check the server now...
|
#Now we know that our client was connected. Let's go and check the server now...
|
||||||
$suppressedOut = RunLinuxCmd -username $user -password $password -ip $dtapServerIp -port $dtapServerSshport -command "./check-server.py && mv Runtime.log check-server.py.log -f" -runAsSudo
|
$suppressedOut = RunLinuxCmd -username $user -password $password -ip $dtapServerIp -port $dtapServerSshport -command "python check-server.py && mv Runtime.log check-server.py.log -f" -runAsSudo
|
||||||
RemoteCopy -download -downloadFrom $dtapServerIp -files "/home/$user/check-server.py.log, /home/$user/iperf-server.txt" -downloadTo $LogDir -port $dtapServerSshport -username $user -password $password
|
RemoteCopy -download -downloadFrom $dtapServerIp -files "/home/$user/check-server.py.log, /home/$user/iperf-server.txt" -downloadTo $LogDir -port $dtapServerSshport -username $user -password $password
|
||||||
RemoteCopy -download -downloadFrom $dtapServerIp -files "/home/$user/state.txt, /home/$user/Summary.log" -downloadTo $LogDir -port $dtapServerSshport -username $user -password $password
|
RemoteCopy -download -downloadFrom $dtapServerIp -files "/home/$user/state.txt, /home/$user/Summary.log" -downloadTo $LogDir -port $dtapServerSshport -username $user -password $password
|
||||||
$serverState = Get-Content $LogDir\state.txt
|
$serverState = Get-Content $LogDir\state.txt
|
||||||
|
|
Загрузка…
Ссылка в новой задаче