diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-07-21 13:55:27 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2010-07-21 13:55:27 -0700 |
commit | 1b2b777227ed2645c68b5ab05931beafff9ccf5d (patch) | |
tree | de961de899568c935cd357150915576c8c2d49c8 | |
parent | 79f2a3d43c3f7726d0771e9d3770471776c8b360 (diff) | |
download | vyatta-cfg-system-1b2b777227ed2645c68b5ab05931beafff9ccf5d.tar.gz vyatta-cfg-system-1b2b777227ed2645c68b5ab05931beafff9ccf5d.zip |
Add completion for text fields with limited values
For all nodes that do 'syntax:expression: $VAR(@) in' add allowed
tag to show possible values
21 files changed, 34 insertions, 2 deletions
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def index a33aefb0..556c7f35 100644 --- a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def +++ b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def @@ -2,5 +2,6 @@ type: txt help: Authentication type syntax:expression: $VAR(@) in "plaintext-password", "ah"; \ "authentication must be plaintext-password or ah" +allowed: echo plaintext-password ah val_help: plaintext-password; Plain text password mode val_help: ah; IP Authentication Header mode diff --git a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def index a33aefb0..556c7f35 100644 --- a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def +++ b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def @@ -2,5 +2,6 @@ type: txt help: Authentication type syntax:expression: $VAR(@) in "plaintext-password", "ah"; \ "authentication must be plaintext-password or ah" +allowed: echo plaintext-password ah val_help: plaintext-password; Plain text password mode val_help: ah; IP Authentication Header mode diff --git a/templates/interfaces/ethernet/node.tag/duplex/node.def b/templates/interfaces/ethernet/node.tag/duplex/node.def index 8fbe1594..0351365f 100644 --- a/templates/interfaces/ethernet/node.tag/duplex/node.def +++ b/templates/interfaces/ethernet/node.tag/duplex/node.def @@ -2,6 +2,7 @@ type: txt help: Duplex mode default: "auto" syntax:expression: $VAR(@) in "auto", "half", "full"; "duplex must be auto, half or full" +allowed: echo auto half full commit:expression: ( $VAR(@) == "auto" && $VAR(../speed/@) == "auto" ) || \ ( $VAR(@) != "auto" && $VAR(../speed/@) != "auto" ) ; \ diff --git a/templates/interfaces/ethernet/node.tag/speed/node.def b/templates/interfaces/ethernet/node.tag/speed/node.def index d9be6f6d..fbdc5893 100644 --- a/templates/interfaces/ethernet/node.tag/speed/node.def +++ b/templates/interfaces/ethernet/node.tag/speed/node.def @@ -2,6 +2,7 @@ type: txt help: Link speed default: "auto" syntax:expression: $VAR(@) in "auto", "10", "100", "1000", "2500", "10000"; "Speed must be auto, 10, 100, 1000, 2500, or 10000" +allowed: echo auto 10 100 1000 2500 10000 commit:expression: ( $VAR(@) == "auto" && $VAR(../duplex/@) == "auto" ) || \ ( $VAR(@) != "auto" && $VAR(../duplex/@) != "auto" ) ; \ diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def index a33aefb0..556c7f35 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def @@ -2,5 +2,6 @@ type: txt help: Authentication type syntax:expression: $VAR(@) in "plaintext-password", "ah"; \ "authentication must be plaintext-password or ah" +allowed: echo plaintext-password ah val_help: plaintext-password; Plain text password mode val_help: ah; IP Authentication Header mode diff --git a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def index a33aefb0..556c7f35 100644 --- a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def +++ b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/authentication/type/node.def @@ -2,5 +2,6 @@ type: txt help: Authentication type syntax:expression: $VAR(@) in "plaintext-password", "ah"; \ "authentication must be plaintext-password or ah" +allowed: echo plaintext-password ah val_help: plaintext-password; Plain text password mode val_help: ah; IP Authentication Header mode diff --git a/templates/interfaces/tunnel/node.tag/encapsulation/node.def b/templates/interfaces/tunnel/node.tag/encapsulation/node.def index edbc3ae1..651e79b8 100644 --- a/templates/interfaces/tunnel/node.tag/encapsulation/node.def +++ b/templates/interfaces/tunnel/node.tag/encapsulation/node.def @@ -2,6 +2,7 @@ type: txt help: Encapsulation of this tunnel interface [REQUIRED] syntax:expression: $VAR(@) in "ipip", "gre", "sit", "gre-bridge"; "Must be (ipip, gre, gre-bridge, sit)" +allowed: echo gre gre-bridge ipip sit create:expression: "true" update:expression: "false" ; \ diff --git a/templates/interfaces/tunnel/node.tag/multicast/node.def b/templates/interfaces/tunnel/node.tag/multicast/node.def index 911a4e88..9f675b0e 100644 --- a/templates/interfaces/tunnel/node.tag/multicast/node.def +++ b/templates/interfaces/tunnel/node.tag/multicast/node.def @@ -3,6 +3,7 @@ help: Multicast operation over tunnel default: "disable" val_help: enable; Enable Multicast val_help: disable; Disable Multicast (default) +allowed: echo enable disable syntax:expression: $VAR(@) in "enable", "disable"; \ "Must be 'disable' or 'enable'" diff --git a/templates/service/snmp/community/node.tag/authorization/node.def b/templates/service/snmp/community/node.tag/authorization/node.def index aac6b0b2..3d306d59 100644 --- a/templates/service/snmp/community/node.tag/authorization/node.def +++ b/templates/service/snmp/community/node.tag/authorization/node.def @@ -1,5 +1,6 @@ type: txt default: "ro" +allowed: echo ro rw help: Authorization type (rw or ro) (default: ro) syntax:expression: $VAR(@) in "ro", "rw"; "Authorization type must be either rw or ro" diff --git a/templates/system/login/user/node.tag/level/node.def b/templates/system/login/user/node.tag/level/node.def index 54891031..19683d1e 100644 --- a/templates/system/login/user/node.tag/level/node.def +++ b/templates/system/login/user/node.tag/level/node.def @@ -1,6 +1,7 @@ type: txt help: User privilege level default: "admin" +allowed: echo admin operator syntax:expression: $VAR(@) in "admin", "operator"; "Allowed levels are \"admin\" and \"operator\"" val_help: admin; Administrators diff --git a/templates/system/syslog/console/facility/node.def b/templates/system/syslog/console/facility/node.def index 67d41a27..4082a46f 100644 --- a/templates/system/syslog/console/facility/node.def +++ b/templates/system/syslog/console/facility/node.def @@ -2,6 +2,9 @@ tag: type: txt help: Facility for console logging syntax:expression: $VAR(@) in "auth", "authpriv", "cron", "daemon", "kern", "lpr", "mail", "mark", "news", "protocols", "security", "syslog", "user", "uucp", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7", "all"; "\"$VAR(@)\" is not a valid logging facility" +allowed: echo auth authpriv cron daemon kern lpr mail mark news protocols \ + security syslog user uucp \ + local0 local1 local2 local3 local4 local5 local6 local7 all val_help: all; All facilities excluding "mark" val_help: auth; Authentication and authorization diff --git a/templates/system/syslog/console/facility/node.tag/level/node.def b/templates/system/syslog/console/facility/node.tag/level/node.def index bae531af..888f3eff 100644 --- a/templates/system/syslog/console/facility/node.tag/level/node.def +++ b/templates/system/syslog/console/facility/node.tag/level/node.def @@ -2,6 +2,7 @@ type: txt help: Logging level syntax:expression: $VAR(@) in "emerg", "alert", "crit", "err", "warning", "notice", "info", "debug"; "\"$VAR(@)\" is not a valid logging level" default: "err" +allowed: echo emerg alert crit err warning notice info debug val_help: emerg; Emergency messages val_help: alert; Urgent messages diff --git a/templates/system/syslog/file/node.tag/facility/node.def b/templates/system/syslog/file/node.tag/facility/node.def index 6c80f388..8544bfba 100644 --- a/templates/system/syslog/file/node.tag/facility/node.def +++ b/templates/system/syslog/file/node.tag/facility/node.def @@ -3,6 +3,10 @@ type: txt help: Facility for file logging syntax:expression: $VAR(@) in "auth", "authpriv", "cron", "daemon", "kern", "lpr", "mail", "mark", "news", "protocols", "security", "syslog", "user", "uucp", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7", "all"; "\"$VAR(@)\" is not a valid logging facility" +allowed: echo auth authpriv cron daemon kern lpr mail mark news protocols \ + security syslog user uucp \ + local0 local1 local2 local3 local4 local5 local6 local7 all + val_help: all; All facilities excluding "mark" val_help: auth; Authentication and authorization val_help: authpriv; Non-system authorization diff --git a/templates/system/syslog/file/node.tag/facility/node.tag/level/node.def b/templates/system/syslog/file/node.tag/facility/node.tag/level/node.def index bae531af..888f3eff 100644 --- a/templates/system/syslog/file/node.tag/facility/node.tag/level/node.def +++ b/templates/system/syslog/file/node.tag/facility/node.tag/level/node.def @@ -2,6 +2,7 @@ type: txt help: Logging level syntax:expression: $VAR(@) in "emerg", "alert", "crit", "err", "warning", "notice", "info", "debug"; "\"$VAR(@)\" is not a valid logging level" default: "err" +allowed: echo emerg alert crit err warning notice info debug val_help: emerg; Emergency messages val_help: alert; Urgent messages diff --git a/templates/system/syslog/global/facility/node.def b/templates/system/syslog/global/facility/node.def index 5107dd0e..58198d9f 100644 --- a/templates/system/syslog/global/facility/node.def +++ b/templates/system/syslog/global/facility/node.def @@ -2,6 +2,9 @@ tag: type: txt help: Facility for system logging syntax:expression: $VAR(@) in "auth", "authpriv", "cron", "daemon", "kern", "lpr", "mail", "mark", "news", "protocols", "security", "syslog", "user", "uucp", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7", "all" ; "\"$VAR(@)\" is not a valid logging facility" +allowed: echo auth authpriv cron daemon kern lpr mail mark news protocols \ + security syslog user uucp \ + local0 local1 local2 local3 local4 local5 local6 local7 all val_help: all; All facilities excluding "mark" val_help: auth; Authentication and authorization diff --git a/templates/system/syslog/global/facility/node.tag/level/node.def b/templates/system/syslog/global/facility/node.tag/level/node.def index bae531af..888f3eff 100644 --- a/templates/system/syslog/global/facility/node.tag/level/node.def +++ b/templates/system/syslog/global/facility/node.tag/level/node.def @@ -2,6 +2,7 @@ type: txt help: Logging level syntax:expression: $VAR(@) in "emerg", "alert", "crit", "err", "warning", "notice", "info", "debug"; "\"$VAR(@)\" is not a valid logging level" default: "err" +allowed: echo emerg alert crit err warning notice info debug val_help: emerg; Emergency messages val_help: alert; Urgent messages diff --git a/templates/system/syslog/host/node.tag/facility/node.def b/templates/system/syslog/host/node.tag/facility/node.def index 883be27f..76b8f793 100644 --- a/templates/system/syslog/host/node.tag/facility/node.def +++ b/templates/system/syslog/host/node.tag/facility/node.def @@ -2,6 +2,10 @@ tag: type: txt help: Facility for host logging syntax:expression: $VAR(@) in "auth", "authpriv", "cron", "daemon", "kern", "lpr", "mail", "mark", "news", "protocols", "security", "syslog", "user", "uucp", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7", "all"; "\"$VAR(@)\" is not a valid logging facility" +allowed: echo auth authpriv cron daemon kern lpr mail mark news protocols \ + security syslog user uucp \ + local0 local1 local2 local3 local4 local5 local6 local7 all + val_help: all; All facilities excluding "mark" val_help: auth; Authentication and authorization diff --git a/templates/system/syslog/host/node.tag/facility/node.tag/level/node.def b/templates/system/syslog/host/node.tag/facility/node.tag/level/node.def index bae531af..888f3eff 100644 --- a/templates/system/syslog/host/node.tag/facility/node.tag/level/node.def +++ b/templates/system/syslog/host/node.tag/facility/node.tag/level/node.def @@ -2,6 +2,7 @@ type: txt help: Logging level syntax:expression: $VAR(@) in "emerg", "alert", "crit", "err", "warning", "notice", "info", "debug"; "\"$VAR(@)\" is not a valid logging level" default: "err" +allowed: echo emerg alert crit err warning notice info debug val_help: emerg; Emergency messages val_help: alert; Urgent messages diff --git a/templates/system/syslog/user/node.tag/facility/node.def b/templates/system/syslog/user/node.tag/facility/node.def index e7d11110..c5cfad72 100644 --- a/templates/system/syslog/user/node.tag/facility/node.def +++ b/templates/system/syslog/user/node.tag/facility/node.def @@ -2,6 +2,10 @@ tag: type: txt help: Facility for user logging syntax:expression: $VAR(@) in "auth", "authpriv", "cron", "daemon", "kern", "lpr", "mail", "mark", "news", "protocols", "security", "syslog", "user", "uucp", "local0", "local1", "local2", "local3", "local4", "local5", "local6", "local7", "all"; "\"$VAR(@)\" is not a valid logging facility" +allowed: echo auth authpriv cron daemon kern lpr mail mark news protocols \ + security syslog user uucp \ + local0 local1 local2 local3 local4 local5 local6 local7 all + val_help: all; All facilities excluding "mark" val_help: auth; Authentication and authorization diff --git a/templates/system/syslog/user/node.tag/facility/node.tag/level/node.def b/templates/system/syslog/user/node.tag/facility/node.tag/level/node.def index bae531af..888f3eff 100644 --- a/templates/system/syslog/user/node.tag/facility/node.tag/level/node.def +++ b/templates/system/syslog/user/node.tag/facility/node.tag/level/node.def @@ -2,6 +2,7 @@ type: txt help: Logging level syntax:expression: $VAR(@) in "emerg", "alert", "crit", "err", "warning", "notice", "info", "debug"; "\"$VAR(@)\" is not a valid logging level" default: "err" +allowed: echo emerg alert crit err warning notice info debug val_help: emerg; Emergency messages val_help: alert; Urgent messages diff --git a/templates/zone-policy/zone/node.tag/default-action/node.def b/templates/zone-policy/zone/node.tag/default-action/node.def index 51f9c69d..61c8c784 100644 --- a/templates/zone-policy/zone/node.tag/default-action/node.def +++ b/templates/zone-policy/zone/node.tag/default-action/node.def @@ -1,8 +1,7 @@ type: txt - help: Default-action for traffic coming into this zone - default: "drop" +allowed: echo drop reject syntax:expression: $VAR(@) in "drop", "reject"; "default-action must be either drop or reject" |