aboutsummaryrefslogtreecommitdiff
path: root/templates/shared-network.erb
diff options
context:
space:
mode:
Diffstat (limited to 'templates/shared-network.erb')
-rw-r--r--templates/shared-network.erb9
1 files changed, 6 insertions, 3 deletions
diff --git a/templates/shared-network.erb b/templates/shared-network.erb
index 99a7aca..407106a 100644
--- a/templates/shared-network.erb
+++ b/templates/shared-network.erb
@@ -1,6 +1,9 @@
-#### dhcp::shared-network <%= name %>
-shared-network <%= name %> {
-<% subnets.each do |subnet| -%>
+#### dhcp::shared_network <%= @name %>
+shared-network <%= @name %> {
+<% @subnets.each do |subnet|
+ scope.function_validate_string([subnet])
+ scope.function_validate_re([subnet, '^([1-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])(\.([0-9]|[1-9][0-9]|1[0-9][0-9]|2[0-4][0-9]|25[0-5])){3}$'])
+-%>
include "<%= scope.lookupvar("dhcp::params::config_dir") %>/subnets/<%= subnet %>.conf";
<% end -%>
}