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";
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 {
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 {
}
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 {
container deep {
leaf simple-int3 {
type uint16;
+ default 0;
}
}
}
}
}
}
+
+ list testing-deps {
+ uses config:service-ref {
+ refine type {
+ mandatory true;
+ config:required-identity test:testing;
+ }
+ }
+ }
}
}
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;
+ type uint16;
+ }
+
+ leaf-list list-of-strings {
+ type string;
}
list not-state-bean {
identity inner-test-rpc;
identity inner-inner-test-rpc;
+ identity complex-output-rpc;
+
rpc no-arg {
input {
uses rpcx:rpc-context-ref {
}
}
+ 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;
+ default "from rpc";
+ }
+
+ 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 {