module simple-nodes { yang-version 1; namespace "urn:opendaylight:"+ "simple-nodes"; prefix "sn"; organization "opendaylight"; description "test file containing yang data nodes"; revision "2013-07-30" { description "Initial revision."; reference "will be defined"; } typedef mytype { type string; } // NOTE: simple comment anyxml data { config false; description "anyxml desc"; if-feature has-name; mandatory true; must "ifType != 'ethernet' or " + "(ifType = 'ethernet' and ifMTU = 1500)" { error-message "An ethernet MTU must be 1500"; } must "ifType != 'atm' or " + "(ifType = 'atm' and ifMTU <= 17966 and ifMTU >= 64)" { error-app-tag "anyxml data error-app-tag"; error-message "An atm MTU must be 64 .. 17966"; description "an error occured in data"; reference "data must ref"; } reference "data ref"; status obsolete; when "class != 'wheel'"; } container nodes { anyxml text; choice level; config false; container node; description "nodes collection"; grouping node-group { leaf source { type int8; } leaf target { type int16; } } if-feature has-name; leaf nodes-id { type int32; } leaf-list added { type mytype; } list links { } must "ifType != 'atm' or " + "(ifType = 'atm' and ifMTU <= 17966 and ifMTU >= 64)" { error-app-tag "anyxml data error-app-tag"; error-message "An atm MTU must be 64 .. 17966"; description "an error occured in data"; reference "data must ref"; } must "ifId != 0"; presence "required"; reference "nodes ref"; status current; typedef nodes-type { type string; } uses node-group; when "class != 'wheel'"; } list links { anyxml text; choice level; config false; container link; description "links collection"; grouping link-group { leaf source { type int8; } leaf target { type int16; } } if-feature has-name; key links-id; leaf links-id { type int32; } leaf-list added { type int64; } list nodes { } max-elements 100; min-elements 1; must "ifType != 'atm' or " + "(ifType = 'atm' and ifMTU <= 17966 and ifMTU >= 64)" { error-app-tag "anyxml data error-app-tag"; error-message "An atm MTU must be 64 .. 17966"; description "an error occured in data"; reference "data must ref"; } must "ifId != 0"; ordered-by user; reference "links ref"; status current; typedef nodes-type { type string; } uses link-group; when "class != 'wheel'"; } }