[openstack-dev] [nova][glance] Format of 'locations' data in image metadata ?

Daniel P. Berrange berrange at redhat.com
Wed May 20 09:06:03 UTC 2015


On Wed, May 20, 2015 at 12:01:37AM +0200, Flavio Percoco wrote:
> On 19/05/15 17:19 +0100, Daniel P. Berrange wrote:
> >In Nova we are attempting to model[1] the glance image metadata and
> >properties using the Nova object model (now oslo.versionedobjects).
> >
> >The one item I'm stuck on understanding is the 'locations' field
> >and more specifically the 'metadata' element in each location
> >entry
> >
> >
> >In the file glance/api/v2/images.py I can see this description
> >of the data format:
> >
> >       'locations': {
> >           'type': 'array',
> >           'items': {
> >               'type': 'object',
> >               'properties': {
> >                   'url': {
> >                       'type': 'string',
> >                       'maxLength': 255,
> >                   },
> >                   'metadata': {
> >                       'type': 'object',
> >                   },
> >               },
> >               'required': ['url', 'metadata'],
> >           },
> >           'description': _('A set of URLs to access the image file kept in '
> >                            'external store'),
> >
> >
> >As you can see here, 'metadata' is just said to be of type 'object'.
> >
> >Is there somewhere that actually describes what is valid contents
> >for this field ? Is it sufficient to assume the metadata will only
> >ever be a dict of strings, or can the metadata be a complex type
> >with arbitrarily nested data structures ?
> 
> It's just arbitrary metadata for now, we don't have a specific format.
> I'm curious to know if there are folks using this field. We do (did)
> have a use case for it.

Yep, I'd be curious to understand just what it is used for in practice ?
Is the data to be stored in there determined by python code, or by the
local administrator or both ?


Regards,
Daniel
-- 
|: http://berrange.com      -o-    http://www.flickr.com/photos/dberrange/ :|
|: http://libvirt.org              -o-             http://virt-manager.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: http://entangle-photo.org       -o-       http://live.gnome.org/gtk-vnc :|



More information about the OpenStack-dev mailing list