Closed shobnaren closed 4 years ago
There are several options tha tyou can pass into statObj.takeSnapshot().
In your case, you can add isLinux=True, localLinuxPath='/home/hgee' to the call.
See below: def takeSnapshot(self, viewName='Flow Statistics', windowsPath=None, isLinux=False, localLinuxPath=None, renameDestinationFile=None, includeTimestamp=False, mode='overwrite'): """ Description Take a snapshot of the vieweName statistics. This is a two step process. 1> Take a snapshot of the statistics that you want and store it in the C: drive for Windows. For Linux, the snapshot goes to /home/ixia_logs. 2> Copy the statistics from the snapshot locations to the local Linux where you ran the script..
Parameters
viewName: The name of the statistics to get.
windowsPath: For Windows|WindowsConnectionMgr only.
The C: drive + path to store the snapshot: Example: c:\\Results.
isLinux: <bool>: Defaults to False. Set to True if you're getting the snapshot from Linux chassis.
localLinuxPath: None|path. Provide the local Linux path to put the snapshot file.
If None, this API won't copy the stat file to local Linux.
The stat file will remain on Windows c: drive.
renameDestinationFile: None or a name of the file other than the viewName.
includeTimestamp: True|False: To include a timestamp at the end of the file.
mode: append|overwrite: append=To append stats to an existing stat file.
overwrite=Don't append stats. Create a new stat file.
Example:
For Windows:
statObj.takeSnapshot(viewName='Flow Statistics', windowsPath='C:\\Results', localLinuxPath='/home/hgee',
renameDestinationFile='my_renamed_stat_file.csv', includeTimestamp=True)
For Linux:
statObj.takeSnapshot(viewName='Flow Statistics', isLinux=True, localLinuxPath='/home/hgee')
Is there means to download the CSV that is generated on the IxNetwork Rest server? It is copied on windows "C:/Results" path.
What is the REST end point to push into my test linux server?
RestApi/Python/Utilities/takeSnapShot.py