YANG Guidelines

How to link .1Q amendments into .1Q:

Augment when you can, reference when you must.

I think the conditions for “use a reference when you must” are, either:

a) When there is a many to one mapping.

For example when an augmentation can be applied to multiple interfaces (interface instances that is, differences in type before augmentation not relevant) but some common configuration element/table/object is to be used by all those interfaces.

b) When there is a dynamic mapping.

For example when an interface augmentation needs to have data that is necessarily present elsewhere (i.e. not in the augmentation itself or in the interface being augmented) but the details of the “elsewhere” can change even if condition (a) does not apply. There may be (in this
example) two cases:

b1) The elsewhere can change because rearranging the “elsewhere” can make management easier (I have a case in the link aggregation I am thinking about). This is run time dynamic.

b2) The elsewhere can change because different types of system can have a different type of “elsewhere”. This implies that the different “elsewheres” support the same “methods” (in an object oriented sense) and may be a stretch for YANG. This is link time (boot?) dynamic.