blob: 5f03d552c99c70cc7f213cad589a47cdeadd4ff5 [file] [log] [blame]
hiroki4ecc8712018-05-08 13:23:37 -07001module openconfig-transport-line-common {
2
3 yang-version "1";
4
5 // namespace
6 namespace "http://openconfig.net/yang/transport-line-common";
7
8 prefix "oc-line-com";
9
10 // import some basic types
11 import openconfig-platform {
12 prefix oc-platform;
13 revision-date "2016-06-06";
14 }
15 import openconfig-platform-types {
16 prefix oc-platform-types;
17 revision-date "2016-06-06";
18 }
19 import openconfig-interfaces {
20 prefix oc-if;
21 revision-date "2016-05-26";
22 }
23 import iana-if-type {
24 prefix ift;
25 revision-date "2016-11-23";
26 }
27 import openconfig-extensions {
28 prefix oc-ext;
29 revision-date "2015-10-09";
30 }
31
32 // import tailf-common {prefix "tailf";}
33 // tailf:export netconf;
34 // tailf:export rest;
35
36 // meta
37 organization "OpenConfig working group";
38
39 contact
40 "OpenConfig working group
41 www.openconfig.net";
42
43 description
44 "This module defines common data elements for OpenConfig data
45 models for optical transport line system elements, such as
46 amplifiers and ROADMs (wavelength routers).";
47
48 oc-ext:openconfig-version "0.1.0";
49
50 revision "2016-03-31" {
51 description
52 "Initial public release";
53 reference "0.1.0";
54 }
55
56
57 // extension statements
58
59 // feature statements
60
61 // identity statements
62
63 identity OPTICAL_LINE_PORT_TYPE {
64 description
65 "Type definition for optical node port types";
66 }
67
68 identity INGRESS {
69 base OPTICAL_LINE_PORT_TYPE;
70 description
71 "Ingress port, corresponding to a signal entering
72 a line device such as an amplifier or wavelength
73 router.";
74 }
75
76 identity EGRESS {
77 base OPTICAL_LINE_PORT_TYPE;
78 description
79 "Egress port, corresponding to a signal exiting
80 a line device wavelength router.";
81 }
82
83 identity ADD {
84 base OPTICAL_LINE_PORT_TYPE;
85 description
86 "Add port, corresponding to a signal injected
87 at a wavelength router.";
88 }
89
90 identity DROP {
91 base OPTICAL_LINE_PORT_TYPE;
92 description
93 "Drop port, corresponding to a signal dropped
94 at a wavelength router.";
95 }
96
97 // typedef statements
98
99 // grouping statements
100
101 grouping optical-osc-config {
102 description
103 "Configuration data for OSC interfaces";
104
105 leaf-list interface {
106 type oc-if:base-interface-ref;
107 description
108 "List of references to OSC interfaces";
109 }
110 }
111
112 grouping optical-osc-state {
113 description
114 "Operational state data for OSC interfaces";
115 }
116
117
118
119 grouping optical-osc-top {
120 description
121 "Top-level grouping for configuration and operational state
122 data for optical supervisory channels (OSC) for amplifiers,
123 WSS/ROADM, nodes, etc.";
124
125 container supervisory-channels {
126 description
127 "Top-level container for OSC data";
128
129 container config {
130 description
131 "Configuration data for OSCs";
132
133 uses optical-osc-config;
134 }
135
136 container state {
137
138 config false;
139
140 description
141 "Operational state data for OSCs";
142
143 uses optical-osc-config;
144 uses optical-osc-state;
145 }
146 }
147 }
148
149
150 grouping transport-line-common-port-config {
151 description
152 "Configuration data for optical line ports";
153 }
154
155 grouping transport-line-common-port-state {
156 description
157 "Operational state data describing optical line ports";
158
159 leaf optical-port-type {
160 type identityref {
161 base OPTICAL_LINE_PORT_TYPE;
162 }
163 description
164 "Indicates the type of transport line port. This is an
165 informational field that should be made available by the
166 device (e.g., in the openconfig-platform model).";
167 }
168 }
169
170 grouping transport-line-common-port-top {
171 description
172 "Top-level grouping ";
173
174 container optical-port {
175 description
176 "Top-level container ";
177
178 container state {
179
180 config false;
181
182 description
183 "Operational state data for optical line ports";
184
185 uses transport-line-common-port-config;
186 uses transport-line-common-port-state;
187 }
188 }
189 }
190
191
192
193 // data definition statements
194
195 // uses optical-osc-top;
196
197 // augment statements
198/*
199 augment "/oc-platform:components/oc-platform:component" {
200 description
201 "Adding optical line port data to platform model";
202
203 uses transport-line-common-port-top {
204 when "/oc-platform:components/oc-platform:component/" +
205 "oc-platform:state/oc-platform:type = 'oc-platform-types:PORT'" {
206 description
207 "Augment is active when component is of type
208 PORT";
209 }
210 }
211 }
212*/
213 //TODO:this is placeholder until SONET model is added
214 //to interfaces model
215/* augment "/oc-if:interfaces/oc-if:interface" {
216 when "oc-if:type = 'ift:sonet'" {
217 description "Additional interface configuration parameters when
218 the interface type is SONET/SDH";
219 }
220 description "Adds additional SONET/SDH-specific data to
221 osc model";
222
223 container sonet {
224 description
225 "Data related to SONET/SDH interfaces";
226 }
227 }
228*/
229 // rpc statements
230
231 // notification statements
232
233}