module types2 { namespace "types2"; prefix "t2"; leaf lf-decimal { type decimal64 { fraction-digits 2; range "1 .. 3.14 | 10 | 15..16 | 20..max"; } } leaf lf-my-string { type string { length "1..255 | 320..max"; pattern "[0-9a-fA-F]*"; pattern "aa*"; } } leaf my-bits { type bits { bit disable-nagle { position 0; status current; } bit auto-sense-speed { position 1; } bit 10-Mb-only { position 2; } } default "auto-sense-speed"; } type union { type int32; type string; } grouping grp1 { leaf myenum { type enumeration { enum zero; enum one; enum seven { value 7; } } default zero; } } container uses-cont { uses t2:grp1 { refine myenum { default one; } } } leaf lf-int8 { type int8; } leaf lf-int16 { type int16; } leaf lf-int32 { type int32; } leaf lf-int64 { type int64; } leaf lf-uint8 { type uint8; } leaf lf-uint16 { type uint16; } leaf lf-uint32 { type uint32; } leaf lf-uint64 { type uint64; } leaf lf-bool { type boolean; } }