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 typedef scaling-policy-type {
86 typedef scaling-criteria-operation {
97 grouping primitive-parameter {
100 "Name of the parameter.";
106 "Data type associated with the name.";
107 type manotypes:parameter-data-type;
111 description "Is this field mandatory";
117 description "The default value for this field";
121 leaf parameter-pool {
122 description "NSD Parameter pool name to use for this paramter";
127 grouping nsd-descriptor {
129 description "Identifier for the NSD.";
134 description "NSD name.";
140 description "NSD short name.";
145 description "Vendor of the NSD.";
151 "File path for the vendor specific logo. For example icons/mylogo.png.
152 The logo should be part of the network service";
157 description "Description of the NSD.";
162 description "Version of the NSD";
166 list connection-point {
168 "List for external connection points.
169 Each NS has one or more external connection
170 points. As the name implies that external
171 connection points are used for connecting
172 the NS to other NS or to external networks.
173 Each NS exposes these connection points to
174 the orchestrator. The orchestrator can
175 construct network service chains by
176 connecting the connection points between
182 "Name of the NS connection point.";
188 "Type of the connection point.";
189 type manotypes:connection-point-type;
193 /* Still having issues modelling this,
194 see the comments under vnfd-connection-point-ref
198 "List of Virtual Link Descriptors.";
204 "Identifier for the VLD.";
210 "Virtual Link Descriptor (VLD) name.";
216 "Short name for VLD for UI";
221 description "Provider of the VLD.";
226 description "Description of the VLD.";
231 description "Version of the VLD";
236 type manotypes:virtual-link-type;
239 leaf root-bandwidth {
241 "For ELAN this is the aggregate bandwidth.";
245 leaf leaf-bandwidth {
247 "For ELAN this is the bandwidth of branches.";
251 list vnfd-connection-point-ref {
253 "A list of references to connection points.";
254 key "member-vnf-index-ref vnfd-connection-point-ref";
256 leaf member-vnf-index-ref {
257 description "Reference to member-vnf within constituent-vnfds";
259 path "../../../constituent-vnfd/member-vnf-index";
265 "A reference to a vnfd. This is a
267 ../../nsd:constituent-vnfd
268 + [nsd:id = current()/../nsd:id-ref]
270 NOTE: An issue with confd is preventing the
271 use of xpath. Seems to be an issue with leafref
272 to leafref, whose target is in a different module.
273 Once that is resovled this will switched to use
276 path "../../../constituent-vnfd" +
277 "[member-vnf-index = current()/../member-vnf-index-ref]" +
282 leaf vnfd-connection-point-ref {
283 description "A reference to a connection point name";
285 path "/vnfd:vnfd-catalog/vnfd:vnfd" +
286 "[vnfd:id = current()/../vnfd-id-ref]/" +
287 "vnfd:connection-point/vnfd:name";
292 // replicate for pnfd container here
293 uses manotypes:provider-network;
296 description "Flag indicating whether this network is a VIM management network";
302 description "Extra parameters for VLD instantiation";
304 case vim-network-ref {
305 leaf vim-network-name {
307 "Name of network in VIM account. This is used to indicate
308 pre-provisioned network name in cloud account.";
313 case vim-network-profile {
314 leaf ip-profile-ref {
315 description "Named reference to IP-profile object";
323 list constituent-vnfd {
325 "List of VNFDs that are part of this
328 key "member-vnf-index";
330 leaf member-vnf-index {
332 "Identifier/index for the VNFD. This separate id
333 is required to ensure that multiple VNFs can be
340 "Identifier for the VNFD.";
342 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
346 leaf start-by-default {
348 "VNFD is started as part of the NS instantiation";
354 list scaling-group-descriptor {
356 "scaling group descriptor within this network service.
357 The scaling group defines a group of VNFs,
358 and the ratio of VNFs in the network service
359 that is used as target for scaling action";
364 description "Name of this scaling group.";
368 list scaling-policy {
374 "Name of the scaling policy";
381 type scaling-policy-type;
386 "Specifies if the scaling policy can be applied";
391 leaf scale-in-operation-type {
393 "Operation to be applied to check between scaling criterias to
394 check if the scale in threshold condition has been met.
396 type scaling-criteria-operation;
400 leaf scale-out-operation-type {
402 "Operation to be applied to check between scaling criterias to
403 check if the scale out threshold condition has been met.
405 type scaling-criteria-operation;
409 leaf threshold-time {
411 "The duration for which the criteria must hold true";
418 "The duration after a scaling-in/scaling-out action has been
419 triggered, for which there will be no further optional";
424 list scaling-criteria {
426 "list of conditions to be met for generating scaling
434 leaf scale-in-threshold {
436 "Value below which scale-in requests are generated";
440 leaf scale-out-threshold {
442 "Value above which scale-out requests are generated";
446 leaf ns-monitoring-param-ref {
448 "Reference to the NS level monitoring parameter
451 path "../../../../monitoring-param/id";
458 description "List of VNFs in this scaling group";
459 key "member-vnf-index-ref";
461 leaf member-vnf-index-ref {
462 description "member VNF index of this member VNF";
464 path "../../../constituent-vnfd/member-vnf-index";
470 "count of this member VNF within this scaling group.
471 The count allows to define the number of instances
472 when a scaling action targets this scaling group";
478 leaf min-instance-count {
480 "Minimum instances of the scaling group which are allowed.
481 These instances are created by default when the network service
487 leaf max-instance-count {
489 "Maximum instances of this scaling group that are allowed
490 in a single network service. The network service scaling
491 will fail, when the number of service group instances
492 exceed the max-instance-count specified.";
497 list scaling-config-action {
498 description "List of scaling config actions";
502 description "scaling trigger";
503 type scaling-trigger;
506 leaf ns-config-primitive-name-ref {
507 description "Reference to the NS config name primitive";
509 path "../../../service-primitive/name";
515 list placement-groups {
516 description "List of placement groups at NS level";
519 uses manotypes:placement-group-info;
523 "List of VNFDs that are part of this placement group";
525 key "member-vnf-index-ref";
527 leaf member-vnf-index-ref {
528 description "member VNF index of this member VNF";
530 path "../../../constituent-vnfd/member-vnf-index";
536 "Identifier for the VNFD.";
538 path "../../../constituent-vnfd" +
539 "[member-vnf-index = current()/../member-vnf-index-ref]" +
546 uses manotypes:ip-profile-list;
548 list vnf-dependency {
550 "List of VNF dependencies.";
552 leaf vnf-source-ref {
554 path "../../constituent-vnfd/vnfd-id-ref";
557 leaf vnf-depends-on-ref {
559 "Reference to VNF that sorce VNF depends.";
561 path "../../constituent-vnfd/vnfd-id-ref";
568 "List of VNF Forwarding Graph Descriptors (VNFFGD).";
574 "Identifier for the VNFFGD.";
586 "Short name for VNFFGD for UI";
591 description "Provider of the VNFFGD.";
596 description "Description of the VNFFGD.";
601 description "Version of the VNFFGD";
607 "List of Rendered Service Paths (RSP).";
613 "Identifier for the RSP.";
623 list vnfd-connection-point-ref {
625 "A list of references to connection points.";
626 key "member-vnf-index-ref";
628 leaf member-vnf-index-ref {
629 description "Reference to member-vnf within constituent-vnfds";
631 path "../../../../constituent-vnfd/member-vnf-index";
638 "A number that denotes the order of a VNF in a chain";
643 "A reference to a vnfd. This is a
645 ../../../../nsd:constituent-vnfd
646 + [nsd:id = current()/../nsd:id-ref]
648 NOTE: An issue with confd is preventing the
649 use of xpath. Seems to be an issue with leafref
650 to leafref, whose target is in a different module.
651 Once that is resovled this will switched to use
654 path "../../../../constituent-vnfd" +
655 "[member-vnf-index = current()/../member-vnf-index-ref]" +
660 leaf vnfd-connection-point-ref {
662 "A reference to a connection point name
663 in a vnfd. This is a leafref to path:
664 /vnfd:vnfd-catalog/vnfd:vnfd
665 + [vnfd:id = current()/../nsd:vnfd-id-ref]
666 + /vnfd:connection-point/vnfd:name
667 NOTE: An issue with confd is preventing the
668 use of xpath. Seems to be an issue with leafref
669 to leafref, whose target is in a different module.
670 Once that is resovled this will switched to use
673 path "/vnfd:vnfd-catalog/vnfd:vnfd" +
674 "[vnfd:id = current()/../vnfd-id-ref]/" +
675 "vnfd:connection-point/vnfd:name";
683 "List of classifier rules.";
689 "Identifier for the classifier rule.";
695 "Name of the classifier.";
701 "A reference to the RSP.";
707 leaf member-vnf-index-ref {
708 description "Reference to member-vnf within constituent-vnfds";
710 path "../../../constituent-vnfd/member-vnf-index";
716 "A reference to a vnfd. This is a
718 ../../../nsd:constituent-vnfd
719 + [nsd:id = current()/../nsd:id-ref]
721 NOTE: An issue with confd is preventing the
722 use of xpath. Seems to be an issue with leafref
723 to leafref, whose target is in a different module.
724 Once that is resovled this will switched to use
727 path "../../../constituent-vnfd" +
728 "[member-vnf-index = current()/../member-vnf-index-ref]" +
733 leaf vnfd-connection-point-ref {
735 "A reference to a connection point name
736 in a vnfd. This is a leafref to path:
737 /vnfd:vnfd-catalog/vnfd:vnfd
738 + [vnfd:id = current()/../nsd:vnfd-id-ref]
739 + /vnfd:connection-point/vnfd:name
740 NOTE: An issue with confd is preventing the
741 use of xpath. Seems to be an issue with leafref
742 to leafref, whose target is in a different module.
743 Once that is resovled this will switched to use
746 path "/vnfd:vnfd-catalog/vnfd:vnfd" +
747 "[vnfd:id = current()/../vnfd-id-ref]/" +
748 "vnfd:connection-point/vnfd:name";
752 list match-attributes {
754 "List of match attributes.";
760 "Identifier for the classifier match attribute rule.";
770 leaf source-ip-address {
772 "Source IP address.";
773 type inet:ip-address;
776 leaf destination-ip-address {
778 "Destination IP address.";
779 type inet:ip-address;
784 "Source port number.";
785 type inet:port-number;
788 leaf destination-port {
790 "Destination port number.";
791 type inet:port-number;
793 //TODO: Add more match criteria
798 list monitoring-param {
800 "List of monitoring parameters from VNF's that should be
801 propogated up into NSR";
812 uses manotypes:monitoring-param-value;
813 uses manotypes:monitoring-param-ui-data;
814 uses manotypes:monitoring-param-aggregation;
816 list vnfd-monitoring-param {
817 description "A list of VNFD monitoring params";
818 key "member-vnf-index-ref vnfd-monitoring-param-ref";
822 "A reference to a vnfd. This is a
824 ../../../../nsd:constituent-vnfd
825 + [nsd:id = current()/../nsd:id-ref]
827 NOTE: An issue with confd is preventing the
828 use of xpath. Seems to be an issue with leafref
829 to leafref, whose target is in a different module.
830 Once that is resolved this will switched to use
834 path "../../../constituent-vnfd" +
835 "[member-vnf-index = current()/../member-vnf-index-ref]" +
840 leaf vnfd-monitoring-param-ref {
841 description "A reference to the VNFD monitoring param";
843 path "/vnfd:vnfd-catalog/vnfd:vnfd"
844 + "[vnfd:id = current()/../vnfd-id-ref]"
845 + "/vnfd:monitoring-param/vnfd:id";
849 leaf member-vnf-index-ref {
851 "Mandatory reference to member-vnf within constituent-vnfds";
853 path "../../../constituent-vnfd/member-vnf-index";
859 uses manotypes:input-parameter-xpath;
861 list parameter-pool {
863 "Pool of parameter values which must be
864 pulled from during configuration";
869 "Name of the configuration value pool";
875 "Create a range of values to populate the pool with";
879 "Generated pool values start at this value";
886 "Generated pool values stop at this value";
893 uses manotypes:ns-service-primitive;
895 list initial-config-primitive {
896 rwpb:msg-new NsdInitialConfigPrimitive;
898 "Initial set of configuration primitives for NSD.";
901 uses manotypes:initial-config;
906 description "Used to configure the list of public keys to be injected as part
907 of ns instantiation";
910 description "Name of this key pair";
915 description "Key associated with this key pair";
922 description "List of users to be added through cloud-config";
925 description "Name of the user ";
930 description "The user name's real name";
936 description "Used to configure the list of public keys to be injected as part
937 of ns instantiation";
940 description "Name of this key pair";
945 description "Key associated with this key pair";
953 container nsd-catalog {