os api 1.1 metadata incorrect serialization in json

Asked by Yurij

It is not understandable why metadata is serialized on get operation in such string
{
    "metadata" : {
        "values" : {
            "Server Label" : "Web Head 1",
        }
    }
}
on update in
{
    "metadata" : {
            "Server Label" : "Web Head 2"
        }
}
and one item is serialized
{
    "meta" : {
            "Server Label" : "Web Head 1"
        }
}

Is it final version of json rendering format for metadata?

Question information

Language:
English Edit question
Status:
Answered
For:
OpenStack Compute (nova) Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Dan Prince (dan-prince) said :
#1

Hi Yuri,

The metadata JSON is roughly based on the beta draft of the Openstack API spec. For the most part the spec was followed with the exception of "values" (which we call collections). I don't think we implemented any of the collections json for the cactus release. To be honest as we got into the implementation I wasn't a big fan of the 'meta' vs. 'metadata' differences in the draft specification.

The beta draft of the spec is available here:

http://docs.openstack.org/openstack-compute/developer/cs-devguide.pdf

Additionally we do plan on discussing some of the formatting issues at the upcoming dev conference.

Can you help with this problem?

Provide an answer of your own, or ask Yurij for more information if necessary.

To post a message you must log in.