diff options
4 files changed, 16 insertions, 48 deletions
diff --git a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def index 28f085e5..d86675ec 100644 --- a/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def +++ b/templates/interfaces/bonding/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def @@ -1,21 +1,13 @@ multi: -type: txt +type: ipv4,ipv4net help: Virtual address [REQUIRED] +syntax:expression: exec " + if [[ '$VAR(@)' == '*/' ]]; then /opt/vyatta/sbin/valid_address $VAR(@); fi" + syntax:expression: exec "/opt/vyatta/sbin/vyatta-keepalived.pl \ --vrrp-action='check-vip' --vip='$VAR(@)' "\ ; "Invalid virtual-address [$VAR(@)] for vrrp-group $VAR(../@)" -syntax:expression: exec " - if echo '$VAR(@)' | grep -q '/' ; then - if /opt/vyatta/sbin/vyatta-interfaces.pl \ - --valid-addr $VAR(@) --dev $VAR(../../../@) ; then - exit 0 - else - echo Invalid vrrp virtual-address [$VAR(@)] for vrrp-group $VAR(../@) - exit 1 - fi - fi" - val_help: ipv4; Virtual IP address (up to 20 per group) val_help: ipv4net; Virtual IP address with prefix (up to 20 per group) diff --git a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def index 28f085e5..d86675ec 100644 --- a/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def +++ b/templates/interfaces/bonding/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def @@ -1,21 +1,13 @@ multi: -type: txt +type: ipv4,ipv4net help: Virtual address [REQUIRED] +syntax:expression: exec " + if [[ '$VAR(@)' == '*/' ]]; then /opt/vyatta/sbin/valid_address $VAR(@); fi" + syntax:expression: exec "/opt/vyatta/sbin/vyatta-keepalived.pl \ --vrrp-action='check-vip' --vip='$VAR(@)' "\ ; "Invalid virtual-address [$VAR(@)] for vrrp-group $VAR(../@)" -syntax:expression: exec " - if echo '$VAR(@)' | grep -q '/' ; then - if /opt/vyatta/sbin/vyatta-interfaces.pl \ - --valid-addr $VAR(@) --dev $VAR(../../../@) ; then - exit 0 - else - echo Invalid vrrp virtual-address [$VAR(@)] for vrrp-group $VAR(../@) - exit 1 - fi - fi" - val_help: ipv4; Virtual IP address (up to 20 per group) val_help: ipv4net; Virtual IP address with prefix (up to 20 per group) diff --git a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def index 28f085e5..d86675ec 100644 --- a/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def +++ b/templates/interfaces/ethernet/node.tag/vif/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def @@ -1,21 +1,13 @@ multi: -type: txt +type: ipv4,ipv4net help: Virtual address [REQUIRED] +syntax:expression: exec " + if [[ '$VAR(@)' == '*/' ]]; then /opt/vyatta/sbin/valid_address $VAR(@); fi" + syntax:expression: exec "/opt/vyatta/sbin/vyatta-keepalived.pl \ --vrrp-action='check-vip' --vip='$VAR(@)' "\ ; "Invalid virtual-address [$VAR(@)] for vrrp-group $VAR(../@)" -syntax:expression: exec " - if echo '$VAR(@)' | grep -q '/' ; then - if /opt/vyatta/sbin/vyatta-interfaces.pl \ - --valid-addr $VAR(@) --dev $VAR(../../../@) ; then - exit 0 - else - echo Invalid vrrp virtual-address [$VAR(@)] for vrrp-group $VAR(../@) - exit 1 - fi - fi" - val_help: ipv4; Virtual IP address (up to 20 per group) val_help: ipv4net; Virtual IP address with prefix (up to 20 per group) diff --git a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def index 28f085e5..d86675ec 100644 --- a/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def +++ b/templates/interfaces/ethernet/node.tag/vrrp/vrrp-group/node.tag/virtual-address/node.def @@ -1,21 +1,13 @@ multi: -type: txt +type: ipv4,ipv4net help: Virtual address [REQUIRED] +syntax:expression: exec " + if [[ '$VAR(@)' == '*/' ]]; then /opt/vyatta/sbin/valid_address $VAR(@); fi" + syntax:expression: exec "/opt/vyatta/sbin/vyatta-keepalived.pl \ --vrrp-action='check-vip' --vip='$VAR(@)' "\ ; "Invalid virtual-address [$VAR(@)] for vrrp-group $VAR(../@)" -syntax:expression: exec " - if echo '$VAR(@)' | grep -q '/' ; then - if /opt/vyatta/sbin/vyatta-interfaces.pl \ - --valid-addr $VAR(@) --dev $VAR(../../../@) ; then - exit 0 - else - echo Invalid vrrp virtual-address [$VAR(@)] for vrrp-group $VAR(../@) - exit 1 - fi - fi" - val_help: ipv4; Virtual IP address (up to 20 per group) val_help: ipv4net; Virtual IP address with prefix (up to 20 per group) |