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