[NETCONF-526] In edit-config payload default-operation needs to be set to default-value for PUT/POST calls Created: 14/Mar/18  Updated: 18/Apr/18  Resolved: 05/Apr/18

Status: Resolved
Project: netconf
Component/s: netconf
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: High
Reporter: Balaji Varadaraju Assignee: Balaji Varadaraju
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: 1 minute
Time Spent: Not Specified
Original Estimate: 1 minute

Issue Links:
Duplicate
is duplicated by NETCONF-537 Default operation none when data does... Resolved

 Description   

For the PUT/POST calls right now default-operation tag in the edit-config is set to "none"  whose behavior is explained below as per RFC. 

For devices that enforces this behavior strictly when there is parent structure in the request, ( say for a nested model) , device will throw an error.

We should  leave this field out ( which will default to merge) and let the device make the right decision.
none: The target datastore is unaffected by the configuration
in the <config> parameter, unless and until the incoming
configuration data uses the "operation" attribute to request
a different operation. If the configuration in the <config>
parameter contains data for which there is not a
corresponding level in the target datastore, an <rpc-error>
is returned with an <error-tag> value of data-missing.
Using "none" allows operations like "delete" to avoid
unintentionally creating the parent hierarchy of the element
to be deleted.



 Comments   
Comment by Jakub Morvay [ 28/Mar/18 ]

Missing parent structure should be (and also is) created by RESTCONF. RESTCONF merges all parent node in the same transaction before actually putting data at the specified path. So I don't see the point to change the implementation of edit-config rpc. edit-config rpc is used also by netconf's data broker implementation and I think this can break the data broker's API contract.

This was already discussed in NETCONF-335 and was resolved as RESOLVED INVALID.

Comment by Balaji Varadaraju [ 29/Mar/18 ]

I addressed this in the gerrit comment. Restconf dealing with this broke many commercially available devices and restconf is not doing this anymore for mounted netconf devices. So it is best to leave it to device to determine this.

Comment by Balaji Varadaraju [ 05/Apr/18 ]

Checked into stable/carbon and master.

Generated at Wed Feb 07 20:15:15 UTC 2024 using Jira 8.20.10#820010-sha1:ace47f9899e9ee25d7157d59aa17ab06aee30d3d.