diff options
author | srividya0208 <68350089+srividya0208@users.noreply.github.com> | 2021-05-20 00:19:40 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-05-19 20:49:40 +0200 |
commit | cc8a03a6711d99c1c877c1abb84e60a271143e65 (patch) | |
tree | 45fa63893c4ccad649b4fe79a659d654dac1ff60 | |
parent | b0f75452279f16bc301333c801766de037fdbe0d (diff) | |
download | vyatta-cfg-quagga-cc8a03a6711d99c1c877c1abb84e60a271143e65.tar.gz vyatta-cfg-quagga-cc8a03a6711d99c1c877c1abb84e60a271143e65.zip |
protocols: static: T3558: add completion helper for dhcp-interface options
The command "set proto static route x.x.x.x/x dhcp-interface" does not show
the possible interface list when entered a tab.
Added the previous parameters to the script
-rw-r--r-- | templates/protocols/static/route/node.tag/dhcp-interface/node.def | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/templates/protocols/static/route/node.tag/dhcp-interface/node.def b/templates/protocols/static/route/node.tag/dhcp-interface/node.def index 7820800b..e1793c08 100644 --- a/templates/protocols/static/route/node.tag/dhcp-interface/node.def +++ b/templates/protocols/static/route/node.tag/dhcp-interface/node.def @@ -1,9 +1,8 @@ type: txt -help: DHCP interface that supplies the next-hop IP address for this static route -allowed: - local -a array ; - array=( /var/lib/dhcp/en* /var/lib/dhcp/eth* /var/lib/dhcp/br* /var/lib/dhcp/bond* ) ; - echo -n ${array[@]##*/} +help: DHCP interface supplying next-hop IP address +val_help: txt; DHCP interface name +allowed: sh -c "${vyos_completion_dir}/list_interfaces.py" +syntax:expression: exec "${vyos_libexec_dir}/validate-value --exec \"${vyos_validators_dir}/interface-name \" --value \'$VAR(@)\'"; "Invalid value" create: sudo /opt/vyatta/sbin/vyatta-update-static-route.pl --interface=$VAR(@) --route=$VAR(../@) --table=main --option=create RIP=$(/opt/vyatta/sbin/vyatta-dhcp-helper.pl --interface=$VAR(@) --want=router) |