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

2015-05-20 Thread Daniel P. Berrange
On Wed, May 20, 2015 at 05:43:07PM +0800, Zhi Yan Liu wrote: > On Wed, May 20, 2015 at 5:23 PM, Zhi Yan Liu wrote: > > On Wed, May 20, 2015 at 5:06 PM, Daniel P. Berrange > > wrote: > >> On Wed, May 20, 2015 at 12:01:37AM +0200, Flavio Percoco wrote: > >>> On 19/05/15 17:19 +0100, Daniel P. Berr

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

2015-05-20 Thread Zhi Yan Liu
On Wed, May 20, 2015 at 5:23 PM, Zhi Yan Liu wrote: > On Wed, May 20, 2015 at 5:06 PM, Daniel P. Berrange > wrote: >> 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

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

2015-05-20 Thread Zhi Yan Liu
On Wed, May 20, 2015 at 5:06 PM, Daniel P. Berrange wrote: > 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

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

2015-05-20 Thread Daniel P. Berrange
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 underst

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

2015-05-19 Thread Flavio Percoco
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

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

2015-05-19 Thread Nikhil Komawar
Hi Daniel, It's stored as "JSONEncodedDict" as shown below. This is a DB model and can accept arbitrarily large and nested data structure. Hope this helps. class JSONEncodedDict(TypeDecorator): """Represents an immutable structure as a json-encoded string""" impl = Text

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

2015-05-19 Thread Daniel P. Berrange
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/i