[NETCONF-1090] Swagger document for a specific module in a specific mounted device not showing the name of the device Created: 17/Jul/23  Updated: 11/Aug/23  Resolved: 11/Aug/23

Status: Resolved
Project: netconf
Component/s: restconf-openapi
Affects Version/s: None
Fix Version/s: 7.0.0, 4.0.9, 5.0.8, 6.0.2

Type: Bug Priority: Low
Reporter: Šimon Ukuš Assignee: Šimon Ukuš
Resolution: Done Votes: 0
Labels: pt
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified


 Description   

After connecting a device with a name of `device-17830` and then requesting only swagger document for a specific model, the summary of the paths is incorrect/incomplete when it does not show the name of the device, which is different if we request all the models.

Steps to reproduce:
1. prepare schemas in directory

~/test-schemas

2. start karaf

netconf$ karaf/target/assembly/bin/karaf clean

3. run in karaf:

feature:install odl-netconf-topology odl-restconf-all

4. start netconf testool

netconf/netconf/tools/netconf-testtool/target$ java -jar netconf-testtool-7.0.0-SNAPSHOT-executable.jar --device-count 1 --debug true --schemas-dir ~/test-schemas

5. connect a device
6. in browser, go to

http://localhost:8181/openapi/explorer/index.html
  • you should see generated swagger document

7. go to

http://localhost:8181/openapi/api/v3/mounts/1
  • you should see swagger document for all modules

8. check summary of random path (get /rests/data/network-topology:network-topology/topology=topology-netconf/node=device-17830/yang-ext:mount/toaster:toaster) -> "GET - device-17830 - toaster - toaster"
9.

http://localhost:8181/openapi/api/v3/mounts/1/toaster(2009-11-20)
  • if you have toaster module with that revision you should see document only for that module

10. check summary of path (get /rests/data/network-topology:network-topology/topology=topology-netconf/node=device-17830/yang-ext:mount/toaster:toaster) -> "GET - toaster - toaster"

Similar problem with `tags`, where the value is "mounted device-17830 toaster" when requesting all modules (correct output), but is "controller toaster" when requesting only the specific module


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