module types { yang-version 1; namespace "urn:custom.types.demo"; prefix "typ"; revision "2015-08-08"; leaf leaf-int8 { type int8; } leaf leaf-int16 { type int16; } leaf leaf-int32 { type int32; } leaf leaf-int64 { type int64; } leaf leaf-uint8 { type uint8; } leaf leaf-uint16 { type uint16; } leaf leaf-uint32 { type uint32; } leaf leaf-uint64 { type uint64; } leaf leaf-binary { type binary; } leaf leaf-boolean { type boolean; } leaf leaf-instance-identifier { type instance-identifier; } leaf leaf-identityref { type identityref { base "test-identity"; } } leaf leaf-string { type string; } leaf leaf-length-pattern { type string { length "1..255"; pattern "[0-9a-fA-F]*"; } } leaf leaf-length-pattern-second { type string { length "2..10"; pattern "[0-9a-fA-F]"; } } identity test-identity { description "test identity description"; } leaf leaf-decimal64 { type decimal64 { fraction-digits 2; range "1 .. 3.14 | 10 | 20..max"; } } leaf leaf-empty { type empty; } leaf leaf-bits { type bits { bit one { position 0; description "test bit"; reference "test bit ref"; status current; } bit two { position 1; } bit three { position 2; description "test bit"; reference "test bit ref"; status current; } } default "one"; } leaf leaf-enum { type enumeration { enum zero { description "test enum"; reference "test enum ref"; status current; value 0; } enum one; enum two; } } leaf leaf-union { type union { type int8; type int16; } } leaf leaf-leafref { type leafref { path "/container-test/leaf-test"; } } container container-test { leaf leaf-test { type int8; } } }