Map allocation_pool property to set

If the user specifies an array of more than one allocation pool for the
neutron_subnet allocation_pool parameter, the order of the pools is not
guaranteed. On sequential puppet runs, puppet may error with "Property
allocation_pools does not support being updated" because the array is
read in a different order. To avoid this, define the insync? method to
compare the values as though they were unordered sets rather than
ordered lists.

Change-Id: I9c146b5abe563c7e6ebfed169e770ffe8e5cf94b
This commit is contained in:
Colleen Murphy 2015-09-21 21:16:11 -07:00
parent db3418c2c9
commit 1398b8b7b7

View File

@ -28,6 +28,9 @@ Puppet::Type.newtype(:neutron_subnet) do
Array of Sub-ranges of cidr available for dynamic allocation to ports.
Syntax:["start=IPADDR,end=IPADDR", ...]
EOT
def insync?(is)
is.to_set == should.to_set
end
end
newproperty(:gateway_ip) do