Munge weights to be in the format %.2f
The swift ring db converts integers into floats with 2 decimal points percisions. This was causing the ring resources to constantly resync. This commit munges weight in the type to the proper format.
This commit is contained in:
parent
d7698139fe
commit
f93ba72fbb
|
@ -15,7 +15,11 @@ Puppet::Type.newtype(:ring_account_device) do
|
|||
|
||||
newproperty(:device_name)
|
||||
|
||||
newproperty(:weight)
|
||||
newproperty(:weight) do
|
||||
munge do |value|
|
||||
"%.2f" % value
|
||||
end
|
||||
end
|
||||
|
||||
newproperty(:meta)
|
||||
|
||||
|
|
|
@ -15,7 +15,11 @@ Puppet::Type.newtype(:ring_container_device) do
|
|||
|
||||
newproperty(:device_name)
|
||||
|
||||
newproperty(:weight)
|
||||
newproperty(:weight) do
|
||||
munge do |value|
|
||||
"%.2f" % value
|
||||
end
|
||||
end
|
||||
|
||||
newproperty(:meta)
|
||||
|
||||
|
|
|
@ -15,7 +15,11 @@ Puppet::Type.newtype(:ring_object_device) do
|
|||
|
||||
newproperty(:device_name)
|
||||
|
||||
newproperty(:weight)
|
||||
newproperty(:weight) do
|
||||
munge do |value|
|
||||
"%.2f" % value
|
||||
end
|
||||
end
|
||||
|
||||
newproperty(:meta)
|
||||
|
||||
|
|
Loading…
Reference in New Issue