Skip to content

PUT on leaf not working as expected #252

@anand-kumar-subramanian

Description

@anand-kumar-subramanian

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

  1. "version"
  2. "3"
  3. "query-interval"
  4. "50"

After we execute the above REST API:
HGETALL CFG_L2MC_TABLE|Vlan10

  1. "version"
  2. "1"

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions