Code Review
/
controller.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Merge "Bug 1036 - Allow using container in case stmt to preserve uniqueness."
[controller.git]
/
opendaylight
/
config
/
yang-test
/
src
/
main
/
yang
/
config-test-impl.yang
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 6ee379623bf128216a8328e5533918b9d543fb27..4b006bc72e52c3026130db4b556e62fd340523da 100644
(file)
--- a/
opendaylight/config/yang-test/src/main/yang/config-test-impl.yang
+++ b/
opendaylight/config/yang-test/src/main/yang/config-test-impl.yang
@@
-41,28
+41,20
@@
module config-test-impl {
config:java-name-prefix IdentityTest;
}
config:java-name-prefix IdentityTest;
}
- identity test-identity1 {
-
- }
-
- identity test-identity2 {
- base test-identity1;
- }
-
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 {
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 test-identity1;
+ base t
t:t
est-identity1;
}
}
container identities-container {
leaf afi {
type identityref {
}
}
container identities-container {
leaf afi {
type identityref {
- base test-identity1;
+ base t
t:t
est-identity1;
}
}
}
}
}
}
@@
-70,19
+62,19
@@
module config-test-impl {
list identities {
leaf afi {
type identityref {
list identities {
leaf afi {
type identityref {
- base test-identity1;
+ base t
t:t
est-identity1;
}
}
leaf safi {
type identityref {
}
}
leaf safi {
type identityref {
- base test-identity1;
+ base t
t:t
est-identity1;
}
}
container identities-inner {
leaf afi {
type identityref {
}
}
container identities-inner {
leaf afi {
type identityref {
- base test-identity1;
+ base t
t:t
est-identity1;
}
}
}
}
}
}
@@
-170,177
+162,179
@@
module config-test-impl {
augment "/config:modules/config:module/config:configuration" {
case impl-netconf {
when "/config:modules/config:module/config:type = 'impl-netconf'";
augment "/config:modules/config:module/config:configuration" {
case impl-netconf {
when "/config:modules/config:module/config:type = 'impl-netconf'";
- leaf binaryLeaf {
- type binary;
- default ZGVmYXVsdEJpbg==;
- }
-
- leaf type {
- type string;
- default "default-string";
- }
+ container impl-netconf {
+ leaf binaryLeaf {
+ type binary;
+ default ZGVmYXVsdEJpbg==;
+ }
-
leaf extended
{
-
type tt:extend-once
;
-
default 1
;
- }
+
leaf type
{
+
type string
;
+
default "default-string"
;
+
}
-
leaf extended-twice
{
-
type tt:extend-twi
ce;
-
default 2
;
- }
+
leaf extended
{
+
type tt:extend-on
ce;
+
default 1
;
+
}
-
leaf extended-enum
{
-
type tt:extend-enum
;
-
default ONE
;
- }
+
leaf extended-twice
{
+
type tt:extend-twice
;
+
default 2
;
+
}
-
leaf ip
{
-
type inet:ip-address
;
-
default 0:0:0:0:0:0:0:1
;
- }
+
leaf extended-enum
{
+
type tt:extend-enum
;
+
default ONE
;
+
}
-
leaf union-test-attr
{
-
type tt:unionTest
;
-
default 456
;
- }
+
leaf ip
{
+
type inet:ip-address
;
+
default 0:0:0:0:0:0:0:1
;
+
}
-
leaf sleep-facto
r {
- type decimal64 {
-
fraction-digits 2
;
+
leaf union-test-att
r {
+ type tt:unionTest;
+
default 456
;
}
}
- default 2.00;
- }
- container dto-c {
- leaf simple-arg {
- type uint32;
+ leaf sleep-factor {
+ type decimal64 {
+ fraction-digits 2;
+ }
+ default 2.00;
}
}
-
container dto-a-inner
{
+
container dto-c
{
leaf simple-arg {
type uint32;
}
leaf simple-arg {
type uint32;
}
- container dto-a-inner
-inner
{
+ container dto-a-inner {
leaf simple-arg {
type uint32;
}
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;
- default -45;
- }
-
- leaf simple-long-2 {
- type uint32;
- default 445;
- }
- leaf simple-BigInteger {
- type uint64;
- default 545454;
- }
+ leaf simpleInt {
+ type uint32;
+ }
-
leaf simple-byte
{
-
type int8
;
-
default -4
;
- }
+
leaf simpleBoolean
{
+
type boolean
;
+
default false
;
+
}
-
leaf simple-short
{
-
type uint8
;
-
default
45;
- }
+
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;
type uint16;
+ default 99;
}
leaf-list simple-list {
type uint16;
}
}
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;
}
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;
leaf simple-int3 {
type uint16;
- default 0;
+ }
+
+ 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;
+ list testing-deps {
+ uses config:service-ref {
+ refine type {
+ mandatory true;
+ config:required-identity test:testing;
+ }
}
}
}
}
}
}
@@
-350,97
+344,99
@@
module config-test-impl {
augment "/config:modules/config:module/config:state" {
case impl-netconf {
when "/config:modules/config:module/config:type = 'impl-netconf'";
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 impl-netconf {
+ // rpc
+ rpcx:rpc-context-instance "test-rpc";
- container asdf {
- leaf
simpleInt
{
- type uint
16
;
+ // root runtime bean
+ leaf
created-sessions
{
+ type uint
32
;
}
}
- leaf simpleString {
- type string;
+ container asdf {
+ leaf simpleInt {
+ type uint16;
+ }
+
+ leaf simpleString {
+ type string;
+ }
}
}
- }
- list inner-running-data-additional {
- config:inner-state-bean;
+
list inner-running-data-additional {
+
config:inner-state-bean;
- // rpc
- rpcx:rpc-context-instance "inner-test-rpc";
+
// rpc
+
rpcx:rpc-context-instance "inner-test-rpc";
- key "simpleString";
+
key "simpleString";
- leaf simple-int3 {
- type uint16;
- }
-
- leaf simpleString {
- type string;
- }
-
- container deep4 {
- leaf boool {
- type boolean;
+ leaf simple-int3 {
+ type uint16;
}
}
- }
- }
-
- list inner-running-data {
- config:inner-state-bean;
- key "simple-int3";
-
- leaf simple-int3 {
- type uint16;
+ leaf simpleString {
+ type string;
}
}
- container deep2 {
- leaf boool {
- type boolean;
+ container deep4 {
+ leaf boool {
+ type boolean;
+ }
}
}
-
}
+ }
-
list inner-
inner-running-data {
+
list
inner-running-data {
config:inner-state-bean;
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 {
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;
}
}
- l
ist not-state-bean-internal
{
- // This should be ignored
- config:inner-state-bean;
+ l
eaf-list list-of-strings
{
+ type string;
+ }
- leaf element2 {
+ list not-state-bean {
+ leaf element {
type string;
}
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;
+ }
}
}
}
}
}
}