Re: [netmod] YANG 1.1 inline notifications

2018-09-10 Thread Martin Bjorklund
"Bogaert, Bart (Nokia - BE/Antwerp)"  wrote:
> Hi,
> 
> I'm trying to seek some clarification.
> 
> According to RFC7950 section 7.16.2:
> When a notification node is defined as a child to a data node, the
>  element defined in [RFC5277] contains a hierarchy of
> nodes that identifies the node in the datastore.
> 
> According to RFC6241 section 1.1:
> datastore: A conceptual place to store and access information. A
> datastore might be implemented, for example, using files, a
> database, flash memory locations, or combinations thereof
> 
> When combining these two, the "hierarchy of nodes that identifies the
> node in the datastore" actually refers to resources that do exist (at
> least that is how I understand this).
> 
> Now consider the following model.
> 
> container state-data {
>   config false;
>   list elements {
> key name;
> leaf name {
>   type string;
> }
> leaf status {
>   type enumeration {
> enum up;
> enum down;
>   }
> }
> notification inline-notification {
>   description
> "An in-line notification";
> 
> leaf result {
>   type string;
>   mandatory true;
> }
> }
>   }
> }
> 
> Can a device send the notification 'inline-notification' if the list
> /state-data/elements is empty?
> My feeling is that this should not be possible as there is no
> "hierarchy of nodes that identifies the node in the datastore", so
> against what would that notification be sent in such case?

Exactly.  The idea is that the notification is tied to some instance
in the data tree.  If no instances exist, there is nothing to tie the
notification to.  But this being operational state data there is
no guarantee that the instance still exists when the notification
arrives at the client.


/martin



> 
> Best regards, Bart

___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod


[netmod] YANG 1.1 inline notifications

2018-09-05 Thread Bogaert, Bart (Nokia - BE/Antwerp)
Hi,

I'm trying to seek some clarification.

According to RFC7950 section 7.16.2:
When a notification node is defined as a child to a data node, the
 element defined in [RFC5277] contains a hierarchy of
nodes that identifies the node in the datastore.

According to RFC6241 section 1.1:
datastore: A conceptual place to store and access information. A
datastore might be implemented, for example, using files, a
database, flash memory locations, or combinations thereof

When combining these two, the "hierarchy of nodes that identifies the node in 
the datastore" actually refers to resources that do exist (at least that is how 
I understand this).

Now consider the following model.

container state-data {
  config false;
  list elements {
key name;
leaf name {
  type string;
}
leaf status {
  type enumeration {
enum up;
enum down;
  }
}
notification inline-notification {
  description
"An in-line notification";

leaf result {
  type string;
  mandatory true;
}
}
  }
}

Can a device send the notification 'inline-notification' if the list 
/state-data/elements is empty?
My feeling is that this should not be possible as there is no "hierarchy of 
nodes that identifies the node in the datastore", so against what would that 
notification be sent in such case?

Best regards, Bart
___
netmod mailing list
netmod@ietf.org
https://www.ietf.org/mailman/listinfo/netmod