X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?p=controller.git;a=blobdiff_plain;f=opendaylight%2Fconfig%2Fyang-test%2Fsrc%2Fmain%2Fyang%2Fconfig-test-impl.yang;h=c82da58c150ff8067c0d9933b50250228eec0431;hp=291e3ebd948159d2a6191e6ca31d8452987486da;hb=f04d241578740473fc8b9f17fe38db6f8ea17f02;hpb=545b424ba9278d7aee12b9a6173e23c1b1d39dd3 diff --git a/opendaylight/config/yang-test/src/main/yang/config-test-impl.yang b/opendaylight/config/yang-test/src/main/yang/config-test-impl.yang index 291e3ebd94..c82da58c15 100644 --- a/opendaylight/config/yang-test/src/main/yang/config-test-impl.yang +++ b/opendaylight/config/yang-test/src/main/yang/config-test-impl.yang @@ -7,7 +7,7 @@ module config-test-impl { import config { prefix config; revision-date 2013-04-05; } import ietf-inet-types { prefix inet; revision-date 2010-09-24;} import rpc-context { prefix rpcx; revision-date 2013-06-17; } - + import test-types { prefix tt; revision-date 2013-11-27; } description "Testing IMPL"; @@ -35,6 +35,61 @@ module config-test-impl { config:java-name-prefix NetconfTestImpl; } + identity impl-identity-test { + base config:module-type; + config:provided-service test:testing; + config:java-name-prefix IdentityTest; + } + + augment "/config:modules/config:module/config:configuration" { + case impl-identity-test { + when "/config:modules/config:module/config:type = 'impl-identity-test'"; + + leaf afi { + type identityref { + base tt:test-identity1; + } + } + + container identities-container { + leaf afi { + type identityref { + base tt:test-identity1; + } + } + } + + list identities { + leaf afi { + type identityref { + base tt:test-identity1; + } + } + leaf safi { + type identityref { + base tt:test-identity1; + } + } + + container identities-inner { + leaf afi { + type identityref { + base tt:test-identity1; + } + } + } + } + + } + } + + augment "/config:modules/config:module/config:state" { + case impl-identity-test { + when "/config:modules/config:module/config:type = 'impl-identity-test'"; + + } + } + augment "/config:modules/config:module/config:configuration" { case impl { @@ -48,28 +103,36 @@ module config-test-impl { container dto-a { leaf simple-arg { type uint32; + default 1; } leaf port { type inet:port-number; + default 8080; + } + + leaf ip4 { + type inet:ipv4-address; + default 127.0.0.1; } } leaf as-number { - mandatory true; type inet:as-number; + default 44; } leaf simpleInt { type uint32; - default 99L; + default 99; } container dto_b { leaf simple-int1 { type uint32; + default 32; } leaf simple-int2 { @@ -101,10 +164,44 @@ module config-test-impl { when "/config:modules/config:module/config:type = 'impl-netconf'"; leaf binaryLeaf { type binary; + default ZGVmYXVsdEJpbg==; } leaf type { type string; + default "default-string"; + } + + leaf extended { + type tt:extend-once; + default 1; + } + + leaf extended-twice { + type tt:extend-twice; + default 2; + } + + leaf extended-enum { + type tt:extend-enum; + default ONE; + } + + leaf ip { + type inet:ip-address; + default 0:0:0:0:0:0:0:1; + } + + leaf union-test-attr { + type tt:unionTest; + default 456; + } + + leaf sleep-factor { + type decimal64 { + fraction-digits 2; + } + default 2.00; } container dto-c { @@ -135,23 +232,28 @@ module config-test-impl { } leaf simple-long { - type int64 ; + type int64; + default -45; } leaf simple-long-2 { type uint32; + default 445; } leaf simple-BigInteger { type uint64; + default 545454; } leaf simple-byte { type int8; + default -4; } leaf simple-short { type uint8; + default 45; } leaf simple-test { @@ -191,6 +293,7 @@ module config-test-impl { container deep { leaf simple-int3 { type uint16; + default 0; } } } @@ -224,6 +327,15 @@ module config-test-impl { } } } + + list testing-deps { + uses config:service-ref { + refine type { + mandatory true; + config:required-identity test:testing; + } + } + } } } @@ -366,6 +478,7 @@ module config-test-impl { container retValContainer { leaf v1 { type string; + default "from rpc"; } leaf v2 {