Zsombor
Zsombor

Reputation: 13

Opendaylight Restconf always answers 401

I did install opendaylight 0.19.2 with odl-restconf-nb to access via restconf on the northbound interface. I try to send Get/Post request but it doesn't matter what type would I like to send I always get 401 as the answer.

I tried with curl and postman too, but same.

curl -u admin:admin http://$VM-IP:8181/restconf/operational/network-topology

I should get not an 401 answer for this call, even if I didn't added the Content-Type=application/xml Accept=application/xml flags. But if I add nothing changes.

I'm desparate now, tried different versions of the controller but I get same.

Upvotes: 1

Views: 153

Answers (2)

MMM
MMM

Reputation: 36

Have you tried following the OpenDaylight NETCONF user guide?

It seems like you're attempting to use the /restconf/ endpoint (draft-bierman-netconf-restconf-02) instead of /rests/ URI (RFC8040).

The draft-bierman-netconf-restconf-02 implementation is no longer available in recent OpenDaylight releases.

For more details, you can refer to the following links:

draft-bierman vs. RFC8040 ONAP RESTCONF Migration

Upvotes: 0

D Arjona
D Arjona

Reputation: 56

In my experience, the 401 message is generated when ODL finds an instruction that cannot process. For the example above, you may want to try:

curl -u admin:admin -X GET http://$VM_IP:8181/rests/data/network-topology:network-topology

Upvotes: 0

Related Questions