In practice when a YANG file in my project augments a YANG file from the common project, the augmented attributes cannot be found in a live ONOS environment.
For instance in my project (see patch https://gerrit.onosproject.org/#/c/15751/) I have added a dependency on common and removed ietf-system from my YANGs folder. My file ietf-system-microsemi.yang augments the ietf-system.yang in 3 places.
What it looks like, is that when my driver starts there is a YangModelRegistrator loaded for the common YANGs and then another as MicrosemiModelRegistrator. When the second registrator loads the files, those already loaded from the first one do not seem to get fully updated with the augmented attributes.
I see in the log:
2017-10-26 12:04:11,684 | INFO | p-app-activation | DefaultYangModelRegistry | 167 - org.onosproject.onos-yang-runtime - 2.3.0.b2 | successfully registered this application org.onosproject.yang.gen.v1.ietfsystemmicrosemi.rev20160505.IetfSystemMicrosemi
2017-10-26 12:04:11,689 | INFO | p-app-activation | DefaultYangModelRegistry | 167 - org.onosproject.onos-yang-runtime - 2.3.0.b2 | class already registered with model registry org.onosproject.yang.gen.v1.ietfsystem.rev20140806.IetfSystem
What I'm seeing in practice is that if I try to decode XML with one of the augmented attributes e.g /sys:system-state/sys:platform/sysms:device-identification/sysms:serial-number it's just not in the registry, and the decode fails.
Is there something can be done to change the behaviour of the YangModelRegistry to allow classes to be loaded a second time?