module config-test-impl { yang-version 1; namespace "urn:opendaylight:params:xml:ns:yang:controller:test:impl"; prefix "it-impl"; import config-test { prefix test; revision-date 2013-06-13;} 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; } description "Testing IMPL"; revision "2013-04-03" { description "Initial revision"; } identity impl { base config:module-type; config:provided-service test:testing; config:java-name-prefix TestImpl; } identity impl-dep { base config:module-type; config:provided-service test:testing; config:java-name-prefix DepTestImpl; } identity impl-netconf { base config:module-type; config:provided-service test:testing; config:java-name-prefix NetconfTestImpl; } augment "/config:modules/config:module/config:configuration" { case impl { when "/config:modules/config:module/config:type = 'impl'"; leaf-list allow-user { type string; description "A list of user name patterns to allow"; } container dto-a { leaf simple-arg { type uint32; } leaf port { type inet:port-number; } } leaf as-number { mandatory true; type inet:as-number; } leaf simpleInt { type uint32; default 99L; } container dto_b { leaf simple-int1 { type uint32; } leaf simple-int2 { type uint32; } } } } augment "/config:modules/config:module/config:state" { case impl { when "/config:modules/config:module/config:type = 'impl'"; // root runtime bean leaf created-sessions { type uint32; } } } augment "/config:modules/config:module/config:configuration" { case impl-dep { when "/config:modules/config:module/config:type = 'impl-dep'"; } } augment "/config:modules/config:module/config:configuration" { case impl-netconf { when "/config:modules/config:module/config:type = 'impl-netconf'"; leaf binaryLeaf { type binary; } leaf type { type string; } container dto-c { leaf simple-arg { type uint32; } container dto-a-inner { leaf simple-arg { type uint32; } container dto-a-inner-inner { leaf simple-arg { type uint32; } } } } leaf simpleInt { type uint32; } leaf simpleBoolean { type boolean; default false; } leaf simple-long { type int64 ; } leaf simple-long-2 { type uint32; } leaf simple-BigInteger { type uint64; } leaf simple-byte { type int8; } leaf simple-short { type uint8; } leaf simple-test { type uint16; default 99; } leaf-list simple-list { type uint16; } container dto_d { leaf simple-int1 { type uint32; } leaf simple-int2 { type uint32; } leaf simple-int3 { type uint16; } leaf-list simple-list { type uint16; } list complex-dto-bInner { leaf-list simple-list { type uint16; } leaf simple-int3 { type uint16; } container deep { leaf simple-int3 { type uint16; } } } } list complex-list { list simple-list { leaf simple-int3 { type uint16; } } } list peers { leaf port { type string; } leaf core-size { type uint32; } leaf simple-int3 { type uint16; } } container testing-dep { uses config:service-ref { refine type { mandatory true; config:required-identity test:testing; } } } } } augment "/config:modules/config:module/config:state" { case impl-netconf { when "/config:modules/config:module/config:type = 'impl-netconf'"; // rpc rpcx:rpc-context-instance "test-rpc"; // root runtime bean leaf created-sessions { type uint32; } container asdf { leaf simpleInt { type uint16; } leaf simpleString { type string; } } list inner-running-data-additional { config:inner-state-bean; // rpc rpcx:rpc-context-instance "inner-test-rpc"; key "simpleString"; leaf simple-int3 { type uint16; } leaf simpleString { type string; } container deep4 { leaf boool { type boolean; } } } list inner-running-data { config:inner-state-bean; key "simple-int3"; leaf simple-int3 { type uint16; } container deep2 { leaf boool { type boolean; } } list inner-inner-running-data { config:inner-state-bean; rpcx:rpc-context-instance "inner-inner-test-rpc"; rpcx:rpc-context-instance "complex-output-rpc"; key "simple-int3"; leaf simple-int3 { type uint16; } leaf-list list-of-strings { type string; } list not-state-bean { leaf element { type string; } list not-state-bean-internal { // This should be ignored config:inner-state-bean; leaf element2 { type string; } } } container deep3 { leaf boool { type boolean; } } } } } } identity test-rpc; identity inner-test-rpc; identity inner-inner-test-rpc; identity complex-output-rpc; rpc no-arg { input { uses rpcx:rpc-context-ref { refine context-instance { rpcx:rpc-context-instance test-rpc; } } leaf arg1 { type string; } } output { leaf result { type string; } } } rpc container-output { input { uses rpcx:rpc-context-ref { refine context-instance { rpcx:rpc-context-instance complex-output-rpc; } } } output { container retValContainer { leaf v1 { type string; } leaf v2 { type uint32; } } } } rpc leaf-list-output { input { uses rpcx:rpc-context-ref { refine context-instance { rpcx:rpc-context-instance complex-output-rpc; } } } output { leaf-list result { type string; } } } rpc list-output { input { uses rpcx:rpc-context-ref { refine context-instance { rpcx:rpc-context-instance complex-output-rpc; } } } output { list ret-val-list { leaf v2 { type uint32; } leaf v1 { type boolean; } } } } rpc noArgInner { input { uses rpcx:rpc-context-ref { refine context-instance { rpcx:rpc-context-instance inner-test-rpc; } } } } rpc noArgInnerInner { input { uses rpcx:rpc-context-ref { refine context-instance { rpcx:rpc-context-instance inner-inner-test-rpc; } } leaf arg1 { type uint16; } leaf arg2 { type boolean; } } output { leaf result { type boolean; } } } }