4 * Copyright 2016-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 "urn:ietf:params:xml:ns:yang:nfvo:nsd";
26 import ietf-yang-types {
44 "Update model to support projects.";
49 "Initial revision. This YANG file defines
50 the Network Service Descriptor (NSD)";
52 "Derived from earlier versions of base YANG files";
55 grouping nsd-constituent-vnfd {
56 list constituent-vnfd {
58 "List of VNFDs that are part of this
61 key "member-vnf-index";
63 leaf member-vnf-index {
65 "Identifier/index for the VNFD. This separate id
66 is required to ensure that multiple VNFs can be
73 "Identifier for the VNFD.";
75 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
79 leaf start-by-default {
81 "VNFD is started as part of the NS instantiation";
93 uses nsd-base:nsd-vld-common;
95 list vnfd-connection-point-ref {
97 "A list of references to connection points.";
98 key "member-vnf-index-ref vnfd-connection-point-ref";
100 leaf member-vnf-index-ref {
101 description "Reference to member-vnf within constituent-vnfds";
103 path "../../../constituent-vnfd/member-vnf-index";
109 "A reference to a vnfd";
111 path "../../../constituent-vnfd" +
112 "[member-vnf-index = current()/../member-vnf-index-ref]" +
117 leaf vnfd-connection-point-ref {
118 description "A reference to a connection point name";
120 path "/vnfd:vnfd-catalog/vnfd:vnfd" +
121 "[vnfd:id = current()/../vnfd-id-ref]/" +
122 "vnfd:connection-point/vnfd:name";
129 grouping nsd-vnf-dependency {
130 list vnf-dependency {
132 "List of VNF dependencies.";
134 leaf vnf-source-ref {
136 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
139 leaf vnf-depends-on-ref {
141 "Reference to VNF that sorce VNF depends.";
143 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
149 grouping nsd-placement-groups {
150 list placement-groups {
151 description "List of placement groups at NS level";
154 uses manotypes:placement-group-info;
158 "List of VNFDs that are part of this placement group";
160 key "member-vnf-index-ref";
162 leaf member-vnf-index-ref {
163 description "member VNF index of this member VNF";
165 path "../../../constituent-vnfd/member-vnf-index";
171 "Identifier for the VNFD.";
173 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
180 grouping nsd-monitoring-param {
182 list monitoring-param {
185 uses nsd-base:monitoring-param-common;
187 list vnfd-monitoring-param {
188 description "A list of VNFD monitoring params";
189 key "vnfd-id-ref vnfd-monitoring-param-ref";
193 "A reference to a vnfd. This is a leafref";
196 path "../../../constituent-vnfd" +
197 "[member-vnf-index = current()/../member-vnf-index-ref]" +
202 leaf vnfd-monitoring-param-ref {
203 description "A reference to the VNFD monitoring param";
205 path "/vnfd:vnfd-catalog/vnfd:vnfd"
206 + "[vnfd:id = current()/../vnfd-id-ref]"
207 + "/vnfd:monitoring-param/vnfd:id";
211 leaf member-vnf-index-ref {
213 "Optional reference to member-vnf within constituent-vnfds";
215 path "../../../constituent-vnfd/member-vnf-index";
222 grouping nsd-service-primitive {
223 list service-primitive {
225 "Network service level service primitives.";
231 "Name of the service primitive.";
237 "List of parameters for the service primitive.";
240 uses manotypes:primitive-parameter;
243 uses manotypes:ui-primitive-group;
245 list vnf-primitive-group {
247 "List of service primitives grouped by VNF.";
249 key "member-vnf-index-ref";
250 leaf member-vnf-index-ref {
252 "Reference to member-vnf within constituent-vnfds";
254 path "../../../constituent-vnfd/member-vnf-index";
260 "A reference to a vnfd. This is a leafref";
263 path "../../../constituent-vnfd" +
264 "[member-vnf-index = current()/../member-vnf-index-ref]" + "/vnfd-id-ref";
272 path "/vnfd:vnfd-catalog/vnfd:vnfd"
273 + "[vnfd:id = current()/../vnfd-id-ref]"
282 description "Index of this primitive";
287 description "Name of the primitive in the VNF primitive ";
293 leaf user-defined-script {
295 "A user defined script.";
301 container nsd-catalog {
306 uses nsd-base:nsd-descriptor-common;
310 uses nsd-constituent-vnfd;
312 uses nsd-placement-groups;
314 uses nsd-vnf-dependency;
316 uses nsd-monitoring-param;
318 uses nsd-service-primitive;