blob: 5191b7296c5d14f40d4090a54cd3f6bef0b186ba [file] [log] [blame]
Vidyashree Rama6160be12016-11-24 13:43:31 +05301module leafreftest {
2
3 yang-version 1;
4
5 namespace "ydt.leafreftest";
6
7 prefix "uniontest";
8
9 organization "ON-LAB";
10
11 description "This module defines for union classifier.";
12
13 revision "2016-05-24" {
14 description "Initial revision.";
15 }
16
17 leaf middlename {
18 type string;
19 }
20
21 list leafrefList {
22 config false;
23 leaf id {
24 type leafref {
25 path "/middlename";
26 }
27 }
28 }
29
30 typedef percent {
31 type leafref {
32 path "/middlename";
33 }
34 }
35
36 leaf name {
37 type percent;
38 }
39
40 grouping greeting {
41 leaf surname {
42 type leafref {
43 path "/middlename";
44 }
45 }
46 }
47
48 container cont1 {
49 uses greeting;
50 }
51
52 augment "/cont1" {
53 leaf lastname {
54 type leafref {
55 path "/middlename";
56 }
57 }
58 }
59
60 container food {
61 choice snack {
62 case sportsarena {
63 leaf pretzel {
64 type leafref {
65 path "/middlename";
66 }
67 }
68 }
69 }
70 }
71}