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-list member-vnf-index-ref {
362 "Optional reference to member-vnf within constituent-vnfds";
369 grouping nsr-nsd-monitoring-param {
370 list monitoring-param {
373 uses nsd-base:monitoring-param-common;
375 list vnfd-monitoring-param {
376 description "A list of VNFD monitoring params";
377 key "vnfd-id-ref vnfd-monitoring-param-ref";
381 "A reference to a vnfd. This is a
383 ../../../../nsd:constituent-vnfd
384 + [nsd:id = current()/../nsd:id-ref]
386 NOTE: An issue with confd is preventing the
387 use of xpath. Seems to be an issue with leafref
388 to leafref, whose target is in a different module.
389 Once that is resolved this will switched to use
395 leaf vnfd-monitoring-param-ref {
396 description "A reference to the VNFD monitoring param";
398 path "../../../../../../project-vnfd:vnfd-catalog/project-vnfd:vnfd"
399 + "[project-vnfd:id = current()/../vnfd-id-ref]"
400 + "/project-vnfd:monitoring-param/project-vnfd:id";
404 leaf-list member-vnf-index-ref {
406 "Optional reference to member-vnf within constituent-vnfds";
413 grouping nsd-descriptor {
414 uses nsd-base:nsd-descriptor-common;
418 uses nsd-constituent-vnfd;
420 uses nsd-placement-groups;
422 uses nsd-vnf-dependency;
424 uses nsd-monitoring-param;
427 augment "/rw-project:project" {
428 container nsd-catalog {