You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The current Image struct looks for a JSON properties object, but one isn't actually returned by the server. Instead, properties are mixed in with all of the other top-level key/values.
I haven't dug into the Glance API / code enough to see what the best way of dealing with this is yet. I see the python-glanceclient making requests for a schema, so it's possible a schema is used as the basis of what is considered a "base" property and what is considered extra.
The easier solution might be to just compare what else has been sent down by the server and if it's not defined in the Image struct, add it to the Properties map.
There is a Go feature (issue #15314) planned to be added soon (Go1.9early) that I think would solve this for us (a []string would be returned in the Unmarshalerror that would contain any unused fields). Until then, I think we should your easier solution.
Activity
[-]ImageService v2: Error Reading Properties[/-][+]ImageService v2: Unable to Read Properties[/+]jrperritt commentedon Feb 17, 2017
There is a Go feature (issue #15314) planned to be added soon (Go1.9early) that I think would solve this for us (a
[]stringwould be returned in theUnmarshalerrorthat would contain any unused fields). Until then, I think we should your easier solution.jrperritt commentedon Jun 11, 2017
@jtopjian I think
RemainingKeyscould be used for this, no?jtopjian commentedon Jun 11, 2017
Yep :)
jtopjian commentedon Jun 16, 2017
Fixed by #376