Subject: [netmod] how to use 'mandatory' node

From: chong feng <[email-masked]>
Date: Thu, 18 Jul 2013 17:18:58 +0800

hello everyone:
I'm developing our own NETCONF agent. when i received a netconf request to
delete a instance of list, a mandatory node was defined in this list.
Should this mandatory node be included to this request?
I think this node should not be included in netconf request,but there is no
explicit description in RFC 6020.

---

From: Martin Bjorklund <[email-masked]>
Date: Tue, 23 Jul 2013 23:45:20 +0200 (CEST)

Hi,

> explicit description in RFC 6020.

In general, if you do:

  <foo nc:operation="delete"/>

the entire subtree under "foo" is deleted.  There is no need to
explicitly delete nodes underneath "foo".

/martin

---

From: chong feng <[email-masked]>
Date: Wed, 24 Jul 2013 22:37:03 +0800

Hi,
If I want to modify one leaf's value, should mandatory nodes be included in
request?
for example,
lista----
    |---key1
    |---key2
    |---mandatory-node
    |---leaf1
If I want to modify leaf1's value,the netconf request should be
   <lista operation= "merge">
       <key1>1</key1>
       <key2>2</key2>
       <mandatory-node>3</mandatory-node>
       <leaf1>4</leaf1>
  </lista>

or
  <lista operation= "merge">
       <key1>1</key1>
       <key2>2</key2>
       <leaf1>4</leaf1>
  </lista>
?

2013/7/24 Martin Bjorklund <[email-masked]>

---

From: Andy Bierman <[email-masked]>
Date: Wed, 24 Jul 2013 08:11:29 -0700

>   <lista operation= "merge">

The 2nd one.
For config=true data nodes, mandatory means the running config
must contain the data node to be valid.

Sec. 3.1 appears to indicate that config=false nodes can be mandatory,
but sec. 7.6.5 applies only to config=true data nodes.  This definition
applies to config=true data nodes and rpc input nodes.

A mandatory config=false data node, rpc output node or
notification node means that it must appear in the protocol message.
This implies that non-mandatory nodes in these messages are optional
to implement, but this is not correct.  YANG conformance is only affected
by the "if-feature" stmt.

Andy

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

---

From: chong feng <[email-masked]>
Date: Thu, 25 Jul 2013 14:16:31 +0800

Hi:
   If I want to create a instance of lista, should mandatory node be
included ?

   But, you know, operation "merge" can be used to create a instance if the
instance is not exists.
   When I received the netconf request with operation "merge", should I
check whether the instance
   is exist?

2013/7/24 Andy Bierman <[email-masked]>

---

From: Martin Bjorklund <[email-masked]>
Date: Thu, 25 Jul 2013 11:25:22 +0200 (CEST)

Hi,

>    If I want to create a instance of lista, should mandatory node be

mandatory means that the node MUST be there in a valid configuration.

If you create the list entry in the candidate, the mandatory nodes
does not have to be there.  But if you try to commit this candidate,
commit will fail b/c the mandatory node is missing.

See section 8 of RFC 6030.

/martin

> > > If I want to modify one leaf's value, should mandatory nodes be
> > > included
> > in
> > > request?
> > > for example,
> > > lista----
> > >     |---key1
> > >     |---key2
> > >     |---mandatory-node
> > >     |---leaf1