Skip to content

Commit

Permalink
removing "add_from_json" command if "add" is not present in supported…
Browse files Browse the repository at this point in the history
… commands (#103)

* removing add_from_json if add is not supported

* add_from_json fix
  • Loading branch information
satish153 authored Nov 21, 2022
1 parent b131472 commit 40325b0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tdi_python/tdiTable.py
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ def __init__(self, cintf, handle, info, info_handle):
# TODO: Need to find a better way of doing this
#
self.modify_table_names(table_name)
self.supported_commands = ["info", "add_from_json", "entry", "string_choices"]
self.supported_commands = ["info", "entry", "string_choices"]
self.set_supported_attributes_to_supported_commands()
self.set_supported_operations_to_supported_commands()
self.set_supported_apis_to_supported_commands()
Expand Down Expand Up @@ -1832,6 +1832,9 @@ def set_supported_apis_to_supported_commands(self):
if "dump" not in self.supported_commands:
self.supported_commands.append("dump")

if "add" in self.supported_commands:
self.supported_commands.append("add_from_json")

def _attr_deallocate(self, attr_hdl):
sts = self._cintf.get_driver().tdi_attributes_deallocate(attr_hdl)
if not sts == 0:
Expand Down

0 comments on commit 40325b0

Please sign in to comment.