Closed matsuda73 closed 4 years ago
Hi Matsuda,
You need to add csvsnapshot.refresh() after calling csvsnapshot.update(CsvName='Flow Statistics Snapshot',...) csvsnapshot.update() only updates the ixNet API Server side, not the script side. You need to call refresh() in order to update csvsnapshot.CsvName var on the script side. Please try it out and let me know how it goes.
Hi,
It goes well now.
By the way, my script worked without csvsnapshot.refresh() with the earlier version of ixnetwork-restpy (probably 1.0.55). Is it changed recently? And csvsnapshot.refresh() is missing in the following sample script. ($LIBRARY PATH)/ixnetwork_restpy/samples/statistics/csv_snapshot.py
Thanks, Matsuda
Hi Matsuda,
I tried with ixNetwork 9.0. I need the refresh() line. I also tried with older ixnetwork_restpy version 1.0.53. I also need the refresh() line. I'm not sure how your script worked before, but as far as I know, you need to call refresh after the update. We will update the sample script in ixnetwork_restpy samples.
The following code worked before, but it doesn't work with the latest RestPy and IxNetwork Web. Am I missing anything?
snippet
[*1] Script Watch shows that csvSnapshot (on API Server) is updated.
[*2] However, csvsnapshot (local) is not updated
[*3] As a result, download fails due to NotFoundError
If I modify the following line, I can download the correct file (Flow Statistics Snapshot.csv).
remoteFile = os.path.normpath(os.path.join(statistics.CsvFilePath, 'Flow Statistics Snapshot.csv'))
Thanks, Matsuda