Added support for resolving augmentations.
[controller.git] / opendaylight / sal / yang-prototype / code-generator / binding-generator-impl / src / test / resources / augment-test-models / augment-abstract-topology@2013-05-03.yang
1 module augment-abstract-topology {
2         yang-version 1;
3     namespace "urn:model:augment:abstract:topology";
4     prefix "atp";
5
6     import ietf-inet-types { 
7         prefix "inet"; 
8         revision-date 2010-09-24;
9     }
10         
11         import ietf-interfaces {
12         prefix "if";
13         revision-date 2012-11-15;
14     }
15         
16     import abstract-topology {
17         prefix "at";
18         revision-date 2013-02-08;
19     }
20
21     organization "OPEN DAYLIGHT";
22     contact "http://www.opendaylight.org/";
23
24     revision "2013-05-03" {
25         reference "http://www.opendaylight.org/";
26     }
27
28     augment "at:topology" {
29         container interfaces {
30             list interface {
31                 key "interface-id";
32
33                 leaf interface-id {
34                     type leafref {
35                         path "/if:interfaces/if:interface/if:name";
36                     }
37                 }
38
39                 leaf-list higher-layer-if {
40                     type leafref {
41                         path "/if:interfaces/if:interface/if:higher-layer-if";
42                     }
43                 }
44             }
45         }
46     }
47
48     augment "at:topology/at:network-links/at:network-link" {
49         container tunnels {
50             list tunnel {
51                 key "tunnel-id";
52
53                 leaf tunnel-id {
54                     type leafref {
55                         path "../../../link-id";
56                     }
57                 }
58                 
59                 container foo {
60                         leaf bar {
61                                 type string;
62                         }
63                 }
64             }
65         }
66     }
67
68     augment "at:topology/at:network-links/at:network-link" {
69         leaf interface {
70                 type leafref {
71                 path "/at:topology/atp:interfaces/atp:interface/atp:interface-id";
72             }
73         }
74     }
75 }