ixnetwork_restpy icon indicating copy to clipboard operation
ixnetwork_restpy copied to clipboard

Saving captured packets

Open sumitsinha01 opened this issue 1 year ago • 3 comments
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 avatar Nov 27 '23 11:11 sumitsinha01

@sumitsinha01 were you able to find the answer for this?

dhruvinsh avatar Feb 13 '24 22:02 dhruvinsh

""" 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)

1201110211 avatar Jun 07 '24 09:06 1201110211

I found it at https://openixia.github.io/ixnetwork_restpy/#/reference

1201110211 avatar Jun 07 '24 09:06 1201110211