How do we define a leaf element data-type to be either of type-a or type-b
ipaddr x netmask y
Where x can be of 2 different types.
–> ipaddr 1.1.1.1 netmask 255.255.255.0 : netmask explicitly given : ipaddr leaf element is inet:ipv4-address
-> ipaddr 1.1.1.1/24 : netmask derived using mask provided : ipaddr leaf element is inet:ipv4-prefix
And is it possible to suppress “netmask” if ipaddr takes type-a and be allowed if it is type-b