Comment 21 for bug 1945500

Revision history for this message
Rodrigo Barbieri (rodrigo-barbieri2010) wrote (last edit ):

Validation failed. The fix did not work. See example below:

[{'container_format': 'bare', 'disk_format': 'raw', 'name': 'image-from-vol-from-image', 'visibility': 'private', 'protected': False, 'properties': {'owner_specified.openstack.object': 'images/cirros2', 'os_glance_importing_to_stores': '', 'signature_verified': 'False', 'os_glance_failed_import': '', 'architecture': 'x86_64', 'owner_specified.openstack.sha256': '', 'owner_specified.openstack.md5': ''}}]

 was filtered using the reserved name spaces [['os_glance', 'img_signature']], and the result is

[{'container_format': 'bare', 'disk_format': 'raw', 'name': 'image-from-vol-from-image', 'visibility': 'private', 'protected': False, 'properties': {'owner_specified.openstack.object': 'images/cirros2', 'os_glance_importing_to_stores': '', 'signature_verified': 'False', 'os_glance_failed_import': '', 'architecture': 'x86_64', 'owner_specified.openstack.sha256': '', 'owner_specified.openstack.md5': ''}}]

The algorithm is:

for k, v in metadata.items():
____if any(k.startswith(reserved_name_space)
________for reserved_name_space in reserved_name_spaces):
______continue
____new_metadata[k] = v

LOG.debug("The metadata set [%s] was filtered using the reserved name "
                       "spaces [%s], and the result is [%s].", metadata,
                        reserved_name_spaces, new_metadata)

The os_glance properties are not filtered because they are under "properties" dict property. The bug will have to be reopened and reworked.