UT and defect fixes for DF serializer
[ccsdk/sli/plugins.git] / restconf-client / provider / src / test / resources / yang / identity-test.yang
1 module identity-test {
2     yang-version 1.1;
3     namespace "identity:ns:test:json:ser";
4     prefix "id";
5
6     import identity-types {
7         prefix "type";
8     }
9
10     import identity-types-second {
11         prefix "sec";
12     }
13
14     revision "2013-07-15";
15
16     identity optical {
17         base type:int-type;
18     }
19
20     identity Giga {
21         base type:physical;
22     }
23
24     typedef available {
25         type identityref {
26             base "type:physical";
27         }
28     }
29
30     typedef typed{
31         type union {
32             type int32;
33             type int8;
34             type identityref {
35                 base type:int-type;
36             }
37         }
38     }
39
40     container test {
41         leaf l {
42             type string;
43         }
44         container con1 {
45             leaf interface {
46                 type identityref {
47                     base "type:int-type";
48                 }
49             }
50             container interfaces {
51                 list int-list {
52                     key "iden";
53                     leaf iden {
54                         type "id:typed";
55                     }
56                     container available {
57                         leaf-list ll {
58                             type available;
59                         }
60                         leaf leaf1 {
61                             type leafref {
62                                 path "../../iden";
63                             }
64                         }
65
66                         leaf leaf2 {
67                             type identityref {
68                                 base type:int-type;
69                                 base sec:iden1;
70                             }
71                         }
72                     }
73                 }
74             }
75         }
76     }
77 }