blob: 19aebe9f9c4475c24a91c34f4b2f718590157967 [file] [log] [blame]
velandy793e5ea2017-06-07 13:01:55 -04001
2/*
3 *
Rajesh Velandye27e0b22017-09-18 17:21:48 -04004 * Copyright 2016-2017 RIFT.IO Inc
velandy793e5ea2017-06-07 13:01:55 -04005 *
6 * Licensed under the Apache License, Version 2.0 (the "License");
7 * you may not use this file except in compliance with the License.
8 * You may obtain a copy of the License at
9 *
10 * http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing, software
13 * distributed under the License is distributed on an "AS IS" BASIS,
14 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15 * See the License for the specific language governing permissions and
16 * limitations under the License.
17 *
18 *
19 */
20
21module nsd
22{
23 namespace "urn:ietf:params:xml:ns:yang:nfvo:nsd";
24 prefix "nsd";
25
velandy793e5ea2017-06-07 13:01:55 -040026 import vnfd {
27 prefix "vnfd";
28 }
29
Rajesh Velandye27e0b22017-09-18 17:21:48 -040030 import nsd-base {
31 prefix "nsd-base";
velandy793e5ea2017-06-07 13:01:55 -040032 }
33
velandy793e5ea2017-06-07 13:01:55 -040034 import mano-types {
35 prefix "manotypes";
36 }
37
garciadeblas1edb98c2017-12-05 13:47:09 +010038 import ietf-inet-types {
39 prefix "inet";
40 }
41
Rajesh Velandye27e0b22017-09-18 17:21:48 -040042 revision 2017-02-28 {
43 description
44 "Update model to support projects.";
45 }
46
velandy793e5ea2017-06-07 13:01:55 -040047 revision 2014-10-27 {
48 description
49 "Initial revision. This YANG file defines
50 the Network Service Descriptor (NSD)";
51 reference
52 "Derived from earlier versions of base YANG files";
53 }
54
Rajesh Velandye27e0b22017-09-18 17:21:48 -040055 grouping nsd-constituent-vnfd {
56 list constituent-vnfd {
velandy793e5ea2017-06-07 13:01:55 -040057 description
Rajesh Velandye27e0b22017-09-18 17:21:48 -040058 "List of VNFDs that are part of this
59 network service.";
velandy793e5ea2017-06-07 13:01:55 -040060
Rajesh Velandye27e0b22017-09-18 17:21:48 -040061 key "member-vnf-index";
velandy793e5ea2017-06-07 13:01:55 -040062
Rajesh Velandye27e0b22017-09-18 17:21:48 -040063 leaf member-vnf-index {
velandy793e5ea2017-06-07 13:01:55 -040064 description
Rajesh Velandye27e0b22017-09-18 17:21:48 -040065 "Identifier/index for the VNFD. This separate id
66 is required to ensure that multiple VNFs can be
67 part of single NS";
garciadeblas90117122017-12-05 16:00:47 +010068 type string;
velandy793e5ea2017-06-07 13:01:55 -040069 }
70
Rajesh Velandye27e0b22017-09-18 17:21:48 -040071 leaf vnfd-id-ref {
velandy793e5ea2017-06-07 13:01:55 -040072 description
Rajesh Velandye27e0b22017-09-18 17:21:48 -040073 "Identifier for the VNFD.";
74 type leafref {
75 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
76 }
77 }
78
79 leaf start-by-default {
80 description
81 "VNFD is started as part of the NS instantiation";
82 type boolean;
83 default true;
velandy793e5ea2017-06-07 13:01:55 -040084 }
85 }
Rajesh Velandye27e0b22017-09-18 17:21:48 -040086 }
velandy793e5ea2017-06-07 13:01:55 -040087
Rajesh Velandye27e0b22017-09-18 17:21:48 -040088 grouping nsd-vld {
velandy793e5ea2017-06-07 13:01:55 -040089 list vld {
velandy793e5ea2017-06-07 13:01:55 -040090
91 key "id";
92
Rajesh Velandye27e0b22017-09-18 17:21:48 -040093 uses nsd-base:nsd-vld-common;
velandy793e5ea2017-06-07 13:01:55 -040094
95 list vnfd-connection-point-ref {
96 description
97 "A list of references to connection points.";
98 key "member-vnf-index-ref vnfd-connection-point-ref";
99
100 leaf member-vnf-index-ref {
101 description "Reference to member-vnf within constituent-vnfds";
102 type leafref {
103 path "../../../constituent-vnfd/member-vnf-index";
104 }
105 }
106
garciadeblas1edb98c2017-12-05 13:47:09 +0100107 leaf vnfd-connection-point-ref {
108 description "A reference to a connection point name";
109 type leafref {
110 path "/vnfd:vnfd-catalog/vnfd:vnfd" +
111 "[vnfd:id = current()/../vnfd-id-ref]/" +
112 "vnfd:connection-point/vnfd:name";
113 }
114 }
115
velandy793e5ea2017-06-07 13:01:55 -0400116 leaf vnfd-id-ref {
117 description
118 "A reference to a VNFD";
119 type leafref {
120 path "../../../constituent-vnfd" +
121 "[member-vnf-index = current()/../member-vnf-index-ref]" +
122 "/vnfd-id-ref";
123 }
124 }
125
garciadeblas1edb98c2017-12-05 13:47:09 +0100126 leaf ip-address {
127 description "IP address of the connection point";
128 type inet:ip-address;
velandy793e5ea2017-06-07 13:01:55 -0400129 }
garciadeblas1edb98c2017-12-05 13:47:09 +0100130
velandy793e5ea2017-06-07 13:01:55 -0400131 }
velandy793e5ea2017-06-07 13:01:55 -0400132 }
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400133 }
velandy793e5ea2017-06-07 13:01:55 -0400134
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400135 grouping nsd-vnf-dependency {
136 list vnf-dependency {
velandy793e5ea2017-06-07 13:01:55 -0400137 description
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400138 "List of VNF dependencies.";
139 key vnf-source-ref;
140 leaf vnf-source-ref {
velandy793e5ea2017-06-07 13:01:55 -0400141 type leafref {
142 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
143 }
144 }
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400145 leaf vnf-depends-on-ref {
velandy793e5ea2017-06-07 13:01:55 -0400146 description
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400147 "Reference to VNF that sorce VNF depends.";
148 type leafref {
149 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
velandy793e5ea2017-06-07 13:01:55 -0400150 }
151 }
152 }
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400153 }
velandy793e5ea2017-06-07 13:01:55 -0400154
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400155 grouping nsd-placement-groups {
velandy793e5ea2017-06-07 13:01:55 -0400156 list placement-groups {
157 description "List of placement groups at NS level";
158
159 key "name";
160 uses manotypes:placement-group-info;
161
162 list member-vnfd {
163 description
164 "List of VNFDs that are part of this placement group";
165
166 key "member-vnf-index-ref";
167
168 leaf member-vnf-index-ref {
169 description "Member VNF index of this member VNF";
170 type leafref {
171 path "../../../constituent-vnfd/member-vnf-index";
172 }
173 }
174
175 leaf vnfd-id-ref {
176 description
177 "Identifier for the VNFD.";
178 type leafref {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400179 path "../../../constituent-vnfd" +
velandy793e5ea2017-06-07 13:01:55 -0400180 "[member-vnf-index = current()/../member-vnf-index-ref]" +
181 "/vnfd-id-ref";
182 }
183 }
184 }
185 }
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400186 }
velandy793e5ea2017-06-07 13:01:55 -0400187
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400188 grouping nsd-monitoring-param {
velandy793e5ea2017-06-07 13:01:55 -0400189
190 list monitoring-param {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400191 key id;
velandy793e5ea2017-06-07 13:01:55 -0400192
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400193 uses nsd-base:monitoring-param-common;
velandy793e5ea2017-06-07 13:01:55 -0400194
195 list vnfd-monitoring-param {
196 description "A list of VNFD monitoring params";
197 key "member-vnf-index-ref vnfd-monitoring-param-ref";
198
199 leaf vnfd-id-ref {
200 description
201 "A reference to a VNFD. This is a leafref";
202
203 type leafref {
204 path "../../../constituent-vnfd" +
205 "[member-vnf-index = current()/../member-vnf-index-ref]" +
206 "/vnfd-id-ref";
207 }
208 }
209
210 leaf vnfd-monitoring-param-ref {
211 description "A reference to the VNFD monitoring param";
212 type leafref {
213 path "/vnfd:vnfd-catalog/vnfd:vnfd"
214 + "[vnfd:id = current()/../vnfd-id-ref]"
215 + "/vnfd:monitoring-param/vnfd:id";
216 }
217 }
218
219 leaf member-vnf-index-ref {
220 description
221 "Mandatory reference to member-vnf within constituent-vnfds";
222 type leafref {
223 path "../../../constituent-vnfd/member-vnf-index";
224 }
225 }
226 }
227 }
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400228 }
velandy793e5ea2017-06-07 13:01:55 -0400229
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400230 grouping nsd-service-primitive {
231 list service-primitive {
velandy793e5ea2017-06-07 13:01:55 -0400232 description
233 "Network service level service primitives.";
234
235 key "name";
236
237 leaf name {
238 description
239 "Name of the service primitive.";
240 type string;
241 }
242
243 list parameter {
244 description
245 "List of parameters for the service primitive.";
246
247 key "name";
248 uses manotypes:primitive-parameter;
249 }
250
251 uses manotypes:ui-primitive-group;
252
253 list vnf-primitive-group {
254 description
255 "List of service primitives grouped by VNF.";
256
257 key "member-vnf-index-ref";
258 leaf member-vnf-index-ref {
259 description
260 "Reference to member-vnf within constituent-vnfds";
261 type leafref {
262 path "../../../constituent-vnfd/member-vnf-index";
263 }
264 }
265
266 leaf vnfd-id-ref {
267 description
268 "A reference to a VNFD. This is a leafref";
269
270 type leafref {
271 path "../../../constituent-vnfd" +
272 "[member-vnf-index = current()/../member-vnf-index-ref]" + "/vnfd-id-ref";
273 }
274 }
275
276 leaf vnfd-name {
277 description
278 "Name of the VNFD";
279 type leafref {
280 path "/vnfd:vnfd-catalog/vnfd:vnfd"
281 + "[vnfd:id = current()/../vnfd-id-ref]"
282 + "/vnfd:name";
283 }
284 }
285
286 list primitive {
287 key "index";
288
289 leaf index {
290 description "Index of this primitive";
291 type uint32;
292 }
293
294 leaf name {
295 description "Name of the primitive in the VNF primitive ";
296 type string;
297 }
298 }
299 }
300
301 leaf user-defined-script {
302 description
303 "A user defined script.";
304 type string;
305 }
306 }
velandy793e5ea2017-06-07 13:01:55 -0400307 }
308
velandy793e5ea2017-06-07 13:01:55 -0400309 container nsd-catalog {
310
garciadeblas781fe342017-12-18 11:34:47 +0100311 leaf schema-version {
312 description "Schema version for the NSD. If unspecified, it assumes v3.0";
313 type string;
314 default "v3.0";
315 }
316
velandy793e5ea2017-06-07 13:01:55 -0400317 list nsd {
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400318 key id;
velandy793e5ea2017-06-07 13:01:55 -0400319
Rajesh Velandye27e0b22017-09-18 17:21:48 -0400320 uses nsd-base:nsd-descriptor-common;
321
322 uses nsd-vld;
323
324 uses nsd-constituent-vnfd;
325
326 uses nsd-placement-groups;
327
328 uses nsd-vnf-dependency;
329
330 uses nsd-monitoring-param;
331
332 uses nsd-service-primitive;
velandy793e5ea2017-06-07 13:01:55 -0400333 }
334 }
velandy793e5ea2017-06-07 13:01:55 -0400335}