support structured data(list and dict) in glance metadata

Registered by Isaku Yamahata

Support structure data in glance metadata
The the moment glance metadata is simple key value pair. Thus structured data
(list and dict)

Why structure data is wanted?
For boot-from-volume support in nova, the information about block device
mapping is stored in image metadata which is stored as metadata of glance.
That is, which device of guest device is which nova volume/ephemeral devices.
So it's a list of dict.

Example of metadata
metadata = {'name': 'fake public image',
           'properties': {
               'mappings': [
                   {'device_name': '/dev/sda1',
                    'snapshot_id': 0x12345678,
                    'delete_on_termination': False},
                   {'device_name': '/dev/sda2',
                    'no_device': True}],
               'block_device_mapping': [
                        {'virtual': 'ami', 'device': 'sda1'},
                        {'virtual': 'root', 'device': '/dev/sda1'},

                        {'virtual': 'swap', 'device': 'sdb1'},
                        {'virtual': 'swap', 'device': 'sdb2'},

                        {'virtual': 'ephemeral0', 'device': 'sdc1'},
                        {'virtual': 'ephemeral1', 'device': 'sdc2'}]}}

Blueprint information

Status:
Complete
Approver:
None
Priority:
Not
Drafter:
Isaku Yamahata
Direction:
Needs approval
Assignee:
Isaku Yamahata
Definition:
Obsolete
Series goal:
None
Implementation:
Unknown
Milestone target:
None
Completed by
Brian Waldon

Sprints

Whiteboard

The solution is to encode the data as a string (probably JSON) and store that as the value of your metadata.

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.