sdnopendaylight

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.


Solution

  • 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