golang api fails to update network-ipam refs
Affects | Status | Importance | Assigned to | Milestone | ||
---|---|---|---|---|---|---|
Juniper Openstack | Status tracked in Trunk | |||||
Trunk |
Fix Committed
|
Undecided
|
Pedro Marques | |||
OpenContrail |
In Progress
|
Undecided
|
Pedro Marques |
Bug Description
The generated golang API classes have a problem when dealing with updates.
The contrail-api supports updating a reference field as a write with the full content (via the PUT method of the object) or as a ADD/DELETE operation via the update-refs URI.
The desired outcome is to use the PUT method when:
1. The new set of refs is empty.
2. The old set of refs is empty.
3. The old set of refs is unknown (since the Clear operation doesn't perform a read of the refs).
Otherwise, when the previous list of refs is known, the code should use the "update-refs" URI.
The current code incorrectly assumes that the current set of refs is the empty set when a Clear operation is issued and the
refs field is no marked as valid.
Changed in opencontrail: | |
assignee: | nobody → Pedro Marques (5-roque) |
status: | New → In Progress |
tags: | added: golang-api |
Review in progress for https:/ /review. opencontrail. org/16849
Submitter: Pedro Marques (<email address hidden>)