Subject: [netmod] XPath prefix on rpc/input and output

From: Andy Bierman <[email-masked]>
Date: Tue, 05 Aug 2008 09:25:09 -0700

Hi,

What was the decision on the XML namespace for the input
and output keywords within a definition context XPath
expression? Is it the current module namespace?
Otherwise a new YANG namespace would be needed for this purpose.

I am currently generating an error if there is any
prefix on 'input' or 'output', which is wrong.

Current:

    /nc:edit-config/input/nc:test-option

    /ncx:load-module/input/ncx:modpath

New:

    /nc:edit-config/nc:input/nc:test-option

    /ncx:load-module/ncx:input/ncx:modpath

So 'input' is considered to be in the current module namespace,
as if 'input' and 'output' are just more container objects.

(Note that in an <error-path> element, the input
node is not present.)

Andy

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

---

From: Martin Bjorklund <[email-masked]>
Date: Tue, 05 Aug 2008 22:31:31 +0200 (CEST)

Hi,

> expression? Is it the current module namespace?

IMO using the current module namespace is easiest.  I don't see any
compelling reason for inventing a new namespace for these nodes.  So
if noone objects, I will clarify this in the spec.

/martin

---

From: Andy Bierman <[email-masked]>
Date: Tue, 05 Aug 2008 13:45:24 -0700

> if noone objects, I will clarify this in the spec.

Also clarify if it is legal to add an input or putput
via augment to an rpc without one.

There is also only zero or on of these nodes.
If you define /foo:my-rpc/foo:input/foo:my-param,
or even just /foo:my-rpc, then another module
cannot add another input node:

module bar {
  ...
  augment "/foo:my-rpc" {
    input {
      leaf aug-param { type string; }
    }
  }

See why this is broken?

We should only allow this form to augment
input and output:

module bar {
  ...
  augment "/foo:my-rpc/foo:input" {
    leaf aug-param { type string; }
  }

So is an error generated if foo:input is not actually defined,
but it is used in an augment target?

It should be treated as an implied NP container, so it is added
if the rpc-stmt is ever augmented.

Andy

---

From: Martin Bjorklund <[email-masked]>
Date: Tue, 05 Aug 2008 22:51:22 +0200 (CEST)

> via augment to an rpc without one.

[...]

> if the rpc-stmt is ever augmented.

I started to do this on my way back from Dublin.  Will be in the next
version of the draft,

/martin