Subject: [netmod] refine/augment in RPCs

From: Ladislav Lhotka <[email-masked]>
Date: Thu, 18 Feb 2010 16:06:34 +0100

Hi,

is it possible to augment or refine stuff inside an rpc node? If so, how
does one specify whether the target node is in the input or output part?

Lada

-- 
Ladislav Lhotka, CESNET
PGP Key ID: E74E8C0C

---

From: Martin Bjorklund <[email-masked]>
Date: Thu, 18 Feb 2010 20:46:52 +0100 (CET)

Hi,

> does one specify whether the target node is in the input or output part?

Yes you can augment inside a rpc. 7.13 says:

   The "rpc" statement defines an rpc node in the schema tree.  Under
   the rpc node, an input node with the name "input", and an output node
   with the name "output" are also defined.

So for example to add an optional parameter 'persist' to the 'commit'
rpc you would do:

  import ietf-netconf {
    prefix nc;
  }

  augment /nc:commit/nc:input {
    leaf persist {
      ...
    }
  }

/martin

---

From: Andy Bierman <[email-masked]>
Date: Thu, 18 Feb 2010 12:10:46 -0800

>   augment /nc:commit/nc:input {

Gee, not to complain that this draft isn't getting read enough...

>From with-defaults-04:

    // extending the get-config operation
    augment /nc:get-config/nc:input {
        leaf with-defaults {
            type with-defaults-mode-type;
        }
    }

    // extending the get operation
    augment /nc:get/nc:input {
        leaf with-defaults {
            type with-defaults-mode-type;
        }
    }

    // extending the copy-congig operation
    augment /nc:copy-config/nc:input {
        leaf with-defaults {
            type with-defaults-mode-type;
        }
    }

(I can't help noticing how much more elegant and simple
YANG extensibility is compared to all the other DMLs
that even attempt it. ;-)

> /martin

Andy

---

From: Ladislav Lhotka <[email-masked]>
Date: Thu, 18 Feb 2010 22:13:30 +0100

>    with the name "output" are also defined.

OK, thanks. How about changing both "input node" and "output node" to
"schema node"?

Lada

-- 
Ladislav Lhotka, CESNET
PGP Key ID: E74E8C0C