Subject: [Netconf] Two questions on Restconf

From: lianji <[email-masked]>
Date: Tue, 17 Oct 2017 09:29:29 +0000

Hi, Andy,

I have two questions on Restconf. Could you please take a look and give some comment? Thanks!

1 Should ietf-restconf module be implemented?
Rfc8040 says it's not meant to be implemented as datastore contents. Could a netconf user query ietf-restconf/operations via netconf? We can't support it without implementing the module. What's your suggestion on if it should be implemented by a system?

2 What's the scenario of get /restconf/operations ?
Rfc8040 says "Each resource is represented as an empty leaf with the name of the RPC operation from the YANG 'rpc' statement ". As I understand that means a response to this request "get /restconf/operations" list all RPC actions defined in all modules without parameters. Below is an example. If the user want to call an operation, he/she has to get the module schema to understand what parameters should be provided. It looks the operations "get /restconf/operations" doesn't help a lot. Or we should return all parameters together with the action name?

e.g.
{ 'ietf-system:system-restart' : [null] }

Thanks,

Anji
Huawei Tech.

---

From: Andy Bierman <[email-masked]>
Date: Tue, 17 Oct 2017 17:21:32 -0700

On Tue, Oct 17, 2017 at 2:29 AM, lianji <[email-masked]> wrote:

> Rfc8040 says it’s not meant to be implemented as datastore contents. Could
> a netconf user query ietf-restconf/operations via netconf? We can’t support
> it without implementing the module. What’s your suggestion on if it should
> be implemented by a system?
>

NETCONF figures out the operations from modules and capabilities.
It is not exposed to clients via the NETCONF protocol.

>
>
> 2 What’s the scenario of get /restconf/operations ?
>
> Rfc8040 says “Each resource is represented as an empty leaf with the name
> of the RPC operation from the YANG 'rpc' statement “. As I understand that
> means a response to this request “get /restconf/operations” list all RPC
> actions defined in all modules without parameters. Below is an example. If
> the user want to call an operation, he/she has to get the module schema to
> understand what parameters should be provided. It looks the operations “get
> /restconf/operations” doesn’t help a lot. Or we should return all
> parameters together with the action name?
>
>
>
> e.g.
>

this is correct -- no parameters.
The YANG module is used for that.

> Huawei Tech.

Andy