[NETCONF-657] Support plain PATCH per RFC8040 Created: 24/Feb/20  Updated: 21/Apr/20  Resolved: 21/Apr/20

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

Type: Improvement Priority: High
Reporter: Allan Clarke Assignee: Allan Clarke
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

RFC8040 specifieds plain PATCH requirements that are distinct from Yang PATCH



 Comments   
Comment by Allan Clarke [ 04/Mar/20 ]

Allan's workflow...

  1. Pull NETCONF master code (DONE)
  2. Ensure buildable environment (DONE)
  3. Ensure debuggable environment (DONE)
  4. Review NETCONF user and dev docs (DONE)
  5. Install/configure testtool (DONE)
  6. Determine simulator or device to use (DONE)
  7. Learn Yang Patch versus Plain Patch (DONE)
  8. Learn Yangtools programming model (DONE)
  9. Figure out how to configure patch response on device (DONE)
  10. Estimate implementation and test time (DONE ALREADY IN COMMENT)
  11. Confirm expectation (SKIP)
  12. Learn NETTCONF code around desired feature (DONE)
  13. Propose design and get feedback (SKIP - N+1 with existing implementation)
  14. Learn NETCONF unit testing code (DONE)
  15. Propose tests for feature and get feedback (SKIP - all unit tests)
  16. Implement feature (DONE)
  17. Get 3rd party acceptance of implementation (will be done through Jamo and Luis)
  18. Implement unit/feature tests (DONE)
  19. PR and review process (IN-PROGRESS)
Comment by Allan Clarke [ 04/Mar/20 ]

Gotchas...

  • Could not build older versions because SNAPSHOTS no longer on Nexus -> had to move up to Neon.
  • Failure on build due to Java 8 version -> installed Java 11 (via homebrew on OSX)
  • NETCONF build failure on javax/annotation/PostConstruct -> solved by moving to Maven 3.6
  • Use 127.0.0.1 instead of localhost in URLs and payloads (may be an OSX port-forwarding issue)
  • Watch out for copy/paste putting "smart quotes" in payloads - gives hard to spot errors
  • Yang Patch aggressively deletes data beyond scope of affected data (probable bug)
Comment by Allan Clarke [ 04/Mar/20 ]

Helpfuls...

karaf/target/assembly/bin/karaf debug

feature:install odl-netconf-connector-all
feature:install odl-resconf
feature:install odl-netconf-topology
feature:install odl-restconf-nb-rfc8040

curl -s -u admin:admin http://localhost:8181/rests/data/network-topology:network-topology | python -mjson.tool

karaf> log:set TRACE org.opendaylight.controller.sal.connect.netconf

// launch testtool using the jukebox schema

java -jar ./netconf/tools/netconf-testtool/target/netconf-testtool-*-SNAPSHOT-executable.jar  --device-count 1  --schemas-dir ./restconf/restconf-nb-rfc8040/target/test-classes/jukebox/

See attached POSTMAN for both bierrman02 and RfC8040 CRUD operations. It has a bierman02 and rfc8040 set of operations (not symmetrical due to my laziness). Ignore the netopeer operations.

Comment by Allan Clarke [ 04/Mar/20 ]

Errata...
https://docs.opendaylight.org/projects/netconf/en/latest/user-guide.html#_spawning_additional_netconf_connectors_while_the_controller_is_running

  • Add missing - to docker command: docker run -rm -t -p 1831:830 dockeruser/netopeer
  • Change "Now just follow the chapter: Spawning netconf-connector." from chapter to section and fix broken link (multiple on this page)
Comment by Allan Clarke [ 04/Mar/20 ]

Upstream...

https://jira.opendaylight.org/browse/NETCONF-657 (this issue upstream)
https://jira.opendaylight.org/browse/NETCONF-312 (potential bug affecting PATCH)
https://git.opendaylight.org/gerrit/c/netconf/+/88214 (this work in Gerrit)

Resources...

https://tools.ietf.org/html/rfc8040#section-1.1.6 (RESTCONF)
https://tools.ietf.org/html/draft-ietf-netconf-yang-patch-14 (Yang Patch)
https://docs.opendaylight.org/en/latest/developer-guide/yang-tools.html (YangTools)
https://tools.ietf.org/html/rfc7950 (Yang)

Comment by Allan Clarke [ 06/Apr/20 ]

https://git.opendaylight.org/gerrit/c/netconf/+/88214
https://git.opendaylight.org/gerrit/c/netconf/+/88378
https://git.opendaylight.org/gerrit/c/netconf/+/88379

Comment by Robert Varga [ 21/Apr/20 ]

allanclarke for the record: an issue is not resolved until fixes to all target branches are actually merged.

Comment by Allan Clarke [ 21/Apr/20 ]

Thanks for letting me know. I did not know the workflow so I asked Jamo and followed his advice.
Bad Jamo, bad!

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