Merge "Ignore onwer_specifed.* properties in images"

This commit is contained in:
Zuul 2020-08-28 20:31:16 +00:00 committed by Gerrit Code Review
commit de7a28ecd3

View File

@ -145,7 +145,7 @@ Puppet::Type.type(:glance_image).provide(
:disk_format => attrs[:disk_format],
:min_disk => attrs[:min_disk],
:min_ram => attrs[:min_ram],
:properties => exclude_readonly_props(properties),
:properties => exclude_owner_specified_props(exclude_readonly_props(properties)),
:image_tag => attrs[:image_tag]
)
end
@ -189,6 +189,14 @@ Puppet::Type.type(:glance_image).provide(
return rv
end
def self.exclude_owner_specified_props(props)
if props == nil
return nil
end
rv = props.select { |k, v| not k.start_with?('owner_specified.') }
return rv
end
def props_to_s(props)
hidden = ['os_hash_algo', 'os_hash_value', 'os_hidden']
props.flat_map{ |k, v|