X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fsal%2Fyang-prototype%2Fcode-generator%2Fyang-model-parser-impl%2Fsrc%2Ftest%2Fresources%2Fmodel%2Ftestfile2.yang;h=904c8e66fd2c3d8dd8ad9dc2f32588604ffc867f;hp=a4e5868c4f9e26f098c760ac74f2336b8abf4c60;hb=9ceed566491d172e02220b04ec6869867f2f2473;hpb=d0f1a6162437a9e003e87c7a8b36ea875f8de984 diff --git a/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/test/resources/model/testfile2.yang b/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/test/resources/model/testfile2.yang index a4e5868c4f..904c8e66fd 100644 --- a/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/test/resources/model/testfile2.yang +++ b/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/test/resources/model/testfile2.yang @@ -82,27 +82,27 @@ module types2 { } typedef my-union { - type union { - type int16 { - range "1..100"; - } - type int32; - } + type union { + type int16 { + range "1..100"; + } + type int32; + } } typedef my-union-ext { - type my-union; + type my-union; } typedef nested-union1 { - type nested-union2; + type nested-union2; } typedef nested-union2 { - type union { - type my-union-ext; - type string; - } + type union { + type my-union-ext; + type string; + } } leaf if-name { @@ -114,6 +114,12 @@ module types2 { leaf name { type string; } + + leaf count { + type int8 { + range "1..10"; + } + } leaf nested-type-leaf { type my-type1; @@ -136,6 +142,36 @@ module types2 { } grouping target { + anyxml data { + config true; + description "Copy of the source datastore subset."; + mandatory false; + must "test-condition-text"; + reference "test-no-reference"; + status "obsolete"; + when "test-when-text"; + } + choice how { + description "test choice description"; + default interval; + case interval { + leaf interval { + type uint16; + default 30; + units minutes; + } + } + case daily { + leaf daily { + type empty; + } + leaf time-of-day { + type string; + units 24-hour-clock; + default 1am; + } + } + } leaf address { type string; description "Target IP address"; @@ -143,13 +179,21 @@ module types2 { container port { description "Target port container"; } - list addresses { key "id"; leaf id { type int8; } } + grouping target-inner { + description "target-inner default description"; + leaf inner-grouping-id { + type int8; + } + } + typedef group-type { + type my-decimal-type; + } } container peer { @@ -167,10 +211,6 @@ module types2 { } } refine port { - must "must-condition" { - error-message "An error message test"; - error-app-tag "An error app tag test"; - } description "description of port defined by refine"; reference "port reference added by refine"; config false; @@ -183,6 +223,13 @@ module types2 { min-elements 2; max-elements 12; } + refine target-inner { + description "new target-inner grouping description"; + } + refine group-type { + description "new group-type description"; + reference "new group-type reference"; + } } } }