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 parameter";
127 grouping nsd-descriptor {
129 description "Identifier for the NSD.";
134 description "NSD name.";
140 description "Short name to appear as label in the UI";
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 network service (NS) has one or more external connection
170 points that connect the NS to other NSs or to external networks.
171 Each NS exposes connection points to the orchestrator, which can
172 construct network service chains by connecting the connection
173 points between different NSs.";
177 "Name of the NS connection point.";
183 "Type of the connection point.";
184 type manotypes:connection-point-type;
188 /* Model Limitations,
189 see the comments under vnfd-connection-point-ref
193 "List of Virtual Link Descriptors (VLDs).";
199 "Identifier for the VLD.";
205 "Virtual Link Descriptor (VLD) name.";
211 "Short name to appear as label in the UI";
216 description "Provider of the VLD.";
221 description "Description of the VLD.";
226 description "Version of the VLD";
231 type manotypes:virtual-link-type;
234 leaf root-bandwidth {
236 "For ELAN this is the aggregate bandwidth.";
240 leaf leaf-bandwidth {
242 "For ELAN this is the bandwidth of branches.";
246 list vnfd-connection-point-ref {
248 "A list of references to connection points.";
249 key "member-vnf-index-ref vnfd-connection-point-ref";
251 leaf member-vnf-index-ref {
252 description "Reference to member-vnf within constituent-vnfds";
254 path "../../../constituent-vnfd/member-vnf-index";
260 "A reference to a VNFD";
262 path "../../../constituent-vnfd" +
263 "[member-vnf-index = current()/../member-vnf-index-ref]" +
268 leaf vnfd-connection-point-ref {
269 description "A reference to a connection point name";
271 path "/vnfd:vnfd-catalog/vnfd:vnfd" +
272 "[vnfd:id = current()/../vnfd-id-ref]/" +
273 "vnfd:connection-point/vnfd:name";
278 // replicate for pnfd container here
279 uses manotypes:provider-network;
282 description "Flag indicating whether this network is a VIM management network";
288 description "Extra parameters for VLD instantiation";
290 case vim-network-ref {
291 leaf vim-network-name {
293 "Name of network in VIM account. This is used to indicate
294 pre-provisioned network name in cloud account.";
299 case vim-network-profile {
300 leaf ip-profile-ref {
301 description "Named reference to IP-profile object";
303 path "../../ip-profiles/name";
310 list constituent-vnfd {
312 "List of VNFDs that are part of this
315 key "member-vnf-index";
317 leaf member-vnf-index {
319 "Identifier/index for the VNFD. This separate id
320 is required so that multiple VNFs can be part of
327 "Identifier for the VNFD.";
329 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
333 leaf start-by-default {
335 "VNFD is started as part of the NS instantiation";
341 list scaling-group-descriptor {
343 "Scaling group descriptor within this network service.
344 The scaling group defines a group of VNFs,
345 and the ratio of VNFs in the network service
346 that is used as target for scaling action";
351 description "Name of this scaling group.";
355 list scaling-policy {
361 "Name of the scaling policy";
368 type scaling-policy-type;
373 "Specifies if the scaling policy can be applied";
378 leaf scale-in-operation-type {
380 "Operation to be applied to check between scaling criterias to
381 check if the scale in threshold condition has been met.
383 type scaling-criteria-operation;
387 leaf scale-out-operation-type {
389 "Operation to be applied to check between scaling criterias to
390 check if the scale out threshold condition has been met.
392 type scaling-criteria-operation;
396 leaf threshold-time {
398 "The duration for which the criteria must hold true";
405 "The duration after a scaling-in/scaling-out action has been
406 triggered, for which there will be no further scaling activity";
411 list scaling-criteria {
413 "list of conditions to be met for generating scaling
418 description "Name of the scaling criteria";
422 leaf scale-in-threshold {
424 "Value below which scale-in requests are generated
425 (depends on monitoring parameters)";
429 leaf scale-out-threshold {
431 "Value above which scale-out requests are generated
432 (depends on monitoring parameters)";
436 leaf ns-monitoring-param-ref {
438 "Reference to the NS level monitoring parameter
441 path "../../../../monitoring-param/id";
448 description "List of VNFs in this scaling group";
449 key "member-vnf-index-ref";
451 leaf member-vnf-index-ref {
452 description "Member VNF index of this member VNF";
454 path "../../../constituent-vnfd/member-vnf-index";
460 "Count of this member VNF within this scaling group.
461 The count defines the number of instances when a
462 scaling action targets this scaling group.";
468 leaf min-instance-count {
470 "Minimum number of instances of the scaling group that
471 are allowed in a single network service. These instances
472 are created by default when the network service is
478 leaf max-instance-count {
480 "Maximum number of instances of this scaling group that
481 are allowed in a single network service. The network
482 service scaling fails when the number of service group
483 instances exceeds the max-instance-count specified.";
488 list scaling-config-action {
489 description "List of scaling config actions";
493 description "Scaling trigger";
494 type scaling-trigger;
497 leaf ns-config-primitive-name-ref {
498 description "Reference to the NS config name primitive";
500 path "../../../service-primitive/name";
506 list placement-groups {
507 description "List of placement groups at NS level";
510 uses manotypes:placement-group-info;
514 "List of VNFDs that are part of this placement group";
516 key "member-vnf-index-ref";
518 leaf member-vnf-index-ref {
519 description "Member VNF index of this member VNF";
521 path "../../../constituent-vnfd/member-vnf-index";
527 "Identifier for the VNFD.";
529 path "../../../constituent-vnfd" +
530 "[member-vnf-index = current()/../member-vnf-index-ref]" +
537 uses manotypes:ip-profile-list;
539 list vnf-dependency {
541 "List of VNF dependencies.";
543 leaf vnf-source-ref {
545 path "../../constituent-vnfd/vnfd-id-ref";
548 leaf vnf-depends-on-ref {
550 "Reference to VNF on which the source VNF depends.";
552 path "../../constituent-vnfd/vnfd-id-ref";
559 "List of VNF Forwarding Graph Descriptors (VNFFGD).";
565 "Identifier for the VNFFGD.";
577 "Short name to appear as label in the UI";
582 description "Provider of the VNFFGD.";
587 description "Description of the VNFFGD.";
592 description "Version of the VNFFGD";
598 "List of Rendered Service Paths (RSP).";
604 "Identifier for the RSP.";
614 list vnfd-connection-point-ref {
616 "A list of references to connection points.";
617 key "member-vnf-index-ref";
619 leaf member-vnf-index-ref {
620 description "Reference to member-vnf within constituent-vnfds";
622 path "../../../../constituent-vnfd/member-vnf-index";
629 "A number that denotes the order of a VNF in a chain";
634 "A reference to a vnfd";
636 path "../../../../constituent-vnfd" +
637 "[member-vnf-index = current()/../member-vnf-index-ref]" +
642 leaf vnfd-connection-point-ref {
644 "A reference to a connection point name";
646 path "/vnfd:vnfd-catalog/vnfd:vnfd" +
647 "[vnfd:id = current()/../vnfd-id-ref]/" +
648 "vnfd:connection-point/vnfd:name";
656 "List of classifier rules.";
662 "Identifier for the classifier rule.";
668 "Name of the classifier.";
674 "A reference to the RSP.";
680 leaf member-vnf-index-ref {
681 description "Reference to member-vnf within constituent-vnfds";
683 path "../../../constituent-vnfd/member-vnf-index";
689 "A reference to a VNFD";
691 path "../../../constituent-vnfd" +
692 "[member-vnf-index = current()/../member-vnf-index-ref]" +
697 leaf vnfd-connection-point-ref {
699 "A reference to a connection point name";
701 path "/vnfd:vnfd-catalog/vnfd:vnfd" +
702 "[vnfd:id = current()/../vnfd-id-ref]/" +
703 "vnfd:connection-point/vnfd:name";
707 list match-attributes {
709 "List of match attributes.";
715 "Identifier for the classifier match attribute rule.";
721 "Internet Protocol.";
725 leaf source-ip-address {
727 "Source IP address.";
728 type inet:ip-address;
731 leaf destination-ip-address {
733 "Destination IP address.";
734 type inet:ip-address;
739 "Source port number.";
740 type inet:port-number;
743 leaf destination-port {
745 "Destination port number.";
746 type inet:port-number;
752 list monitoring-param {
754 "List of monitoring parameters from VNFs that should be
755 propogated up into NSR";
759 description "Identifier for a monitoring parameter";
764 description "Name of the monitoring parameter";
768 uses manotypes:monitoring-param-value;
769 uses manotypes:monitoring-param-ui-data;
770 uses manotypes:monitoring-param-aggregation;
772 list vnfd-monitoring-param {
773 description "A list of VNFD monitoring params";
774 key "member-vnf-index-ref vnfd-monitoring-param-ref";
778 "A reference to a VNFD. This is a leafref";
781 path "../../../constituent-vnfd" +
782 "[member-vnf-index = current()/../member-vnf-index-ref]" +
787 leaf vnfd-monitoring-param-ref {
788 description "A reference to the VNFD monitoring param";
790 path "/vnfd:vnfd-catalog/vnfd:vnfd"
791 + "[vnfd:id = current()/../vnfd-id-ref]"
792 + "/vnfd:monitoring-param/vnfd:id";
796 leaf member-vnf-index-ref {
798 "Mandatory reference to member-vnf within constituent-vnfds";
800 path "../../../constituent-vnfd/member-vnf-index";
806 uses manotypes:input-parameter-xpath;
808 list parameter-pool {
810 "Pool of parameter values from which to choose during
816 "Name of the configuration value pool";
822 "Create a range of values from which to populate the pool with";
826 "Generated pool values start at this value";
833 "Generated pool values stop at this value";
840 list service-primitive {
842 "Network service level service primitives.";
848 "Name of the service primitive.";
854 "List of parameters for the service primitive.";
857 uses manotypes:primitive-parameter;
860 uses manotypes:ui-primitive-group;
862 list vnf-primitive-group {
864 "List of service primitives grouped by VNF.";
866 key "member-vnf-index-ref";
867 leaf member-vnf-index-ref {
869 "Reference to member-vnf within constituent-vnfds";
871 path "../../../constituent-vnfd/member-vnf-index";
877 "A reference to a VNFD. This is a leafref";
880 path "../../../constituent-vnfd" +
881 "[member-vnf-index = current()/../member-vnf-index-ref]" + "/vnfd-id-ref";
889 path "/vnfd:vnfd-catalog/vnfd:vnfd"
890 + "[vnfd:id = current()/../vnfd-id-ref]"
899 description "Index of this primitive";
904 description "Name of the primitive in the VNF primitive ";
910 leaf user-defined-script {
912 "A user defined script.";
917 list initial-config-primitive {
918 rwpb:msg-new NsdInitialConfigPrimitive;
920 "Initial set of configuration primitives for NSD.";
923 uses manotypes:initial-config;
928 description "Used to configure the list of public keys to be injected as part
929 of NS instantiation";
932 description "Name of this key pair";
937 description "Key associated with this key pair";
944 description "List of users to be added through cloud-config";
947 description "Name of the user ";
952 description "The user name's real name";
958 description "Used to configure the list of public keys to be injected as part
959 of NS instantiation";
962 description "Name of this key pair";
967 description "Key associated with this key pair";
975 container nsd-catalog {