Jürgen Schönwälder <[email protected]> wrote:
> On Wed, Nov 24, 2021 at 03:21:14AM +0000, maqiufang (A) wrote:
> >
> > But suppose the node is a list entry (e.g., an interface) or a leaf with
> > the same value. In this case, it is not clear which origin should be used.
> > I think it would be ok to use "system" in this case.
>
> For me, <running> is explicit config and hence it has precedence. The
> precedence must be a function of how the datastores related, it should
> not depend on which values a config leaf has.
Here's a simple example.
Suppose <system> has:
<interface>
<name>lo</name>
<type>loopback</type>
<description>added by system</description>
</interface>
and <intended> has:
<interface>
<name>lo</name>
<description>set by a client</description>
</interface>
Now we follow the picture in RFC 8342:
+------------+
| <intended> | // subject to validation
| (ct, ro) |
+------------+
| // changes applied, subject to
| // local factors, e.g., missing
| // resources, delays
|
dynamic | +-------- learned configuration
configuration | +-------- system configuration
datastores -----+ | +-------- default configuration
| | |
v v v
+---------------+
| <operational> | <-- system state
| (ct + cf, ro) |
+---------------+
So now we merge intended and system into operational state. First we
add system to get:
<interface origin="system">
<name>lo</name>
<type>loopback</type>
<description>added by system</description>
</interface>
and then we add intended to arrive at:
<interface origin="system">
<name>lo</name>
<type>loopback</type>
<description origin="intended">set by a client</description>
</interface>
Doesn't this make sense?
/martin
_______________________________________________
netmod mailing list
[email protected]
https://www.ietf.org/mailman/listinfo/netmod