Skip to content

Commit

Permalink
minor fix - handling of bool value for Set in API adapter
Browse files Browse the repository at this point in the history
Signed-off-by: Michal Novak <[email protected]>
  • Loading branch information
micnovak committed Nov 21, 2023
1 parent dc31d53 commit 5101b45
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/confd_gnmi_api_adapter.py
Original file line number Diff line number Diff line change
Expand Up @@ -698,6 +698,10 @@ def update_paths(path, val, parent_node):
if csnode.info().shallow_type() == _tm.C_IDENTITYREF:
# in JSON, identityrefs are prefixed by module name
val = self.fix_path_prefixes(val)
if csnode.info().shallow_type() == _tm.C_BOOL:
# ConfD boolean value is lowercase string
val = str(val).lower()
log.debug("path=%s val=%s", path, val)
trans.set_elem(val, path)
update_paths(path_str, jval, None)
op = gnmi_pb2.UpdateResult.UPDATE
Expand Down

0 comments on commit 5101b45

Please sign in to comment.