Fix #734: add extra field on project #729
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This includes the fix for #734 "add extra field on project
To support extra field, I have modified org.openstack4j.openstack.identity.v3.domain.KeystoneProject like followings.
private Map<String, String> extra = new HashMap<String, String>();
in the KeystoneProject@JsonAnyGetter
and@JsonAnySetter
which are called when there are no explicitly mapped field.@JsonIgnoreProperties(value = "extra" , ignoreUnknown = true)
on KeystoneProject class. If we don't provide this on KeystoneProject class,private Map<String, String> extra = new HashMap<String, String>();
will be translated to"extra": { .... }
. This is not working in IdentityV3. Puting@JsonIgnore
onprivate Map<String, String> extra = new HashMap<String, String>();
doesn't not working for @JsonAnyGetter and @JsonAnySetter as well. I found that this is the only way not to send extra field to keystone.You can not find the exact blueprint for this in keystone but I can find relevant the blueprint in horizon.
Because it's only visible when the additional field is input, there is not much examples in OpenStack IdentityV3 spec.
You can fine the some evidence in the following. is_domain field.
http://developer.openstack.org/api-ref-identity-v3.html#updateProject