[NETCONF-860] Some BBF yang devices using actions have invalid swagger URLs generated. Created: 09/Feb/22 Updated: 27/Jun/23 Resolved: 27/Jun/23 |
|
| Status: | Resolved |
| Project: | netconf |
| Component/s: | restconf-openapi |
| Affects Version/s: | None |
| Fix Version/s: | 6.0.0, 5.0.7, 4.0.9 |
| Type: | Bug | Priority: | Medium |
| Reporter: | Robert Magaldi | Assignee: | Yaroslav Lastivka |
| Resolution: | Done | Votes: | 0 |
| Labels: | pt | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Description |
|
This problem was discovered in Lighty.io version14.0 and version15.1 - which can be seen on ODL versions Silicon and Phosphorus SR1. It seems that some BBF (Broadband Forum) yang files that include "actions" construct invalid "POST" urls in the swagger. This is an extension to 928c928,930 968c970,972 Inside the yang file, there is an action called "download" which exists in a container called "download": presence "Downloading of revisions for this software is The bbf-software-manager yang augments ietf-hardware. Under ietf-hardware we can see that the URL for the "download" above is messed up. The picture of this is attached. The beginning of the generated URL should be /restconf/operations/... Also included in this set of yang files is the bbf-hardware yang file which includes a "reset" action. The yang may be easier to look at for this one. It also is an "action" to do a reset, and it also contains a URL that is messed up. rests/operationsata/network-topology:network-topology/topology=topology-netconf/node=myDevice/yang-ext:mount/ietf-hardware:hardware/component={name} /bbf-hardware:reset To recreate this, use netconf testtool to create a device simulator using all the yang models attached to this JIRA. The device will get mounted. Go into swagger and you will notice that the two mentioned generated URLs which are POST requests for underlying "actions" have bad URLs. Also, there is no parameters - each URL has some parameters, but the parameters section in the swagger does not show any.
|
| Comments |
| Comment by Ivan Hrasko [ 03/May/23 ] |
|
The following is not an issue: "The beginning of the generated URL should be /restconf/operations/..." because currently ODL supports RFC8040 only (/rests/). Even if you are using the previous releases we can see from URLs (key values are inserted by =) that you are using RFC8040 implementation. |
| Comment by Ivan Hrasko [ 03/May/23 ] |
|
It looks that action examples are missing "parameters" section. |
| Comment by Ivan Hrasko [ 03/May/23 ] |
|
In the previous releases there was also problem with choices |
| Comment by Ivan Hrasko [ 21/Jun/23 ] |
|
One one small problem is that paths should start with "/". |