When using the set command to update an object, a replace method is called which uses the PUT operation to send a payload. The object on the device is fully overwritten by the contents of this payload, so if the reference objects aren't included then they are removed.
Ex: Virtual server vs1 has a listener l1. When a replace is called without l1 in the port list, then l1 is disassociated from vs1.
To fix the issue, a GET call is used to access the contents of the object from which the reference objects are extracted. These objects are then added to the payload as-is so that they aren't removed from the object being updated.
Config Changes
N/A
Test Cases
N/A: There isn't any testable logic here everything surrounding this is on the device side.
Description
Severity: Critical
When using the
set
command to update an object, a replace method is called which uses the PUT operation to send a payload. The object on the device is fully overwritten by the contents of this payload, so if the reference objects aren't included then they are removed.Ex: Virtual server vs1 has a listener l1. When a replace is called without l1 in the port list, then l1 is disassociated from vs1.
Jira Ticket
STACK-1699 STACK-1703
Links
PR#217 of a10-octavia
Technical Approach
To fix the issue, a GET call is used to access the contents of the object from which the reference objects are extracted. These objects are then added to the payload as-is so that they aren't removed from the object being updated.
Config Changes
N/A
Test Cases
N/A: There isn't any testable logic here everything surrounding this is on the device side.