Using a completion helper in op mode like:
<completionHelp> <path>vrf name</path> </completionHelp>
will generate the following node.def file:
cat /opt/vyatta/share/vyatta-op/templates/show/vrf/node.tag/node.def help: Show information on specific VRF instance allowed: /bin/cli-shell-api listActiveNodes vrf name run: ${vyos_op_scripts_dir}/show_vrf.py -e "$3"
The problem here is a call to /bin/cli-shell-api listNodes vrf name will return: 'bar' 'foo' see the ' quotes. The old node.def implementations got rid if the '' by using shell code like:
allowed: local -a bnodes local -a nnodes eval "bnodes=($(cli-shell-api listActiveNodes protocols bgp))" for b in "${bnodes[@]}"; do eval "nnodes=($(cli-shell-api listActiveNodes protocols bgp $b neighbor))" echo -n "${nnodes[@]}" ' ' done
Which removes the ' quotes.
This can easily be done using | sed -e "s/'//g"
Question: Why is this of no issue in configuration mode?