Sort host_aggregate hosts list for comparison
Sort the list of hosts in the aggregate, both from the provider/nova API as well as from the resource definition in the manifest. This allows for more accurate comparison to determine if the resource really needs to be updated or not. Change-Id: I10a1995eb58e4bcd492bb7d6f94453a29cb31097 Closes-bug: 1534845
This commit is contained in:
@@ -21,7 +21,7 @@ Puppet::Type.type(:nova_aggregate).provide(
|
||||
:id => attrs['Id'],
|
||||
:availability_zone => attrs['Availability Zone'],
|
||||
:metadata => attrs['Metadata'],
|
||||
:hosts => attrs['Hosts']
|
||||
:hosts => attrs['Hosts'].sort
|
||||
)
|
||||
end
|
||||
end
|
||||
|
@@ -99,7 +99,7 @@ Puppet::Type.newtype(:nova_aggregate) do
|
||||
desc 'Single host or comma seperated list of hosts'
|
||||
#convert DSL/string form to internal form
|
||||
munge do |value|
|
||||
return value.split(",").map{|el| el.strip()}
|
||||
return value.split(",").map{|el| el.strip()}.sort
|
||||
end
|
||||
end
|
||||
|
||||
|
Reference in New Issue
Block a user