From 1f7bba17f9d53aad7810718ea26d8bbad405b309 Mon Sep 17 00:00:00 2001 From: Mohit Mehta Date: Thu, 7 Oct 2010 18:07:16 -0700 Subject: Initial release --- templates-cfg/zone-policy/zone/node.def | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 templates-cfg/zone-policy/zone/node.def (limited to 'templates-cfg/zone-policy/zone/node.def') diff --git a/templates-cfg/zone-policy/zone/node.def b/templates-cfg/zone-policy/zone/node.def new file mode 100644 index 0000000..eb8c3c8 --- /dev/null +++ b/templates-cfg/zone-policy/zone/node.def @@ -0,0 +1,24 @@ +tag: +type: txt +help: Zone name + +syntax:expression: pattern $VAR(@) "^[[:print:]]{1,20}$" ; + "Zone name must be 20 characters or less" + +syntax:expression: pattern $VAR(@) "^[^-]" ; "Zone name cannot start with \"-\"" + +syntax:expression: pattern $VAR(@) "^[^;]*$" ; "Zone name cannot contain ';'" + +create: + if ! /opt/vyatta/sbin/vyatta-zone.pl \ + --action=add-zone \ + --zone-name="$VAR(@)"; then + exit 1 + fi + +delete: + if ! /opt/vyatta/sbin/vyatta-zone.pl \ + --action=delete-zone \ + --zone-name="$VAR(@)"; then + exit 1 + fi -- cgit v1.2.3