Uploaded image for project: 'netconf'
  1. netconf
  2. NETCONF-822

Discover RPC operation through RESTCONF is failing with response 500

    XMLWordPrintable

Details

    • Bug
    • Status: Resolved
    • Highest
    • Resolution: Done
    • 2.0.5
    • 2.0.6
    • Restconf

    Description

      Steps to reproduce:

      • Start Karaf
      • Install RESTCONF and topology features: "feature:install odl-restconf-all odl-netconf-topology"
      • Send get request to retrieve server RPC operations: "curl --request GET 'http://localhost:8181/rests/operations' "

       
      The request will fail because in SchemaInferenceStack class is trying to find RPC with name "operations" instead of returning all found RPCs operations:

      Caused by: java.lang.IllegalArgumentException: Data tree child (urn:ietf:params:xml:ns:yang:ietf-restconf)operations not present
      	at org.opendaylight.yangtools.yang.model.util.SchemaInferenceStack.lambda$pushData$5(SchemaInferenceStack.java:799) ~[?:?]
      	at java.util.Optional.orElseThrow(Optional.java:408) ~[?:?]
      	at org.opendaylight.yangtools.yang.model.util.SchemaInferenceStack.pushData(SchemaInferenceStack.java:798) ~[?:?]
      	at org.opendaylight.yangtools.yang.model.util.SchemaInferenceStack.pushFirstData(SchemaInferenceStack.java:807) ~[?:?]
      	at org.opendaylight.yangtools.yang.model.util.SchemaInferenceStack.pushData(SchemaInferenceStack.java:787) ~[?:?]
      	at org.opendaylight.yangtools.yang.model.util.SchemaInferenceStack.enterDataTree(SchemaInferenceStack.java:473) ~[?:?]
      	at org.opendaylight.yangtools.yang.data.util.NormalizedNodeStreamWriterStack.enterDataTree(NormalizedNodeStreamWriterStack.java:187) ~[?:?]
      	at org.opendaylight.yangtools.yang.data.util.NormalizedNodeStreamWriterStack.startContainerNode(NormalizedNodeStreamWriterStack.java:259) ~[?:?]
      	at org.opendaylight.yangtools.yang.data.codec.gson.JSONNormalizedNodeStreamWriter.startContainerNode(JSONNormalizedNodeStreamWriter.java:305) ~[?:?]
      	at org.opendaylight.restconf.nb.rfc8040.jersey.providers.ParameterAwareNormalizedNodeWriter.wasProcessedAsCompositeNode(ParameterAwareNormalizedNodeWriter.java:265) ~[?:?]
      	at org.opendaylight.restconf.nb.rfc8040.jersey.providers.ParameterAwareNormalizedNodeWriter.write(ParameterAwareNormalizedNodeWriter.java:117) ~[?:?]
      	at org.opendaylight.restconf.nb.rfc8040.jersey.providers.ParameterAwareNormalizedNodeWriter$OrderedParameterAwareNormalizedNodeWriter.write(ParameterAwareNormalizedNodeWriter.java:323) ~[?:?]
      	at org.opendaylight.restconf.nb.rfc8040.jersey.providers.JsonNormalizedNodeBodyWriter.writeNormalizedNode(JsonNormalizedNodeBodyWriter.java:134) ~[?:?]
      	at org.opendaylight.restconf.nb.rfc8040.jersey.providers.JsonNormalizedNodeBodyWriter.writeTo(JsonNormalizedNodeBodyWriter.java:72) ~[?:?]
      	at org.opendaylight.restconf.nb.rfc8040.jersey.providers.JsonNormalizedNodeBodyWriter.writeTo(JsonNormalizedNodeBodyWriter.java:47) ~[?:?]

      More in attached Karaf logs and debug capture.

      Attachments

        1. Capture.PNG
          Capture.PNG
          484 kB
        2. karaf.txt
          438 kB

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              rovarga Robert Varga
              PeterSuna Peter Suna
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: