Skip to content

ImageService v2: Unable to Read Properties #260

Closed

Description

@jtopjian

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.

Activity

  1. changed the title [-]ImageService v2: Error Reading Properties[/-] [+]ImageService v2: Unable to Read Properties[/+] on Feb 17, 2017
  2. jrperritt commented on Feb 17, 2017

    @jrperritt
    Contributor

    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 Unmarshal error that would contain any unused fields). Until then, I think we should your easier solution.

  3. jrperritt commented on Jun 11, 2017

    @jrperritt
    Contributor

    @jtopjian I think RemainingKeys could be used for this, no?

  4. jtopjian commented on Jun 11, 2017

    @jtopjian
    ContributorAuthor

    Yep :)

  5. jtopjian commented on Jun 16, 2017

    @jtopjian
    ContributorAuthor

    Fixed by #376

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions