4 * Copyright 2016 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";
38 import ietf-inet-types {
42 import ietf-yang-types {
52 "Initial revision. This YANG file defines
53 the Network Service Descriptor (NSD)";
55 "Derived from earlier versions of base YANG files";
58 typedef scaling-trigger {
75 container nsd-catalog {
81 description "Identifier for the NSD.";
86 description "NSD name.";
92 description "NSD short name.";
98 description "Vendor of the NSD.";
104 "File path for the vendor specific logo. For example icons/mylogo.png.
105 The logo should be part of the network service";
110 description "Description of the NSD.";
115 description "Version of the NSD";
119 list connection-point {
121 "List for external connection points.
122 Each NS has one or more external connection
123 points. As the name implies that external
124 connection points are used for connecting
125 the NS to other NS or to external networks.
126 Each NS exposes these connection points to
127 the orchestrator. The orchestrator can
128 construct network service chains by
129 connecting the connection points between
135 "Name of the NS connection point.";
141 "Type of the connection point.";
142 type manotypes:connection-point-type;
146 /* Still having issues modelling this,
147 see the comments under vnfd-connection-point-ref
151 "List of Virtual Link Descriptors.";
157 "Identifier for the VLD.";
163 "Virtual Link Descriptor (VLD) name.";
169 "Short name for VLD for UI";
174 description "Provider of the VLD.";
179 description "Description of the VLD.";
184 description "Version of the VLD";
189 type manotypes:virtual-link-type;
192 leaf root-bandwidth {
194 "For ELAN this is the aggregate bandwidth.";
198 leaf leaf-bandwidth {
200 "For ELAN this is the bandwidth of branches.";
204 list vnfd-connection-point-ref {
206 "A list of references to connection points.";
207 key "member-vnf-index-ref";
209 leaf member-vnf-index-ref {
210 description "Reference to member-vnf within constituent-vnfds";
212 path "../../../nsd:constituent-vnfd/nsd:member-vnf-index";
218 "A reference to a vnfd. This is a
220 ../../../nsd:constituent-vnfd
221 + [nsd:id = current()/../nsd:id-ref]
223 NOTE: An issue with confd is preventing the
224 use of xpath. Seems to be an issue with leafref
225 to leafref, whose target is in a different module.
226 Once that is resovled this will switched to use
231 leaf vnfd-connection-point-ref {
233 "A reference to a connection point name
234 in a vnfd. This is a leafref to path:
235 /vnfd:vnfd-catalog/vnfd:vnfd
236 + [vnfd:id = current()/../nsd:vnfd-id-ref]
237 + /vnfd:connection-point/vnfd:name
238 NOTE: An issue with confd is preventing the
239 use of xpath. Seems to be an issue with leafref
240 to leafref, whose target is in a different module.
241 Once that is resovled this will switched to use
247 // replicate for pnfd container here
248 uses manotypes:provider-network;
251 list constituent-vnfd {
253 "List of VNFDs that are part of this
256 key "member-vnf-index";
258 leaf member-vnf-index {
260 "Identifier/index for the VNFD. This separate id
261 is required to ensure that multiple VNFs can be
268 "Identifier for the VNFD.";
270 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
274 leaf start-by-default {
276 "VNFD is started as part of the NS instantiation";
282 list scaling-group-descriptor {
284 "scaling group descriptor within this network service.
285 The scaling group defines a group of VNFs,
286 and the ratio of VNFs in the network service
287 that is used as target for scaling action";
292 description "Name of this scaling group.";
297 description "List of VNFs in this scaling group";
298 key "member-vnf-index-ref";
300 leaf member-vnf-index-ref {
301 description "member VNF index of this member VNF";
303 path "../../../constituent-vnfd/member-vnf-index";
309 "count of this member VNF within this scaling group.
310 The count allows to define the number of instances
311 when a scaling action targets this scaling group";
317 leaf min-instance-count {
319 "Minimum instances of the scaling group which are allowed.
320 These instances are created by default when the network service
326 leaf max-instance-count {
328 "Maximum instances of this scaling group that are allowed
329 in a single network service. The network service scaling
330 will fail, when the number of service group instances
331 exceed the max-instance-count specified.";
336 list scaling-config-action {
337 description "List of scaling config actions";
341 description "scaling trigger";
342 type scaling-trigger;
345 leaf ns-config-primitive-name-ref {
346 description "Reference to the NS config name primitive";
348 path "../../../config-primitive/name";
354 list placement-groups {
355 description "List of placement groups at NS level";
358 uses manotypes:placement-group-info;
362 "List of VNFDs that are part of this placement group";
364 key "member-vnf-index-ref";
366 leaf member-vnf-index-ref {
367 description "member VNF index of this member VNF";
369 path "../../../constituent-vnfd/member-vnf-index";
375 "Identifier for the VNFD.";
377 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
383 list vnf-dependency {
385 "List of VNF dependencies.";
387 leaf vnf-source-ref {
389 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
392 leaf vnf-depends-on-ref {
394 "Reference to VNF that sorce VNF depends.";
396 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
403 "List of VNF Forwarding Graph Descriptors (VNFFGD).";
409 "Identifier for the VNFFGD.";
421 "Short name for VNFFGD for UI";
426 description "Provider of the VNFFGD.";
431 description "Description of the VNFFGD.";
436 description "Version of the VNFFGD";
442 "List of Rendered Service Paths (RSP).";
448 "Identifier for the RSP.";
458 list vnfd-connection-point-ref {
460 "A list of references to connection points.";
461 key "member-vnf-index-ref";
463 leaf member-vnf-index-ref {
464 description "Reference to member-vnf within constituent-vnfds";
466 path "../../../../nsd:constituent-vnfd/nsd:member-vnf-index";
473 "A number that denotes the order of a VNF in a chain";
478 "A reference to a vnfd. This is a
480 ../../../../nsd:constituent-vnfd
481 + [nsd:id = current()/../nsd:id-ref]
483 NOTE: An issue with confd is preventing the
484 use of xpath. Seems to be an issue with leafref
485 to leafref, whose target is in a different module.
486 Once that is resovled this will switched to use
491 leaf vnfd-connection-point-ref {
493 "A reference to a connection point name
494 in a vnfd. This is a leafref to path:
495 /vnfd:vnfd-catalog/vnfd:vnfd
496 + [vnfd:id = current()/../nsd:vnfd-id-ref]
497 + /vnfd:connection-point/vnfd:name
498 NOTE: An issue with confd is preventing the
499 use of xpath. Seems to be an issue with leafref
500 to leafref, whose target is in a different module.
501 Once that is resovled this will switched to use
510 "List of classifier rules.";
516 "Identifier for the classifier rule.";
522 "Name of the classifier.";
528 "A reference to the RSP.";
530 path "../../nsd:rsp/nsd:id";
534 leaf member-vnf-index-ref {
535 description "Reference to member-vnf within constituent-vnfds";
537 path "../../../nsd:constituent-vnfd/nsd:member-vnf-index";
543 "A reference to a vnfd. This is a
545 ../../../nsd:constituent-vnfd
546 + [nsd:id = current()/../nsd:id-ref]
548 NOTE: An issue with confd is preventing the
549 use of xpath. Seems to be an issue with leafref
550 to leafref, whose target is in a different module.
551 Once that is resovled this will switched to use
556 leaf vnfd-connection-point-ref {
558 "A reference to a connection point name
559 in a vnfd. This is a leafref to path:
560 /vnfd:vnfd-catalog/vnfd:vnfd
561 + [vnfd:id = current()/../nsd:vnfd-id-ref]
562 + /vnfd:connection-point/vnfd:name
563 NOTE: An issue with confd is preventing the
564 use of xpath. Seems to be an issue with leafref
565 to leafref, whose target is in a different module.
566 Once that is resovled this will switched to use
571 list match-attributes {
573 "List of match attributes.";
579 "Identifier for the classifier match attribute rule.";
589 leaf source-ip-address {
591 "Source IP address.";
592 type inet:ip-address;
595 leaf destination-ip-address {
597 "Destination IP address.";
598 type inet:ip-address;
603 "Source port number.";
604 type inet:port-number;
607 leaf destination-port {
609 "Destination port number.";
610 type inet:port-number;
612 //TODO: Add more match criteria
617 uses manotypes:monitoring-param;
618 uses manotypes:input-parameter-xpath;
620 list parameter-pool {
622 "Pool of parameter values which must be
623 pulled from during configuration";
628 "Name of the configuration value pool";
634 "Create a range of values to populate the pool with";
638 "Generated pool values start at this value";
645 "Generated pool values stop at this value";
652 uses manotypes:config-primitive;