[Responding in thread order]

On Thu, Sep 25, 2014 at 04:39:01PM +0200, Martin Bjorklund wrote:
> I think there might be a terminology confusion here, so let's do a
> simple example.
> 
>   list foo {
>     key id;
>     leaf id { type int32; }
>     leaf a { type int32; }
>   }
> 
> local config:
> 
>    foo 42
> 
> In ephemeral config we now do SET /foo[id=42]/a  to 4711.  Thus, in
> ephemeral we now have a single node (a) with value 4711.

Correct.  

> What happens if we in local config delete foo 42?

The original set for the ephemeral datastore was for id=42, I'd expect the
GET to still return foo id=42 a=4711

> If /foo[id=42]/a is NOT deleted from the ephemeral config, what is now
> presented to the internal apps?

foo id=42 a=4711

A slightly different example:

local config: foo id=42 a=1

GET returns foo id=42 a=1

SET /foo[id=42]/a to 4711 in the ephemeral datastore.

GET returns foo id=42 a=4711

Two potential actions:
a) Delete /foo[id=42] in the ephemeral datastore.
   GET returns id=42 a=1 (the underlying local config remains)
b) Delete /foo[id=42] in the local config
   GET returns id=42 a=4711 (the overlay ephemeral config)

-----

In general, I'm not expecting the above type of behavior to be a common i2rs
operation where local config and ephemeral config overlap.  When they do,
the above example shows ephemeral having priority over local config - but as
we discussed, that semantic may not always be the desired one.

What I find more likely is either:

foo id=42 a=1 # Datastore local config
foo id=43 a=4711 # Datastore ephemeral 

No overlap.

Or alternatively:
   list foo {
     key id;
     leaf id { type int32; }
     leaf a { type int32; }
     leaf i2rs:b { type int32; }
   }

Where b is introduced either via augmentation from a separate module or
alternatively something like b is explicitly listed in the module defining
foo.  In either case, b is noted to be an item that intended for the
ephemeral data store.  This leads to the question:

SET foo id=42 a=1 # Datastore local config
SET foo id=42 b=4711 # epehemeral data store

GET foo returns id=42 a=1 b=4711

And then:
a) Delete foo id=42 in the local config
   GET returns foo id=42 b=4711 
b) Delete foo id=42 in the ephemeral datastore
   GET returns foo id=42 a=1 

-- Jeff

_______________________________________________
i2rs mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/i2rs

Reply via email to