# Start protocol                                                               #
################################################################################
print("Starting lacp on both topologies")
_result_ = ixiahlt.test_control(action='start_all_protocols')

print("Waiting for 60 seconds")
time.sleep(60)

################################################################################
# Get LACP learned_info   stats                                                #
################################################################################
print("Fetching SYSTEM1-lacp-LHS learned_info")

lacp1_stats = ixiangpf.emulation_lacp_info(
    handle=lacp_1_handle,
    mode='global_learned_info',
    session_type="lacp",
)
if lacp1_stats['status'] != IxiaHlt.SUCCESS:
    ErrorHandler('emulation_lacp_info', lacp1_stats)
# end if
print("\n\nPrinting SYSTEM1-lacp-LHS learned_info")
pprint(lacp1_stats)

################################################################################
# Get LACP per-port stats                                                      #
################################################################################
print("\n\nFetching SYSTEM1-lacp-RHS per port stats")
lacp2_stats = ixiangpf.emulation_lacp_info(
    handle=lacp_2_handle,
    mode='per_port',
# Start protocol                                                               #
################################################################################
print("Starting StaticLAG on topology1")
_result_ = ixiahlt.test_control(action='start_all_protocols')

print("Waiting for 30 seconds")
time.sleep(30)

################################################################################
# Get Static LAG learned_info   stats                                          #
################################################################################
print("Fetching SYSTEM1-StaticLag-LHS learned_info")

staticLag1_stats = ixiangpf.emulation_lacp_info(
    handle = staticLag_1_handle,
    mode   = 'global_learned_info',
    session_type = "staticLag",
)
if staticLag1_stats['status'] != IxiaHlt.SUCCESS:
    ErrorHandler('emulation_lacp_info', staticLag1_stats)
# end if
print("\n\nPrinting SYSTEM1-StaticLag-LHS learned_info")
pprint(staticLag1_stats)

print("\n\nFetching SYSTEM1-StaticLag-RHS per port stats")
staticLag2_stats = ixiangpf.emulation_lacp_info(
    handle = staticLag_2_handle,
    mode   = 'per_port',
    session_type = "staticLag",
)
if staticLag2_stats['status'] != IxiaHlt.SUCCESS: