Skip to content

Commit

Permalink
Merge pull request #39 from Benature/master
Browse files Browse the repository at this point in the history
fix issue table without match key
  • Loading branch information
edgar-costa authored Jun 26, 2022
2 parents 9990bbf + 0aa0942 commit 6348152
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion p4utils/utils/thrift_API.py
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,12 @@ def get_json_key(key):
table.key += [(field_name, match_type, bitwidth)]

self.tables[j_table["name"]] = table


# table's action has no match key
if len(j_table["key"]) == 0:
if j_table["name"].startswith(j_pipeline["source_info"]["source_fragment"]+"."):
self.tables[j_table["name"]] = table

for j_meter in get_json_key("meter_arrays"):
meter_array = MeterArray(j_meter["name"], j_meter["id"])
if "is_direct" in j_meter and j_meter["is_direct"]:
Expand Down

0 comments on commit 6348152

Please sign in to comment.