blob: 7b55f7131f4bd9c6bb0310edf901798b01b65dca [file] [log] [blame]
Gaurav Agrawalf6e60372016-06-02 11:23:03 +05301 module ietf-sd-onos-service-l3vpn {
2 namespace "urn:ietf:params:xml:ns:yang:ietf-sd-onos-service-l3vpn";
3 prefix l3vpn ;
4 /*
5 import ietf-inet-types{
6 prefix inet;
7 }
8 import ietf-yang-types {
9 prefix yang-types;
10 }
11 */
12 import ietf-sd-onos-service-types {
13 prefix service-types;
14 }
15 import ietf-sd-onos-common-types {
16 prefix types;
17 }
18 organization "";
19 contact "";
20
21 description
22 "L3vpn configuration model in ONOS.";
23
24 revision "2015-12-16" {
25 reference "";
26 }
27
28 grouping l3vpn {
29 description
30 "The configuration module of l3 vpn.";
31 leaf name {
32 type string ;
33 mandatory true;
34 description "name of snc eline." ;
35 }
36 leaf id {
37 type uint32 ;
38 mandatory true;
39 description "ID of snc eline." ;
40 }
41 leaf user-label {
42 type string ;
43 description "user label of snc eline." ;
44 }
45 leaf parent-ncd-id {
46 type string ;
47 description "parent ncd id." ;
48 }
49
50 leaf admin-status {
51 type types:admin-status;
52 description "administration status." ;
53 }
54 leaf operate-status {
55 type types:operate-status;
56 description "operation status." ;
57 }
58
59 uses service-type-grouping;
60 container acess-information {
61 description "access information of the l3 vpn." ;
62
63 uses service-types:l3-ac; }
64
65 container protect-policy{
66 description "L3VPN Service protect policy." ;
67 uses service-types:protect-policy;
68 }
69 container tunnel-service {
70 description "tunnel service." ;
71 uses service-types:tunnel-service;
72 }
73
74 }
75
76 grouping service-type-grouping {
77 description "Basic service type" ;
78 leaf service-topology {
79 type enumeration {
80 enum full-mesh {
81 value 1 ;
82 description "full-mesh." ;
83 }
84 enum hub-spoke {
85 value 2 ;
86 description "hub-spoke." ;
87 }
88 }
89 default full-mesh;
90 description "service topology type." ;
91 }
92 }
93
94 container service {
95 description
96 "Root level of L3vpn service module.";
97 container l3vpn-cfg {
98 description
99 "L3vpn configuration model in ONOS.";
100 list vpn-cfg {
101 key name;
102 description
103 "vpn configuration parameter list.";
104 uses l3vpn;
105 }
106 }
107 container service-paths {
108 description
109 "The service path of the l3 vpn.";
110 }
111 }
112
113
114
115 rpc create-l3vpn-instance {
116 description "Create l3vpn instance." ;
117 input {
118 container l3vpn-instance {
119 description "Create l3vpn instance." ;
120 uses l3vpn;
121 }
122 }
123 }
124
125 rpc delete-l3vpn-instance {
126 description "Delete l3vpn instance." ;
127 input {
128 leaf l3vpn-id {
129 type string;
130 description "vpn id." ;
131 }
132 }
133 }
134
135 rpc close-l3vpn {
136 description "Close l3vpn." ;
137 input {
138 leaf l3vpn-id {
139 type string;
140 description "vpn id." ;
141 }
142 container ac-status {
143 description "Access status of the vpn." ;
144 list acs{
145 key "id";
146 description "Access information." ;
147 leaf id {
148 type string;
149 description "Access id." ;
150 }
151 leaf admin-status {
152 type types:admin-status;
153 description "Administration status." ;
154 }
155 }
156 }
157 }
158 }
159
160 rpc modify-l3vpn-instance-basic {
161 description "Modify l3vpn instance basic information." ;
162 input {
163 leaf l3vpn-id {
164 type string;
165 description "vpn id." ;
166 }
167 leaf user-label {
168 type string ;
169 description "user label." ;
170 }
171 }
172 }
173
174 rpc modify-l3vpn-instance-ac-qos {
175 description "Modify l3vpn instance ac qos information." ;
176 input {
177 leaf l3vpn-id {
178 type string;
179 description "L3vpn ID." ;
180 }
181 container ac-qos {
182 description "ac qos information." ;
183 list acs{
184 key "id";
185 description "acs list." ;
186 leaf id {
187 type string;
188 description "acs ID." ;
189 }
190 container qos-policy {
191 description "qos policy." ;
192 container qos-if-cars {
193 description "cars qos policy." ;
194 uses service-types:qos-if-car;
195
196 }
197 }
198 }
199 }
200 }
201 }
202 rpc modify-l3vpn-instance-connection {
203 description "Modify a l3vpn connection." ;
204 input {
205 leaf l3vpn-id {
206 type string;
207 description "L3vpn ID." ;
208 }
209 container ac-connection {
210 description "ac connection." ;
211 list acs{
212 key "id";
213 description "acs ID." ;
214 leaf id {
215 type string ;
216 description "acs ID." ;
217 }
218 container connection {
219 description "CE to PE connection." ;
220 uses service-types:connection;
221 }
222 }
223 }
224 }
225 }
226 rpc inquire-l3vpn-instance-work-path {
227 description "Inquire a L3VPN instance work path." ;
228 input {
229 leaf service-id {
230 type string;
231 description "service ID." ;
232 }
233 leaf ingress-ne-id {
234 type string ;
235 description "ingress network element ID." ;
236 }
237 leaf destination-ne-id {
238 type string ;
239 description "destination network element ID." ;
240 }
241 leaf ingress-ac-id {
242 type string ;
243 description "ingress ac ID." ;
244 }
245 leaf destination-ac-id {
246 type string ;
247 description "destination ac ID." ;
248 }
249 leaf path-layer {
250 type string ;
251 description "path layer." ;
252 }
253 leaf path-role {
254 type string ;
255 description "path role." ;
256 }
257 }
258 output {
259 container service-path {
260 description "service path." ;
261 leaf service-id {
262 type string;
263 description "service ID." ;
264 }
265 leaf ingress-ne-id {
266 type string ;
267 description "ingress network element ID." ;
268 }
269 leaf destination-ne-id {
270 type string ;
271 description "destination network element ID." ;
272 }
273 leaf ingress-ac-id {
274 type string ;
275 description "ingress access circuit ID." ;
276 }
277 leaf destination-ac-id {
278 type string ;
279 description "destination access circuit ID." ;
280 }
281 leaf path-layer {
282 type string ;
283 description "path layer." ;
284 }
285 leaf path-role {
286 type string ;
287 description "path role." ;
288 }
289 list path-list {
290 key "ne-id";
291 description "path list." ;
292 leaf ne-id {
293 type string;
294 description "network element ID." ;
295 }
296 leaf ingress-ltp-id {
297 type string;
298 description "LTP ID." ;
299 }
300 leaf backward-peer-id {
301 type string;
302 description "backward peer ID." ;
303 }
304 leaf egress-ltp-id {
305 type string;
306 description "egress ltp ID." ;
307 }
308 leaf forward-peer-id {
309 type string;
310 description "forward peer ID." ;
311 }
312 }
313 }
314 }
315 }
316 }