Adjust test suite parser update to conform with API changes
[yangtools.git] / yang / yang-parser-rfc7950 / src / test / resources / semantic-statement-parser / two-revisions / isis-topology@2013-07-12.yang
1 module isis-topology {
2         yang-version 1;
3         namespace "urn:TBD:params:xml:ns:yang:network:isis-topology";
4         // replace with IANA namespace when assigned
5         prefix "isis";
6         import network-topology {
7             prefix nt;
8             revision-date 2013-07-12;
9         }
10         import l3-unicast-igp-topology {
11                 prefix igp;
12                 revision-date 2013-07-12;
13         }
14         import ted {
15                 prefix ted;
16                 revision-date 2013-07-12;
17         }
18         
19         organization "TBD";
20         contact "TBD";
21         description "ISIS Topology model";
22
23         revision "2013-07-12" {
24                 description "Initial version";
25         }
26     typedef iso-system-id {
27         description "ISO System ID. RFC 1237";
28         type string {
29             pattern '[0-9a-fA-F]{4}(.[0-9a-fA-F]{4}){2}';
30         }
31     }
32
33     typedef iso-pseudonode-id {
34         description "ISO pseudonode id for broadcast network";
35         type string {
36             pattern '[0-9a-fA-F]{2}';
37         }
38     }
39
40         typedef iso-net-id {
41         description "ISO NET ID. RFC 1237";
42         type string {
43             pattern '[0-9a-fA-F]{2}((.[0-9a-fA-F]{4}){6})';
44         }
45     }
46
47         grouping isis-topology-type {
48             container isis {
49                 presence "Indicates ISIS Topology";
50             }
51         }
52
53         augment "/nt:network-topology/nt:topology/nt:topology-types/igp:l3-unicast-igp-topology" {
54             uses isis-topology-type;
55         }
56
57         augment "/nt:network-topology/nt:topology/igp:igp-topology-attributes" {
58             when "../../topology-types/isis";
59             container isis-topogloy-attributes {
60                     leaf net {
61                         type iso-net-id;
62                     }
63             }
64         }
65
66         augment "/nt:network-topology/nt:topology/nt:node/igp:igp-node-attributes" {
67             when "../../../topology-types/isis";
68             uses isis-node-attributes;
69         }
70
71         augment "/nt:network-topology/nt:topology/nt:link/igp:igp-link-attributes" {
72             when "../../../../topology-types/isis";
73             uses isis-link-attributes;
74         }
75
76         grouping isis-node-attributes {
77                 container isis-node-attributes {
78                         container iso {
79                                 leaf iso-system-id {
80                                         type iso-system-id;
81                                 }
82                                 leaf iso-pseudonode-id {
83                                         default "0";
84                                         type iso-pseudonode-id;
85                                 }
86             }
87             leaf-list net {
88                 max-elements 3;
89                 type iso-net-id;
90             }
91             leaf-list multi-topology-id {
92                 description "List of Multi Topology Identifier upto 128 (0-127). RFC 4915";
93                 max-elements "128";
94                 type uint8 {
95                         range "0..127";
96                 }
97             }
98             choice router-type {
99                 case level-2 {
100                         leaf level-2 {
101                         type empty;
102                         }
103                 }
104                 case level-1 {
105                     leaf level-1 {
106                         type empty;
107                         }
108                 }
109                 case level-1-2 {
110                     leaf level-1-2 {
111                         type empty;
112                     }
113                 }
114                 }
115                         container ted {
116                             uses ted:ted-node-attributes;
117                         }
118                 }
119         }
120
121         grouping isis-link-attributes {
122                 container isis-link-attributes {
123                         leaf multi-topology-id {
124                                 type uint8 {
125                                         range "0..127";
126                                 }
127                         }
128                         container ted {
129                             uses ted:ted-link-attributes;       
130                         }
131                 }
132         }
133         /*
134         augment "/igp:igp-node-event" {
135                 uses isis-topology-type;
136                 uses isis-node-attributes;
137         }
138
139         augment "/igp:igp-link-event" {
140                 uses isis-topology-type;
141                 uses isis-link-attributes;
142         }*/
143 } // Module isis-topology