On Tue, Aug 03, 2021 at 01:45:40AM +0000, Fengchong (frank) wrote:
> Hi andy and all.
> 
> I don’t think get-data with origin can solve the issues below:
> 
> 
> 1.       Some leafs like interface type CAN NOT be modified by user, but can 
> be referenced by other config nodes(e.g. using leafref or occur in 
> when/must). The validation will be fail if these leafs are not be configured 
> by user now explicitly (we assume these leafs are optional and no default 
> value).

The interface type in the RFC 8343 module is config true. YANG does
not allow you to refer to config false nodes in constraints that apply
to config true nodes. A core principle is that the content of a
configuration datastore can be validated without knowing the actual
state of the system.
 
> 2.       Some instances are generated by system, but these instances can be 
> referenced by other config nodes. The validation must be fail if these 
> instances are not be recreated by user explicitly now.

Yes, a configuration datastore is self-contained. If a client wants to
configure the interface x, it has to define the interface x in the
configuration. Note that this should not be confused with a system
generating an interface x after probing the hardware. Note the
difference between operational state, applied config, and running
config.

Let me add that the underlying model is that the client(s) have
control over the configuration. A system making ad-hoc changes to the
config (even with the best intentions) will be surprising. In this
model, the only way to inject config into running on system boot is to
have a client making changes to running following the normal
procedures - at least conceptually. This means that conceptually the
other clients need to be aware that there is a system client injecting
configuration.

If you follow this logic, it seems wrong to define a system datastore
that is somehow magically merged into running - and it is not needed.

> 3.       User may need know what the original system configuration is, if we 
> get data from <operational>, you may get the modified system 
> configuration.(for example, user modify or template is expanded, or only 
> active instances)

If you have multiple clients managing shared configuration, then yes
it is good if they are aware of what is going on. I am not sure yet
that exposing other clients intentions via additional datastores and
defining merge mechanisms and semantics is the way to go.

> I don’t care about whether system datastore is imported to running or 
> intended datastores. But I think if a config node reference a system node, 
> the validation (running or intended datastores) will be successful even if 
> the system node is not configured by user explicitly.

I am concerned about having to define what "is imported" means
precisely and whether moving to a model multiple datastores have to be
merged before validation is the way to go. We already acknowledged
that there are template expansions in some implementations without
working out how they work.

> Especially on the client side,  if a client need validate all data retrieved 
> from server, the validation SHOULD be successful. If system configuration are 
> not imported to running, at a minimum, the client needs to know what the 
> original system configuration is. Another way is adding with-system-used 
> parameter to get-config operation to retrieved all user configuration and 
> system configuration referenced by user configuration.

Let me repeat, in the original model, the running configuration
datastore is self-contained and can be validated without knowing
additional datastores.

/js

-- 
Juergen Schoenwaelder           Jacobs University Bremen gGmbH
Phone: +49 421 200 3587         Campus Ring 1 | 28759 Bremen | Germany
Fax:   +49 421 200 3103         <https://www.jacobs-university.de/>

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

Reply via email to