ixnetwork_restpy
ixnetwork_restpy copied to clipboard
Saving captured packets
trafficstars
Hi,
Is there a way to save the captured packets and download the pcap file?
Don't see any method in capture.py file to do that.
@sumitsinha01 were you able to find the answer for this?
""" Method Ixnetwork.SaveCapture
Executes the saveCapture operation on the server.
This command saves the current capture data to the specified directory.
The IxNetwork model allows for multiple method Signatures with the same name while python does not.
DEPRECATED saveCapture(Arg1=string, async_operation=bool)
---------------------------------------------------------
- Arg1 (str): Directory for saving the captures
- async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete.
DEPRECATED saveCapture(Arg1=string, Arg2=string, async_operation=bool)
----------------------------------------------------------------------
- Arg1 (str): Directory for saving the captures
- Arg2 (str): Suffix used for naming the capture files
- async_operation (bool=False): True to execute the operation asynchronously. Any subsequent rest api calls made through the Connection class will block until the operation is complete.
Raises
------
- NotFoundError: The requested resource does not exist on the server
- ServerError: The server has encountered an uncategorized error condition
"""
# This auto generated sample is based on the following assumptions:
# - there is at least one session active
# - the session configuration contains at least one resource for every class present in the sample
from ixnetwork_restpy import TestPlatform
ixnetwork = TestPlatform('127.0.0.1') \
.Sessions.find() \
.Ixnetwork
ixnetwork.SaveCapture(*args, **kwargs)
I found it at https://openixia.github.io/ixnetwork_restpy/#/reference