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; }
+ import test-groups { prefix tg; revision-date 2014-12-08; }
description
"Testing IMPL";
config:java-name-prefix NetconfTestImpl;
}
+ identity impl-identity-test {
+ base config:module-type;
+ config:provided-service test:testing;
+ config:java-name-prefix IdentityTest;
+ }
+
+ identity multiple-dependencies {
+ base config:module-type;
+ config:provided-service test:testing;
+ config:java-name-prefix MultipleDependencies;
+ }
+
+ 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 {
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 {
augment "/config:modules/config:module/config:configuration" {
case impl-netconf {
when "/config:modules/config:module/config:type = 'impl-netconf'";
- leaf binaryLeaf {
- type binary;
- }
+ container impl-netconf {
+ leaf binaryLeaf {
+ type binary;
+ default ZGVmYXVsdEJpbg==;
+ }
- leaf type {
- type string;
- }
+ leaf type {
+ type string;
+ default "default-string";
+ }
- leaf extended {
- type tt:extend-once;
- }
+ leaf extended {
+ type tt:extend-once;
+ default 1;
+ }
- leaf extended-twice {
- type tt:extend-twice;
- }
+ leaf extended-twice {
+ type tt:extend-twice;
+ default 2;
+ }
- leaf extended-enum {
- type tt:extend-enum;
- }
+ leaf extended-enum {
+ type tt:extend-enum;
+ default one;
+ }
- container dto-c {
- leaf simple-arg {
- type uint32;
+ 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-a-inner {
+ container dto-c {
leaf simple-arg {
type uint32;
}
- container dto-a-inner-inner {
+ 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 simpleInt {
+ type uint32;
+ }
- leaf simple-byte {
- type int8;
- }
+ leaf simpleBoolean {
+ type boolean;
+ default false;
+ }
- leaf simple-short {
- type uint8;
- }
+ leaf simple-long {
+ type int64;
+ default -45;
+ }
- leaf simple-test {
- type uint16;
- default 99;
- }
+ leaf simple-long-2 {
+ type uint32;
+ default 445;
+ }
- leaf-list simple-list {
- type uint16;
- }
+ leaf simple-BigInteger {
+ type uint64;
+ default 545454;
+ }
- container dto_d {
- leaf simple-int1 {
- type uint32;
+ leaf simple-byte {
+ type int8;
+ default -4;
}
- leaf simple-int2 {
- type uint32;
+ leaf simple-short {
+ type uint8;
+ default 45;
}
- leaf simple-int3 {
+ leaf simple-test {
type uint16;
+ default 99;
}
leaf-list simple-list {
type uint16;
}
- list complex-dto-bInner {
- leaf-list simple-list {
- type uint16;
+ container dto_d {
+ leaf simple-int1 {
+ type uint32;
}
+
+ leaf simple-int2 {
+ type uint32;
+ }
+
leaf simple-int3 {
type uint16;
}
- container deep {
+ 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;
+ default 0;
+ }
+ }
}
}
- }
- list complex-list {
- list simple-list {
- 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;
+ 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;
+ }
}
- }
+ }
- container testing-dep {
- uses config:service-ref {
- refine type {
- mandatory true;
- config:required-identity test:testing;
+ list testing-deps {
+ 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;
- }
+ grouping netconf-impl-rpc {
+ rpcx:rpc-context-instance netconf-impl-rpc-ctx;
+ }
- container asdf {
- leaf simpleInt {
- type uint16;
- }
+ identity netconf-impl-rpc-ctx;
- leaf simpleString {
- type string;
+ rpc netconf-impl-rpc-from-grouping {
+ input {
+ uses rpcx:rpc-context-ref {
+ refine context-instance {
+ rpcx:rpc-context-instance "netconf-impl-rpc-ctx";
}
}
+ }
+ }
-
- list inner-running-data-additional {
- config:inner-state-bean;
-
+ augment "/config:modules/config:module/config:state" {
+ case impl-netconf {
+ when "/config:modules/config:module/config:type = 'impl-netconf'";
+ container impl-netconf {
// rpc
- rpcx:rpc-context-instance "inner-test-rpc";
+ rpcx:rpc-context-instance "test-rpc";
- key "simpleString";
+ // add some stats + rpc from groupings outside this module
+ uses tt:common-operational;
+ uses tg:common-operational-rpc;
+ uses netconf-impl-rpc;
- leaf simple-int3 {
- type uint16;
+ // root runtime bean
+ leaf created-sessions {
+ type uint32;
}
- leaf simpleString {
- type string;
- }
+ container asdf {
+ leaf simpleInt {
+ type uint16;
+ }
- container deep4 {
- leaf boool {
- type boolean;
+ leaf simpleString {
+ type string;
}
}
- }
- list inner-running-data {
- config:inner-state-bean;
- key "simple-int3";
+ list inner-running-data-additional {
+ config:inner-state-bean;
+
+ // rpc
+ rpcx:rpc-context-instance "inner-test-rpc";
- leaf simple-int3 {
- type uint16;
+ key "simpleString";
+
+ leaf simple-int3 {
+ type uint16;
}
- container deep2 {
- leaf boool {
- type boolean;
+ leaf simpleString {
+ type string;
}
- }
- list inner-inner-running-data {
- config:inner-state-bean;
+ container deep4 {
+ leaf boool {
+ type boolean;
+ }
+ }
+ }
- rpcx:rpc-context-instance "inner-inner-test-rpc";
- rpcx:rpc-context-instance "complex-output-rpc";
+ list inner-running-data {
+ config:inner-state-bean;
key "simple-int3";
leaf simple-int3 {
- type uint16;
- }
+ type uint16;
+ }
- leaf-list list-of-strings {
- type string;
- }
+ container deep2 {
+ leaf boool {
+ type boolean;
+ }
+ }
- list not-state-bean {
- leaf element {
- type string;
+ 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;
}
- list not-state-bean-internal {
- // This should be ignored
- config:inner-state-bean;
+ leaf-list list-of-strings {
+ type string;
+ }
- leaf element2 {
+ 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;
+ }
}
}
+ }
- container deep3 {
- leaf boool {
- type boolean;
+ }
+
+ }
+ }
+
+
+ augment "/config:modules/config:module/config:configuration" {
+ case multiple-dependencies {
+ when "/config:modules/config:module/config:type = 'multiple-dependencies'";
+ container multiple-dependencies {
+ list testing-deps {
+ uses config:service-ref {
+ refine type {
+ mandatory true;
+ config:required-identity test:testing;
}
}
}
+ container single {
+ uses config:service-ref {
+ refine type {
+ mandatory false;
+ config:required-identity test:testing;
+ }
+ }
+ }
+
+ leaf simple {
+ type boolean;
+ default false;
+ }
}
}
}
+
identity test-rpc;
identity inner-test-rpc;
identity inner-inner-test-rpc;
container retValContainer {
leaf v1 {
type string;
+ default "from rpc";
}
leaf v2 {