OpenIxia / IxNetwork

A central location for IxNetwork sample scripts and utilities. Please also visit http://openixia.com
MIT License
51 stars 59 forks source link

loadQuickTest.py doesn't download all CSV files properly #135

Closed matsuda73 closed 2 months ago

matsuda73 commented 2 years ago

Hi,

My environment

IxNetworkWeb 9.20 Patch1 (9.20.2199.50) ixnetwork-restpy 1.0.61

Issue

All four CSV files (AggregateResults.csv, iteration.csv, results.csv, portMap.csv) are renamed to the same file name (rfc2544throughputQuickTest 1(timestamp).csv when downloaded, and so I can get only one of them.

I suspect that addTimestampToFile() in loadQuickTest.py is not good. It doesn't use NewFilename in the return value of newFileWithTimestamp.

restpy.log

getQuickTestCsvFiles: /root/.local/share/Ixia/IxNetwork/data/result/DP.Rfc2544Tput/1c42ec12-b4d4-49cd-b3ba-b43b10ffac34/Run0005

2022-07-11 04:11:22 [ixnetwork_restpy.connection] [INFO]

Copying file from Linux API server:/root/.local/share/Ixia/IxNetwork/data/result/DP.Rfc2544Tput/1c42ec12-b4d4-49cd-b3ba-b43b10ffac34/Run0005/AggregateResults.csv to local Linux: AggregateResults.csv

2022-07-11 04:12:17 [ixnetwork_restpy.connection] [INFO]
Copying file from API server:/root/.local/share/Ixia/IxNetwork/data/result/DP.Rfc2544Tput/1c42ec12-b4d4-49cd-b3ba-b43b10ffac34/Run0005/AggregateResults.csv -> /home/user/work/IxNetwork/RestPy/SampleScripts/rfc2544throughput_QuickTest 1_131034.csv
2022-07-11 04:12:27 [ixnetwork_restpy.connection] [INFO]

Copying file from Linux API server:/root/.local/share/Ixia/IxNetwork/data/result/DP.Rfc2544Tput/1c42ec12-b4d4-49cd-b3ba-b43b10ffac34/Run0005/iteration.csv to local Linux: iteration.csv

2022-07-11 04:13:00 [ixnetwork_restpy.connection] [INFO]
Copying file from API server:/root/.local/share/Ixia/IxNetwork/data/result/DP.Rfc2544Tput/1c42ec12-b4d4-49cd-b3ba-b43b10ffac34/Run0005/iteration.csv -> /home/user/work/IxNetwork/RestPy/SampleScripts/rfc2544throughput_QuickTest 1_131034.csv
2022-07-11 04:13:03 [ixnetwork_restpy.connection] [INFO]

Copying file from Linux API server:/root/.local/share/Ixia/IxNetwork/data/result/DP.Rfc2544Tput/1c42ec12-b4d4-49cd-b3ba-b43b10ffac34/Run0005/results.csv to local Linux: results.csv

2022-07-11 04:13:14 [ixnetwork_restpy.connection] [INFO]
Copying file from API server:/root/.local/share/Ixia/IxNetwork/data/result/DP.Rfc2544Tput/1c42ec12-b4d4-49cd-b3ba-b43b10ffac34/Run0005/results.csv -> /home/user/work/IxNetwork/RestPy/SampleScripts/rfc2544throughput_QuickTest 1_131034.csv
2022-07-11 04:13:16 [ixnetwork_restpy.connection] [INFO]

Copying file from Linux API server:/root/.local/share/Ixia/IxNetwork/data/result/DP.Rfc2544Tput/1c42ec12-b4d4-49cd-b3ba-b43b10ffac34/Run0005/logFile.txt to local Linux: logFile.txt

2022-07-11 04:13:18 [ixnetwork_restpy.connection] [INFO]
Copying file from API server:/root/.local/share/Ixia/IxNetwork/data/result/DP.Rfc2544Tput/1c42ec12-b4d4-49cd-b3ba-b43b10ffac34/Run0005/logFile.txt -> /home/user/work/IxNetwork/RestPy/SampleScripts/rfc2544throughput_QuickTest 1_131034.txt
2022-07-11 04:13:19 [ixnetwork_restpy.connection] [INFO]

Copying file from Linux API server:/root/.local/share/Ixia/IxNetwork/data/result/DP.Rfc2544Tput/1c42ec12-b4d4-49cd-b3ba-b43b10ffac34/Run0005/portMap.csv to local Linux: portMap.csv

2022-07-11 04:13:19 [ixnetwork_restpy.connection] [INFO]
Copying file from API server:/root/.local/share/Ixia/IxNetwork/data/result/DP.Rfc2544Tput/1c42ec12-b4d4-49cd-b3ba-b43b10ffac34/Run0005/portMap.csv -> /home/user/work/IxNetwork/RestPy/SampleScripts/rfc2544throughput_QuickTest 1_131034.csv
2022-07-11 04:13:19 [ixnetwork_restpy.connection] [WARNING]

copyApiServerFileToLocalLinux ERROR: File /root/.local/share/Ixia/IxNetwork/data/result/DP.Rfc2544Tput/1c42ec12-b4d4-49cd-b3ba-b43b10ffac34/Run0005/portMap.csv does not exist on the system
        Current Server Errors/Warnings:
        07/10/2022 21:10:32 [WARNING] The Traffic Item was modified. Please perform a Traffic Generate to update the associated traffic Flow Groups

2022-07-11 04:13:26 [ixnetwork_restpy.connection] [DEBUG] POST https://10.39.18.25:443/api/v1/sessions/12/ixnetwork/quickTest/rfc2544throughput/1/operations/generatereport {"Arg1": "/api/v1/sessions/12/ixnetwork/quickTest/rfc2544throughput/1"}
2022-07-11 04:13:29 [ixnetwork_restpy.connection] [DEBUG] 202 Accepted b'{"id":"","url":"","resultUrl":"","executionTimeMs":3164.0,"state":"SUCCESS","progress":100,"message":null,"result":"/root/.local/share/Ixia/IxNetwork/data/result/DP.Rfc2544Tput/1c42ec12-b4d4-49cd-b3ba-b43b10ffac34/Run0005/report.pdf"}'
2022-07-11 04:13:29 [ixnetwork_restpy.connection] [INFO] Copying PDF results to: /home/user/work/IxNetwork/RestPy/SampleScriptsrfc2544throughput_QuickTest 1_131034.pdf
2022-07-11 04:13:30 [ixnetwork_restpy.connection] [DEBUG] POST https://10.39.18.25:443/api/v1/sessions/12/operations/stop
2022-07-11 04:13:31 [ixnetwork_restpy.connection] [DEBUG] GET https://10.39.18.25/api/v1/sessions/12/operations/stop/23
2022-07-11 04:13:32 [ixnetwork_restpy.connection] [DEBUG] GET https://10.39.18.25/api/v1/sessions/12/operations/stop/23
2022-07-11 04:13:33 [ixnetwork_restpy.connection] [DEBUG] GET https://10.39.18.25/api/v1/sessions/12/operations/stop/23
2022-07-11 04:13:34 [ixnetwork_restpy.connection] [DEBUG] GET https://10.39.18.25/api/v1/sessions/12/operations/stop/23
2022-07-11 04:13:35 [ixnetwork_restpy.connection] [DEBUG] GET https://10.39.18.25/api/v1/sessions/12/operations/stop/23
2022-07-11 04:13:36 [ixnetwork_restpy.connection] [DEBUG] GET https://10.39.18.25/api/v1/sessions/12/operations/stop/23
2022-07-11 04:13:37 [ixnetwork_restpy.connection] [DEBUG] GET https://10.39.18.25/api/v1/sessions/12/operations/stop/23
2022-07-11 04:13:38 [ixnetwork_restpy.connection] [DEBUG] GET https://10.39.18.25/api/v1/sessions/12/operations/stop/23
2022-07-11 04:13:38 [ixnetwork_restpy.connection] [DEBUG] DELETE https://10.39.18.25:443/api/v1/sessions/12
hubogee commented 2 months ago

Noted! Thanks!