Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RPC response issues. #18

Closed
sdj38 opened this issue Apr 18, 2018 · 1 comment
Closed

RPC response issues. #18

sdj38 opened this issue Apr 18, 2018 · 1 comment

Comments

@sdj38
Copy link

sdj38 commented Apr 18, 2018

Hi Olof,

So I started making some tests for RPC calls that we have set-up. I have come across a few issues that maybe you can help with.

  1. If no output is specified in the yang file it should not return a body. https://tools.ietf.org/html/rfc8040#section-3.6
If the RPC operation is invoked without errors and if the "rpc" or
  "action" statement has no "output" section, the response message
  MUST NOT include a message-body and MUST send a "204 No Content"
  status-line instead.

Currently this is what I see. On an RPC with no output defined in the yang.

sjones:~/Documents/restconf-tests  curl -X POST -d '{"input" : {"length":4096,"name":"key1","algorithm":"RSA"}}' http://169.254.0.5/restconf/operations/netgate-pki:pki-private-key-generate
{
  "output": {
    "ok": null
  }
}
  1. It looks like it wraps errors in "output" as well. From https://tools.ietf.org/html/rfc8040#section-7 It seems like it should not have the "output" object just start with the "rpc-error" tag.
    Below is an example of what I currently see. I think the "output" should be taken out from the response body.
sjones:~/Documents/restconf-tests  curl -X POST -d '{}' http://169.254.0.5/restconf/operations/netgate-pki:pki-private-key-generate
{
  "output": {
    "rpc-error": {
      "error-tag": "missing-element",
      "error-type": "application",
      "error-severity": "error",
      "error-message": "No name provided",
      "error-info": {
        "bad-element": "name"
      }
    }
  }
}

Let me know if these may have been fixed or changed in the develop branch. I have not had a chance to test the new changes you have made in the develop branch as it requires some changes on our end. I haven't gotten around to setting up a test environment to run the new changes.

Let me know if you need more information. Thank you.

@olofhagsand
Copy link
Member

Should be fixed in develop. Thanks for pointing this ut, there were several related problems. Hope it works better now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants