def _teardown_testbed(dut, creds, ptf, test_params, tbinfo): """ Tears down the testbed, returning it to its initial state. """ logging.info("Restore PTF post COPP test") copp_utils.restore_ptf(ptf) logging.info("Restore COPP policer to default settings") copp_utils.restore_policer(dut, test_params.nn_target_namespace) if test_params.swap_syncd and not dut.is_multi_asic: logging.info("Restore default syncd docker...") docker.restore_default_syncd(dut, creds) else: copp_utils.restore_syncd(dut, test_params.nn_target_namespace) logging.info("Reloading config and restarting swss...") config_reload(dut)
def _teardown_testbed(dut, ptf, test_params): """ Tears down the testbed, returning it to its initial state. """ logging.info("Restore PTF post COPP test") copp_utils.restore_ptf(ptf) logging.info("Restore COPP policer to default settings") copp_utils.restore_policer(dut) if test_params.swap_syncd: logging.info("Restore default syncd docker...") docker.restore_default_syncd(dut) else: logging.info("Reloading config and restarting swss...") config_reload(dut) logging.info("Restore LLDP") dut.command("docker exec lldp supervisorctl start lldpd") dut.command("docker exec lldp supervisorctl start lldp-syncd")