On 08/31/2016 01:10 PM, Balazs Lengyel wrote:
Hello,

The problem is not just about identities. It can be a value range.
If your example was about value range then a deviation would be a solution. Then we have the same case for modularization. YANG files defining deviations loaded when the deviation is relevant and not loaded otherwise.
Sometimes we have a generic module like iana-interface type that list a lot of identities, and I don't want to have one YAM file per identity, to allow a fine control. Also sadly it is not possible to have a deviation removing identities. IMHO would be needed.
Well the biggest problem modularizing your identity definitions is you will have more YANG files proportional to the flexibility you want. I would have chosen that in the example you provide.

I would be more interested in having an extension saying static-data. This would state that that part of config is set by the system, and can not be modified by the user. So I could have conditions based on it, but the user might not modify it.
That is still not as good as modularization of your model and using optionally loadable YANG 'deviation's and 'identity' definitions. Even if you have "static-data tree" you will be able to use must statements to not allow certain range based on that "static data tree" it will still be the range defined in the type from the model that will be shown to the user editing the configuration in YANG aware CLI or GUI. It is still a workaround even if the must statement will fail upon commit.

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

Reply via email to