From 5628b35fbdaa54af8d33908cdcace08914c7648d Mon Sep 17 00:00:00 2001 From: Lars Kellogg-Stedman Date: Tue, 24 Mar 2015 22:11:48 -0400 Subject: [PATCH] provide explicit defaults for boolean values When creating a neutron_network resource without explicitly setting the router_external parameter, the network would be created with router:external=True, which would result in a network to which it was not possible to attach nova instances. This change sets explicit defaults for all boolean options in the neutron_network type. Closes-bug: 1436133 Change-Id: Id0f950da791c65ba9034046177870f31f6f57c46 --- lib/puppet/type/neutron_network.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/puppet/type/neutron_network.rb b/lib/puppet/type/neutron_network.rb index 8ceecc059..ca4573a1b 100644 --- a/lib/puppet/type/neutron_network.rb +++ b/lib/puppet/type/neutron_network.rb @@ -17,6 +17,7 @@ Puppet::Type.newtype(:neutron_network) do newproperty(:admin_state_up) do desc 'The administrative status of the network' newvalues(/(t|T)rue/, /(f|F)alse/) + defaultto 'True' munge do |v| v.to_s.capitalize end @@ -25,6 +26,7 @@ Puppet::Type.newtype(:neutron_network) do newproperty(:shared) do desc 'Whether this network should be shared across all tenants or not' newvalues(/(t|T)rue/, /(f|F)alse/) + defaultto 'False' munge do |v| v.to_s.capitalize end @@ -61,6 +63,7 @@ Puppet::Type.newtype(:neutron_network) do newproperty(:router_external) do desc 'Whether this router will route traffic to an external network' newvalues(/(t|T)rue/, /(f|F)alse/) + defaultto 'False' munge do |v| v.to_s.capitalize end