> -----Original Message-----
> From: netmod [mailto:[email protected]] On Behalf Of Robert
> Varga
> Sent: Tuesday, October 4, 2016 1:55 PM
> To: [email protected]
> Subject: [netmod] Augment non-existing input?
> 
> Hello,
> 
> I would like to ask about interoperability of RPC's input statement and
> augments. Given two modules:
> 
> module foo {
>     rpc foo {
>         output {
>             leaf foo { type string; }
>         }
>     }
> }
> 
> module bar {
>     import foo { prefix foo; }
> 
>     augment /foo:foo/input {
>         leaf bar { type string; }
>     }
> }
> 
> Should the augment statement trigger a failure or not?
> 
> My take is that it should fail, as the lack of an empty input statement
> in foo indicates the author's intent that the RPC should not have an
> extensible input...

It would would be an error because there is no "input" list/container from 
bar's namespace present in the target module. What you probably meant is:

augment /foo:foo/foo:input {}

which is perfectly fine. The "input" schema node is inherently present within 
an "rpc" schema node even if not explicitly defined. Both in YANG 1 and 1.1. 

   The "rpc" statement defines an rpc node in the schema tree.  Under
   the rpc node, a schema node with the name "input", and a schema node
   with the name "output" are also defined.  The nodes "input" and
   "output" are defined in the module's namespace.

Jernej

> 
> Thanks,
> Robert


_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod

Reply via email to