Get or clear PFC counter for a device
def test_fun(duthosts, rand_one_dut_hostname):
duthost = duthosts[rand_one_dut_hostname]
counter_facts = duthost.sonic_pfc_counters(method="get")
method- Whether to get or clear counters- Required:
True - Type:
String - Chocies:
getclear
- Required:
Returns dictionary with information on interfaces and their counters. The dictionary hierarchy is described below, with each indentation describing a sub-dictionary:
ansible_facts{INTERFACE_NAME}- Dictionary with counters for specified interfaceRx- list of counters for recieved packetsTx- list of counters for transmitted packets