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 "../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
81 leaf start-by-default {
83 "VNFD is started as part of the NS instantiation";
90 grouping nsr-nsd-constituent-vnfd {
91 list constituent-vnfd {
93 "List of VNFDs that are part of this
96 key "member-vnf-index";
98 leaf member-vnf-index {
100 "Identifier/index for the VNFD. This separate id
101 is required to ensure that multiple VNFs can be
108 "Identifier for the VNFD.";
110 path "../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
114 leaf start-by-default {
116 "VNFD is started as part of the NS instantiation";
128 uses nsd-base:nsd-vld-common;
130 list vnfd-connection-point-ref {
132 "A list of references to connection points.";
133 key "member-vnf-index-ref vnfd-connection-point-ref";
135 leaf member-vnf-index-ref {
136 description "Reference to member-vnf within constituent-vnfds";
137 // TODO (Philip): RIFT-15639
139 // 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 resovled this will switched to use
159 leaf vnfd-connection-point-ref {
160 description "A reference to a connection point name";
162 path "../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd" +
163 "[project-vnfd:id = current()/../vnfd-id-ref]/" +
164 "project-vnfd:connection-point/project-vnfd:name";
171 grouping nsr-nsd-vld {
176 uses nsd-base:nsd-vld-common;
178 list vnfd-connection-point-ref {
180 "A list of references to connection points.";
181 key "member-vnf-index-ref vnfd-connection-point-ref";
183 leaf member-vnf-index-ref {
184 description "Reference to member-vnf within constituent-vnfds";
187 path "../../../constituent-vnfd/member-vnf-index";
193 "A reference to a vnfd. This is a
195 ../../nsd:constituent-vnfd
196 + [nsd:id = current()/../nsd:id-ref]
198 NOTE: An issue with confd is preventing the
199 use of xpath. Seems to be an issue with leafref
200 to leafref, whose target is in a different module.
201 Once that is resovled this will switched to use
206 leaf vnfd-connection-point-ref {
207 description "A reference to a connection point name";
209 path "../../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd" +
210 "[project-vnfd:id = current()/../vnfd-id-ref]/" +
211 "project-vnfd:connection-point/project-vnfd:name";
218 grouping nsd-vnf-dependency {
219 list vnf-dependency {
221 "List of VNF dependencies.";
223 leaf vnf-source-ref {
225 path "../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
228 leaf vnf-depends-on-ref {
230 "Reference to VNF that sorce VNF depends.";
232 path "../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
238 grouping nsr-nsd-vnf-dependency {
239 list vnf-dependency {
241 "List of VNF dependencies.";
243 leaf vnf-source-ref {
245 path "../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
248 leaf vnf-depends-on-ref {
250 "Reference to VNF that sorce VNF depends.";
252 path "../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
258 grouping nsd-placement-groups {
259 list placement-groups {
260 description "List of placement groups at NS level";
263 uses manotypes:placement-group-info;
267 "List of VNFDs that are part of this placement group";
269 key "member-vnf-index-ref";
271 leaf member-vnf-index-ref {
272 description "member VNF index of this member VNF";
273 // TODO (Philip): RIFT-15639
275 // path "../../../constituent-vnfd/member-vnf-index";
282 "Identifier for the VNFD.";
284 path "../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
291 grouping nsr-nsd-placement-groups {
292 list placement-groups {
293 description "List of placement groups at NS level";
296 uses manotypes:placement-group-info;
300 "List of VNFDs that are part of this placement group";
302 key "member-vnf-index-ref";
304 leaf member-vnf-index-ref {
305 description "member VNF index of this member VNF";
306 // TODO (Philip): RIFT-15639
308 // path "../../../constituent-vnfd/member-vnf-index";
315 "Identifier for the VNFD.";
317 path "../../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd/project-vnfd:id";
324 grouping nsd-monitoring-param {
326 list monitoring-param {
329 uses nsd-base:monitoring-param-common;
331 list vnfd-monitoring-param {
332 description "A list of VNFD monitoring params";
333 key "vnfd-id-ref vnfd-monitoring-param-ref";
337 "A reference to a vnfd. This is a
339 ../../../../nsd:constituent-vnfd
340 + [nsd:id = current()/../nsd:id-ref]
342 NOTE: An issue with confd is preventing the
343 use of xpath. Seems to be an issue with leafref
344 to leafref, whose target is in a different module.
345 Once that is resolved this will switched to use
351 leaf vnfd-monitoring-param-ref {
352 description "A reference to the VNFD monitoring param";
354 path "../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd"
355 + "[project-vnfd:id = current()/../vnfd-id-ref]"
356 + "/project-vnfd:monitoring-param/project-vnfd:id";
360 leaf member-vnf-index-ref {
362 "Optional reference to member-vnf within constituent-vnfds";
364 path "../../../constituent-vnfd/member-vnf-index";
371 grouping nsr-nsd-monitoring-param {
372 list monitoring-param {
375 uses nsd-base:monitoring-param-common;
377 list vnfd-monitoring-param {
378 description "A list of VNFD monitoring params";
379 key "vnfd-id-ref vnfd-monitoring-param-ref";
383 "A reference to a vnfd. This is a
385 ../../../../nsd:constituent-vnfd
386 + [nsd:id = current()/../nsd:id-ref]
388 NOTE: An issue with confd is preventing the
389 use of xpath. Seems to be an issue with leafref
390 to leafref, whose target is in a different module.
391 Once that is resolved this will switched to use
397 leaf vnfd-monitoring-param-ref {
398 description "A reference to the VNFD monitoring param";
400 path "../../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd"
401 + "[project-vnfd:id = current()/../vnfd-id-ref]"
402 + "/project-vnfd:monitoring-param/project-vnfd:id";
406 leaf member-vnf-index-ref {
408 "Optional reference to member-vnf within constituent-vnfds";
410 path "../../../constituent-vnfd/member-vnf-index";
417 grouping nsd-service-primitive {
418 list service-primitive {
420 "Network service level service primitives.";
426 "Name of the service primitive.";
432 "List of parameters for the service primitive.";
435 uses manotypes:primitive-parameter;
438 uses manotypes:ui-primitive-group;
440 list vnf-primitive-group {
442 "List of service primitives grouped by VNF.";
444 key "member-vnf-index-ref";
445 leaf member-vnf-index-ref {
447 "Reference to member-vnf within constituent-vnfds";
449 path "../../../constituent-vnfd/member-vnf-index";
455 "A reference to a vnfd. This is a leafref";
458 path "../../../constituent-vnfd" +
459 "[member-vnf-index = current()/../member-vnf-index-ref]" + "/vnfd-id-ref";
467 path "../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd"
468 + "[project-vnfd:id = current()/../vnfd-id-ref]"
469 + "/project-vnfd:name";
477 description "Index of this primitive";
482 description "Name of the primitive in the VNF primitive ";
488 leaf user-defined-script {
490 "A user defined script.";
496 grouping nsr-nsd-service-primitive {
497 list service-primitive {
499 "Network service level service primitives.";
505 "Name of the service primitive.";
511 "List of parameters for the service primitive.";
514 uses manotypes:primitive-parameter;
517 uses manotypes:ui-primitive-group;
519 list vnf-primitive-group {
521 "List of service primitives grouped by VNF.";
523 key "member-vnf-index-ref";
524 leaf member-vnf-index-ref {
526 "Reference to member-vnf within constituent-vnfds";
528 path "../../../constituent-vnfd/member-vnf-index";
534 "A reference to a vnfd. This is a leafref";
537 path "../../../constituent-vnfd" +
538 "[member-vnf-index = current()/../member-vnf-index-ref]" + "/vnfd-id-ref";
546 path "../../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd"
547 + "[project-vnfd:id = current()/../vnfd-id-ref]"
548 + "/project-vnfd:name";
556 description "Index of this primitive";
561 description "Name of the primitive in the VNF primitive ";
567 leaf user-defined-script {
569 "A user defined script.";
575 grouping nsd-descriptor {
576 uses nsd-base:nsd-descriptor-common;
580 uses nsd-constituent-vnfd;
582 uses nsd-placement-groups;
584 uses nsd-vnf-dependency;
586 uses nsd-monitoring-param;
588 uses nsd-service-primitive;
591 augment "/rw-project:project" {
592 container nsd-catalog {