Do not pretty-print body class
[yangtools.git] / data / yang-data-impl / src / test / resources / leafref-test.yang
1 /*
2  * Copyright (c) 2014 Cisco Systems, Inc. and others.  All rights reserved.
3  *
4  * This program and the accompanying materials are made available under the
5  * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6  * and is available at http://www.eclipse.org/legal/epl-v10.html
7  */
8 module leafref-test {
9     yang-version 1;
10     namespace "urn:opendaylight:yangtools:leafref:test";
11     prefix "lt";
12
13     revision 2014-11-04 {
14         description "Test deserialization value of leafref type.";
15     }
16
17     identity test-identity-base {
18     }
19
20     identity test-identity {
21       base lt:test-identity-base;
22     }
23
24     container interface {
25         leaf simpleValue {
26             type instance-identifier;
27         }
28     }
29
30     container cont2 {
31         container cont3 {
32             leaf leafname3 {
33                 type leafref {
34                     path "../../pointToStringLeaf";
35                 }
36             }
37         }
38         leaf pointToStringLeaf {
39             type leafref {
40                 path "../stringleaf";
41             }
42         }
43
44         leaf point-to-identityrefleaf {
45             type leafref {
46                 path "../identityrefleaf";
47             }
48         }
49
50         leaf identityrefleaf {
51             type identityref {
52               base lt:test-identity-base;
53             }
54         }
55
56         leaf stringleaf {
57             type string;
58         }
59         leaf absname {
60             type leafref {
61                 path "/lt:interface/lt:simpleValue";
62             }
63         }
64         leaf relname {
65             type leafref {
66                 path "../../lt:interface/lt:simpleValue";
67             }
68         }
69
70         leaf lf-with-double-point-inside {
71             type leafref {
72                 path "../../lt:interface/../lt:cont2/lt:stringleaf";
73             }
74         }
75     }
76 }