CiscoTestAutomation / ncdiff

NETCONF Diff Engine
Apache License 2.0
24 stars 5 forks source link

Remove whitespace from containers #5

Closed wouterdb closed 4 years ago

wouterdb commented 4 years ago

fixes #4

A check is added that any Element with a 'Container' type in yang, that contains only whitespace, is considered to be empty.

Perhaps the emptiness check is not needed, my knowledge of the standard is not that good, so I erred at the safe side.

I also have some testcases, but they are against Nokia devices and require the Yang models found at https://github.com/nokia/7x50_YangModels/tree/master/latest_sros_19.10. So I did not add them to the PR.

wouterdb commented 4 years ago

Perhaps is would be beter to remove the emptiness check, as containers can not have a value (https://tools.ietf.org/html/rfc7950#section-7.5)

Do you agree?

yuekyang commented 4 years ago

Hmm, I would consider it as a minor bug if a container has whitespace value but has no child. On the other hand, it might be good to be more tolerant by removing whitespace.