The --handle-bad-reply controls the behavior of the XML parser and dictates how a bad RPC reply will be handled, whether the bad node(s) will be pruned or the value will be adapted and the client will try to convert it to an acceptable type.

Settings that can be used:

  • adapt: Leaf or leaf-list: convert bad value to a string value and try to keep it if possible or prune if not. Container or list: leave in the data if possible or prune if not.

  • prune: Prune failing node(s).

  • error: Do not attempt to prune or modify nodes. Report an error.


user@system> yangcli-pro --handle-bad-reply=prune


or configured in the /etc/yumapro/yangcli-pro.conf file:


#### leaf handle-bad-reply [string]
#  Controls the behavior of the XML parser and dictates
#  how a bad RPC reply will be handled, whether the bad
#  node(s) will be pruned or the value will be adapted
#  and the client will try to convert it to an acceptable type.
#  Deafult is error.
#
#  enum adapt
#    - Leaf or leaf-list: convert bad value to a string value
#       and try to keep it if possible or prune if not.
#    - Container or list: leave in the data if possible or prune if not.
#  enum prune
#    Prune failing node(s).
#  enum error
#    Do not attempt to prune or modify nodes. Report an error.
#    May result in empty output.";
#
# handle-bad-reply error