[mdsal-dev] Is it possible to add a default variable in yang binding objects generated

Robert Varga

On 30/08/17 21:49, Vikram Darsi wrote:
Hi Team
Hello Vikram,

Is there a way to add a variable called “message-id” in all the
DataObjects by default that are generated from the yang definitions?

without defining it in the yang constructs container/list etc...
There is a way, but generating such a field really does not buy you
anything, as it still needs to propagate through the system, and that
requires it having a modeling underpinning.

* *


We have two clients, say C1, C2 writing a DataObject D1 to
Configurational Data Store to which a DTCL X is registered, if there are
any failures while processing onDataTreeChange event, DTCL wants to
notify it to its actual client, C1 or C2 not both.
This goes against the architectural requirement of loose coupling
between producers and consumers. Consumers should not care where the
data is coming from, they just need to act on the data -- otherwise the
system will have variances based on undocumented decisions (i.e. 'if
this data was written by foo, do X, if by bar, do Y'), which makes it
non-modular, as when baz is introduced, the consumer needs to be
revisited and taught to 'if by baz, do Z'.

Furthermore you need to deal with state compression and persistence --
essentially answering questions about semantics of that metadata, how it
state-compresses and what the lifecycle is:
- does this mean each subtree has a persistent 'originator' tag?
- how do tags work in face of subtree edits?
- etc. etc.

So, we wanted to follow the NETCONF RPC “message-id” concept to identify
the right client.
Yeah, but as you noted this is a transient RPC concept, where there is a
known 1:1 relationship between the requesting entity and the entity
processing the request. There is no such relationship in the data store.