Checks that the BGP statistic matches some expected value.
def test_fun(duthosts, rand_one_dut_hostname, enum_frontend_asic_index):
duthost = duthosts[rand_one_dut_hostname]
sonic_asic = duthost.asic_instance(asic_index=enum_frontend_asic_index)
stat_matches = sonic_asic.check_bgp_statistic("ipv4_idle", 1)
stat- name of statistic to check for- Required:
True - Type:
String - Choices: for possible values look for keys under
bgp_statisticsin the output of the bgp_facts Ansible module.
- Required:
value- expected value thatstatshould match- Required:
True - Type: Varies depending on
stat
- Required:
True if BGP statistic associated with stat matches value, False otherwise.