-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PUT on leaf not working as expected #252
Comments
Currently sub-oper support is not there. This issue will be resolved with sub-oper support. |
@anand-kumar-subramanian |
@kwangsuk, @anand-kumar-subramanian : d.SetEntry() will set the value of the hash exactly as provided. Please see the HLD under: https://github.com/project-arlo/SONiC/blob/master/doc/mgmt/Management%20Framework.md#32264-db-access-layer, DB access layer, Redis, CVL Interaction: very first row. It gives the exact algorithm. If you want to modify only one field in an existing hash, please use the 3rd row for d.ModEntry(). |
curl -v -X PUT "http://10.175.125.43:4443/restconf/data/openconfig-network-instance:network-instances/network-instance=INST2/protocols/protocol=IGMP_SNOOPING,IGMP-SNOOPING/openconfig-network-instance-deviation:igmp-snooping/interfaces/interface=Vlan10/config/version" -H "accept: application/yang-data+json" -H "Content-Type: application/yang-data+json" -d "{ "openconfig-network-instance-deviation:version": 1}"
In the above REST API, the target node of the URI is leaf "version", but when we execute this command, transformer replaces the whole redis table with leaf version with value 1, that is it removes all the entries in the redis db table and set only the leaf version value.
Actually transformer should update only the field version and should not remove other fields in the redis db table as the target node of the URI is leaf version.
Before issuing this request:
HGETALL CFG_L2MC_TABLE|Vlan10
After we execute the above REST API:
HGETALL CFG_L2MC_TABLE|Vlan10
The text was updated successfully, but these errors were encountered: