Skip to content

Commit

Permalink
wait_for_fields
Browse files Browse the repository at this point in the history
Signed-off-by: Guohan Lu <lguohan@gmail.com>
  • Loading branch information
lguohan committed Feb 15, 2021
1 parent ed709fd commit c4aac6c
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/test_virtual_chassis.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,8 +196,11 @@ def test_chassis_system_neigh(self, vct):

# Check for presence of encap index, retrieve and store it for sync verification
test_neigh_entry = asic_db.wait_for_entry("ASIC_STATE:SAI_OBJECT_TYPE_NEIGHBOR_ENTRY", test_neigh)
test_neigh_entry_attrs = asic_db.wait_for_fields("ASIC_STATE:SAI_OBJECT_TYPE_NEIGHBOR_ENTRY", test_neigh, ["SAI_NEIGHBOR_ENTRY_ATTR_ENCAP_INDEX"])
print(test_neigh)
print(test_neigh_entry)
encap_index = test_neigh_entry.get("SAI_NEIGHBOR_ENTRY_ATTR_ENCAP_INDEX")
print(test_neigh_entry_attrs)
encap_index = test_neigh_entry_attrs["SAI_NEIGHBOR_ENTRY_ATTR_ENCAP_INDEX"]
assert encap_index != "" and encap_index != None, "VOQ encap index is not programmed in ASIC_DB"

break
Expand Down

0 comments on commit c4aac6c

Please sign in to comment.