From 1398b8b7b78427bb6f3fe027eb70ea2926909394 Mon Sep 17 00:00:00 2001 From: Colleen Murphy Date: Mon, 21 Sep 2015 21:16:11 -0700 Subject: [PATCH] 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 --- lib/puppet/type/neutron_subnet.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/puppet/type/neutron_subnet.rb b/lib/puppet/type/neutron_subnet.rb index fb3736332..5fc9dcd2a 100644 --- a/lib/puppet/type/neutron_subnet.rb +++ b/lib/puppet/type/neutron_subnet.rb @@ -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