X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;ds=sidebyside;f=opendaylight%2Fsal%2Fyang-prototype%2Fcode-generator%2Fyang-model-parser-impl%2Fsrc%2Ftest%2Fresources%2Fmodel%2Ftestfile2.yang;h=d75fc6329679b65224aca76be6cd7b3db1931e11;hb=53e740af349a154f3f1a6b8c041303446f599718;hp=0126671b359d1c9d432ad940d34a43c407485b29;hpb=960ee728b77e39cd95b6c20892f01b4db6258f41;p=controller.git 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 0126671b35..d75fc63296 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 @@ -3,12 +3,7 @@ module types2 { namespace "urn:simple.types.data.demo"; prefix "t2"; - import types1 { - prefix "if"; - revision-date 2013-02-27; - } - - organization "OPEN DAYLIGHT"; + organization "opendaylight"; contact "http://www.opendaylight.org/"; description "This is types-data test description"; @@ -25,7 +20,7 @@ module types2 { typedef my-type1 { type my-base-int32-type { - range "11..max"; + range "3..9|11..max"; } units "mile"; default "11"; @@ -110,13 +105,6 @@ module types2 { } } - augment "/if:interfaces/if:ifEntry" { - when "if:ifType='ds0'"; - leaf ds0ChannelNumber { - type string; - } - } - leaf if-name { type leafref { path "/interface/name"; @@ -146,5 +134,120 @@ module types2 { type string; } } + + 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 my-decimal-type; + } + } + + container peer { + container destination { + uses target { + refine address { + default "1.2.3.4"; + description "description of address defined by refine"; + reference "address reference added by refine"; + config false; + mandatory true; + must "ifType != 'ethernet' or " + + "(ifType = 'ethernet' and ifMTU = 1500)" { + error-message "An ethernet MTU must be 1500"; + } + } + 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; + presence "presence is required"; + } + refine addresses { + description "description of addresses defined by refine"; + reference "addresses reference added by refine"; + config false; + 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"; + } + } + } + } + + container interfaces { + list ifEntry { + key "ifIndex"; + + leaf ifIndex { + type uint32; + units minutes; + } + + leaf ifMtu { + type int32; + } + + min-elements 1; + max-elements 11; + } + } }