X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=opendaylight%2Fsal%2Fyang-prototype%2Fcode-generator%2Fyang-model-parser-impl%2Fsrc%2Ftest%2Fresources%2Fmodel%2Fcustom.yang;fp=opendaylight%2Fsal%2Fyang-prototype%2Fcode-generator%2Fyang-model-parser-impl%2Fsrc%2Ftest%2Fresources%2Fmodel%2Ftestfile3.yang;h=d8d6054b597b6e7a43d7cb34e194d0f479fa6880;hb=refs%2Fchanges%2F66%2F566%2F1;hp=c507da55e521612178a2bde2aa9f01fbb5b21b4c;hpb=316c30bf96a3a540154983657490ff2043458d25;p=controller.git diff --git a/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/test/resources/model/testfile3.yang b/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/test/resources/model/custom.yang similarity index 63% rename from opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/test/resources/model/testfile3.yang rename to opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/test/resources/model/custom.yang index c507da55e5..d8d6054b59 100644 --- a/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/test/resources/model/testfile3.yang +++ b/opendaylight/sal/yang-prototype/code-generator/yang-model-parser-impl/src/test/resources/model/custom.yang @@ -1,11 +1,11 @@ -module types3 { +module custom { yang-version 1; - namespace "urn:simple.container.demo.test"; - prefix "t3"; + namespace "urn:custom.nodes.test"; + prefix "c"; - import types2 { - prefix "data"; - revision-date 2013-02-27; + import types { + prefix "types"; + revision-date 2013-07-03; } organization "opendaylight"; @@ -22,25 +22,25 @@ module types3 { typedef union2 { type union { type int32; - type data:nested-union2; + type types:nested-union2; } } - augment "/data:interfaces/data:ifEntry" { + augment "/types:interfaces/types:ifEntry" { when "if:ifType='ds0'"; container augment-holder { description "Description for augment holder"; } } - augment "/data:interfaces/data:ifEntry" { + augment "/types:interfaces/types:ifEntry" { when "if:ifType='ds2'"; container augment-holder2 { description "Description for augment holder"; } } - augment "/data:interfaces/data:ifEntry/t3:augment-holder/t1:schemas" { + augment "/types:interfaces/types:ifEntry/t3:augment-holder/t1:schemas" { when "if:leafType='ds1'"; leaf linkleaf { type binary; @@ -68,10 +68,10 @@ module types3 { extension c-define { description - "Takes as argument a name string. - Makes the code generator use the given name in the - #define."; - argument "name"; + "Takes as argument a name string. Makes the code generator use the given name in the #define."; + argument "name" { + yin-element "true"; + } } notification event { @@ -145,4 +145,61 @@ module types3 { } } + 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"; + } + 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 types:my-decimal-type; + } + + opendaylight; + } + }