[NETCONF-200] API Explorer does not work if started as http://admin:admin@localhost:8181/apidoc/explorer/index.html Created: 17/May/16  Updated: 15/Mar/19  Resolved: 06/Dec/17

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

Type: Bug
Reporter: Luis Gomez Assignee: Allan Clarke
Resolution: Won't Do Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Operating System: All
Platform: All


Attachments: PNG File apiexplorer_normal.png     PNG File apiexporer_credentials.png    
External issue ID: 5902

 Description   

API Explorer is protected with basic authentication admin:admin, in order to open the application without entering credentials, browsers support following format: http://admin:admin@localhost:8181/apidoc/explorer/index.html

However when this format is used, the browser opens a modified UI that does not work most of the times (e.g. timeout retrieving mounted devices models).

BR/Luis



 Comments   
Comment by Allan Clarke [ 05/Sep/17 ]

Daniel, I was interested in fixing this defect. I suspect that nothing
has been done on this yet, so let me know. Otherwise I'll take it via
Gerrit.

Comment by Allan Clarke [ 07/Sep/17 ]

Daniel, I was interested in fixing this defect. I suspect that nothing
has been done on this yet, so let me know. Otherwise I'll take it via
Gerrit.

Comment by Daniel Malachovsky [ 07/Sep/17 ]

Hi,
nothing new with this bug. I'm sorry.

Dano

Comment by Allan Clarke [ 11/Oct/17 ]

This bug is blocked by a 500 error that Luis Gomez ran into.
I'll update this when the blocking bug is posted.

Comment by Luis Gomez [ 13/Oct/17 ]

The 500 error was caused by the netconf device I was using.

Instead I just used the netconf test tool for carbon:

1) download tool:
wget https://nexus.opendaylight.org/content/repositories//autorelease-1998/org/opendaylight/netconf/netconf-testtool/1.2.2-Carbon/netconf-testtool-1.2.2-Carbon-executable.jar

2) run the tool with schemas stored in int/test repo:
/usr/lib/jvm/java-8-openjdk-amd64/bin/java -Xmx1G -XX:MaxPermSize=256M -Dorg.apache.sshd.registerBouncyCastle=false -jar netconf-testtool-1.2.2-Carbon-executable.jar --device-count 1 --debug true --schemas-dir ../test/csit/variables/netconf/CRUD/schemas --md-sal true

3) Mount device in controller:
POST http://127.0.0.1:8181/restconf/operations/netconf-node-topology:add-netconf-node
<input xmlns="urn:opendaylight:netconf-node-topology">
<node-id>netconf-test-device</node-id>
<encrypt>true</encrypt>
<host>127.0.0.1</host>
<port>17830</port>
<username>admin</username>
<password>topsecret</password>
<tcp-only>false</tcp-only>
<keepalive-delay>0</keepalive-delay>
</input>

4) Start apiexplorer in chrome and enter credentials (see attached apiexplorer_normal)
http://192.168.0.1:8181/apidoc/explorer/index.html

5) Start apiexplorer in chrome with credentials (see attached apiexplorer_credentials)
http://admin:admin@192.168.0.1:8181/apidoc/explorer/index.html

The portal is not the exactly the same, and in the second case I was not able to see the test-tool yang models.

Comment by Luis Gomez [ 13/Oct/17 ]

Attachment apiexplorer_normal.png has been added with description: Apiexplorer with normal browser auth

Comment by Luis Gomez [ 13/Oct/17 ]

Attachment apiexporer_credentials.png has been added with description: Apiexplorer with credential in URL

Comment by Allan Clarke [ 16/Oct/17 ]

I have tracked this into the swagger-ui code. All of the tabs
are rendering inside of the first tab. The error is likely in
the Coffee Script or in the call to the HandleBars templates.
Stay tuned.

Comment by Allan Clarke [ 23/Oct/17 ]

This was ODL bug 5902 in Bugzilla (noted here for devs searching by its old number)
https://bugs.opendaylight.org/show_bug.cgi?id=5902

Comment by Allan Clarke [ 23/Oct/17 ]

Netconf is using...

... version 1.2 of OpenAPI which has 3.0 as the latest version
https://github.com/OAI/OpenAPI-Specification/tree/master/versions

... version 1.2 of Swagger which has 3.4 as the latest version
https://github.com/swagger-api/swagger-ui

So ODL is due for an update and this might fix the bug

Comment by Allan Clarke [ 06/Dec/17 ]

We believe that this is a defect in Swagger-UI 1.2 and would be fixed by a port.

Filed a new story to cover porting to Swagger-UI 3.4

https://jira.opendaylight.org/browse/NETCONF-490

Comment by Allan Clarke [ 06/Dec/17 ]

Port to new version of Swagger-UI should fix this issue among other things.

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