When I'm writing a script using snappi I want to be able to execute it against multiple TG backends (Ixia-C or IxNet).
And I want to have a smart way to skip some logic if it is not supported. That could be something like a get_capability() call.
Real-world example:
I'm creating a test suite with traffic that is expected to be running on the emulator and real hardware. In the first case I will be using Ixia-C, and in the 2d - IxNetwork. But I don't want to make any changes in the test code.
So I should be able to do one of two:
Skip the test e.g. in pytest - @pytest.skipif(snappi.get_capabilities().vxlan_control_plane == False)
In the code itself do some ifs:
if snappi.get_capabilities().vxlan_control_plane == True:
do_extra_configuration()
else:
logging.warning("Skipping VXLAN control plane configuration")
When I'm writing a script using snappi I want to be able to execute it against multiple TG backends (Ixia-C or IxNet). And I want to have a smart way to skip some logic if it is not supported. That could be something like a get_capability() call.
Real-world example: I'm creating a test suite with traffic that is expected to be running on the emulator and real hardware. In the first case I will be using Ixia-C, and in the 2d - IxNetwork. But I don't want to make any changes in the test code. So I should be able to do one of two: