Code Review
/
yangtools.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
history
|
raw
|
HEAD
Bug 2363, Bug 2205. Beta version of LeafRefContext tree computation
[yangtools.git]
/
yang
/
yang-data-impl
/
src
/
test
/
resources
/
leafref-validation
/
leafref-validation2.yang
1
module leafref-validation2 {
2
namespace "leafref.validation2";
3
prefix val2;
4
5
container device_types {
6
list device_type {
7
key "type";
8
leaf type {
9
type string;
10
}
11
leaf desc {
12
type string;
13
}
14
}
15
}
16
17
container devices {
18
list device {
19
key "type_text sn";
20
leaf type_text {
21
type leafref {
22
path "/device_types/device_type/type";
23
}
24
}
25
leaf dev_desc {
26
type leafref {
27
path "/device_types/device_type[type = current()/../type_text]/desc";
28
}
29
}
30
leaf sn {
31
type int32;
32
}
33
leaf default_ip {
34
type string;
35
}
36
}
37
}
38
39
container chips {
40
list chip {
41
key "dev_type";
42
leaf dev_type {
43
type leafref {
44
path "/devices/device/type_text";
45
}
46
}
47
leaf chip_desc {
48
type string;
49
}
50
}
51
}
52
}