p4lang / tdi

Table-Driven Interface (TDI) for a P4-programmable backend device.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parenthesis "()" in key field name is not properly handled in tdicli.py

nithas-ns opened this issue · comments

At line number

p_name = name.decode('ascii').replace('$', '').replace('-', '_').replace(':', '_').replace('[', '_').replace(']', '_')
few of the special characters in key name is replaced with appropriate characters such that tdi cli does not throw error (i.e., These key names are used as python method argument identifiers, python identifiers has to be alpha numeric and it cannot contain special characters).
When referred to p4 spec, "isValid()" is also an allowed key name, so this key also has to be handled properly (i.e., replacement for "()")