4 * Copyright 2017 RIFT.IO Inc
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
10 * http://www.apache.org/licenses/LICENSE-2.0
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.
23 namespace "http://riftio.com/ns/riftware-1.0/project-nsd";
26 import ietf-yang-types {
35 prefix "project-vnfd";
49 "Initial revision. This YANG file defines
50 the Network Service Descriptor (NSD)
53 "Derived from earlier versions of base YANG files";
57 grouping nsd-constituent-vnfd {
58 list constituent-vnfd {
60 "List of VNFDs that are part of this
63 key "member-vnf-index";
65 leaf member-vnf-index {
67 "Identifier/index for the VNFD. This separate id
68 is required to ensure that multiple VNFs can be
75 "Identifier for the VNFD.";
77 path "/rw-project:project[rw-project:name = current()/../../../../rw-project:name]" +
78 "/project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
82 leaf start-by-default {
84 "VNFD is started as part of the NS instantiation";
91 grouping nsr-nsd-constituent-vnfd {
92 list constituent-vnfd {
94 "List of VNFDs that are part of this
97 key "member-vnf-index";
99 leaf member-vnf-index {
101 "Identifier/index for the VNFD. This separate id
102 is required to ensure that multiple VNFs can be
109 "Identifier for the VNFD.";
111 path "/rw-project:project[rw-project:name = current()/../../../../../rw-project:name]" +
112 "/project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
116 leaf start-by-default {
118 "VNFD is started as part of the NS instantiation";
130 uses nsd-base:nsd-vld-common;
132 list vnfd-connection-point-ref {
134 "A list of references to connection points.";
135 key "member-vnf-index-ref vnfd-connection-point-ref";
137 leaf member-vnf-index-ref {
138 description "Reference to member-vnf within constituent-vnfds";
140 path "../../../constituent-vnfd/member-vnf-index";
146 "A reference to a vnfd. This is a
148 ../../constituent-vnfd
149 + [id = current()/../id-ref]
151 NOTE: An issue with confd is preventing the
152 use of xpath. Seems to be an issue with leafref
153 to leafref, whose target is in a different module.
154 Once that is resolved this will switched to use
158 path "../../../constituent-vnfd[member-vnf-index = current()/../member-vnf-index-ref]/vnfd-id-ref";
162 leaf vnfd-connection-point-ref {
163 description "A reference to a connection point name";
165 path "../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd" +
166 "[project-vnfd:id = current()/../vnfd-id-ref]/" +
167 "project-vnfd:connection-point/project-vnfd:name";
174 grouping nsr-nsd-vld {
179 uses nsd-base:nsd-vld-common;
181 list vnfd-connection-point-ref {
183 "A list of references to connection points.";
184 key "member-vnf-index-ref vnfd-connection-point-ref";
186 leaf member-vnf-index-ref {
187 description "Reference to member-vnf within constituent-vnfds";
190 path "../../../constituent-vnfd/member-vnf-index";
196 "A reference to a vnfd. This is a
198 ../../nsd:constituent-vnfd
199 + [nsd:id = current()/../nsd:id-ref]
201 NOTE: An issue with confd is preventing the
202 use of xpath. Seems to be an issue with leafref
203 to leafref, whose target is in a different module.
204 Once that is resolved this will switched to use
209 leaf vnfd-connection-point-ref {
210 description "A reference to a connection point name";
212 path "../../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd" +
213 "[project-vnfd:id = current()/../vnfd-id-ref]/" +
214 "project-vnfd:connection-point/project-vnfd:name";
221 grouping nsd-vnf-dependency {
222 list vnf-dependency {
224 "List of VNF dependencies.";
226 leaf vnf-source-ref {
228 path "../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
231 leaf vnf-depends-on-ref {
233 "Reference to VNF that sorce VNF depends.";
235 path "../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
241 grouping nsr-nsd-vnf-dependency {
242 list vnf-dependency {
244 "List of VNF dependencies.";
246 leaf vnf-source-ref {
248 path "../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
251 leaf vnf-depends-on-ref {
253 "Reference to VNF that sorce VNF depends.";
255 path "../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
261 grouping nsd-placement-groups {
262 list placement-groups {
263 description "List of placement groups at NS level";
266 uses manotypes:placement-group-info;
270 "List of VNFDs that are part of this placement group";
272 key "member-vnf-index-ref";
274 leaf member-vnf-index-ref {
275 description "member VNF index of this member VNF";
277 path "../../../constituent-vnfd/member-vnf-index";
283 "Identifier for the VNFD.";
285 path "../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
292 grouping nsr-nsd-placement-groups {
293 list placement-groups {
294 description "List of placement groups at NS level";
297 uses manotypes:placement-group-info;
301 "List of VNFDs that are part of this placement group";
303 key "member-vnf-index-ref";
305 leaf member-vnf-index-ref {
306 description "member VNF index of this member VNF";
308 path "../../../constituent-vnfd/member-vnf-index";
314 "Identifier for the VNFD.";
316 path "../../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
323 grouping nsd-monitoring-param {
325 list monitoring-param {
328 uses nsd-base:monitoring-param-common;
330 list vnfd-monitoring-param {
331 description "A list of VNFD monitoring params";
332 key "member-vnf-index-ref vnfd-monitoring-param-ref";
336 "A reference to a vnfd. This is a
338 ../../../../nsd:constituent-vnfd
339 + [nsd:id = current()/../nsd:id-ref]
341 NOTE: An issue with confd is preventing the
342 use of xpath. Seems to be an issue with leafref
343 to leafref, whose target is in a different module.
344 Once that is resolved this will switched to use
348 path "../../../constituent-vnfd" +
349 "[member-vnf-index = current()/../member-vnf-index-ref]" +
354 leaf vnfd-monitoring-param-ref {
355 description "A reference to the VNFD monitoring param";
357 path "../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd"
358 + "[project-vnfd:id = current()/../vnfd-id-ref]"
359 + "/project-vnfd:monitoring-param/project-vnfd:id";
363 leaf member-vnf-index-ref {
365 "Optional reference to member-vnf within constituent-vnfds";
367 path "../../../constituent-vnfd/member-vnf-index";
374 grouping nsr-nsd-monitoring-param {
375 list monitoring-param {
378 uses nsd-base:monitoring-param-common;
380 list vnfd-monitoring-param {
381 description "A list of VNFD monitoring params";
382 key "member-vnf-index-ref vnfd-monitoring-param-ref";
386 "A reference to a vnfd. This is a
388 ../../../../nsd:constituent-vnfd
389 + [nsd:id = current()/../nsd:id-ref]
391 NOTE: An issue with confd is preventing the
392 use of xpath. Seems to be an issue with leafref
393 to leafref, whose target is in a different module.
394 Once that is resolved this will switched to use
400 leaf vnfd-monitoring-param-ref {
401 description "A reference to the VNFD monitoring param";
403 path "../../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd"
404 + "[project-vnfd:id = current()/../vnfd-id-ref]"
405 + "/project-vnfd:monitoring-param/project-vnfd:id";
409 leaf member-vnf-index-ref {
411 "Optional reference to member-vnf within constituent-vnfds";
413 path "../../../constituent-vnfd/member-vnf-index";
420 grouping nsd-service-primitive {
421 list service-primitive {
423 "Network service level service primitives.";
429 "Name of the service primitive.";
435 "List of parameters for the service primitive.";
438 uses manotypes:primitive-parameter;
441 uses manotypes:ui-primitive-group;
443 list vnf-primitive-group {
445 "List of service primitives grouped by VNF.";
447 key "member-vnf-index-ref";
448 leaf member-vnf-index-ref {
450 "Reference to member-vnf within constituent-vnfds";
452 path "../../../constituent-vnfd/member-vnf-index";
458 "A reference to a vnfd. This is a leafref";
461 path "../../../constituent-vnfd" +
462 "[member-vnf-index = current()/../member-vnf-index-ref]" + "/vnfd-id-ref";
470 path "../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd"
471 + "[project-vnfd:id = current()/../vnfd-id-ref]"
472 + "/project-vnfd:name";
480 description "Index of this primitive";
485 description "Name of the primitive in the VNF primitive ";
491 leaf user-defined-script {
493 "A user defined script.";
499 grouping nsr-nsd-service-primitive {
500 list service-primitive {
502 "Network service level service primitives.";
508 "Name of the service primitive.";
514 "List of parameters for the service primitive.";
517 uses manotypes:primitive-parameter;
520 uses manotypes:ui-primitive-group;
522 list vnf-primitive-group {
524 "List of service primitives grouped by VNF.";
526 key "member-vnf-index-ref";
527 leaf member-vnf-index-ref {
529 "Reference to member-vnf within constituent-vnfds";
531 path "../../../constituent-vnfd/member-vnf-index";
537 "A reference to a vnfd. This is a leafref";
540 path "../../../constituent-vnfd" +
541 "[member-vnf-index = current()/../member-vnf-index-ref]" + "/vnfd-id-ref";
549 path "../../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd"
550 + "[project-vnfd:id = current()/../vnfd-id-ref]"
551 + "/project-vnfd:name";
559 description "Index of this primitive";
564 description "Name of the primitive in the VNF primitive ";
570 leaf user-defined-script {
572 "A user defined script.";
578 grouping nsd-descriptor {
579 uses nsd-base:nsd-descriptor-common;
583 uses nsd-constituent-vnfd;
585 uses nsd-placement-groups;
587 uses nsd-vnf-dependency;
589 uses nsd-monitoring-param;
591 uses nsd-service-primitive;
594 augment "/rw-project:project" {
595 container nsd-catalog {