-
Bug
-
Resolution: Done
-
Medium
-
None
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 NETCONF-859. The same yang files are included in this JIRA, HOWEVER, the bbf-software-management yang has been modified to work with swagger (workaround for NETCONF-859). The version of the yang included here is the same, but the file content differs slightly to address NETCONF-859. The delta in the bbf-software-management yang file is shown below - the leafref path was changed to the actual definition.
928c928,930
< type uint8;
—
> type leafref
968c970,972
< type bbf-yang:string-ascii64;
—
> type leafref
Inside the yang file, there is an action called "download" which exists in a container called "download":
container download {
when "boolean(../../capability='bbf-swm:download') and count(../revision[state='downloading'])=0"
presence "Downloading of revisions for this software is
enabled.";
config false;
description
"Provides containment for the action 'download'.";
action download {
if-feature "software-actions";
description
"Download the specified software revision to this
component.
....
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 URL shown/generated is
rests/operationsata/network-topology:network-topology/topology=topology-netconf/node-myDevice/yang-ext:mount/ietf-hardware/component=
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.
- relates to
-
NETCONF-1021 OpenAPI: Do not hardcode action path
- Resolved