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";
34 import ietf-inet-types {
44 "Initial revision. This YANG file defines
45 the Network Service Descriptor (NSD)";
47 "Derived from earlier versions of base YANG files";
50 typedef scaling-trigger {
67 typedef scaling-policy-type {
78 typedef scaling-criteria-operation {
89 grouping primitive-parameter {
92 "Name of the parameter.";
98 "Data type associated with the name.";
99 type manotypes:parameter-data-type;
103 description "Is this field mandatory";
109 description "The default value for this field";
113 leaf parameter-pool {
114 description "NSD parameter pool name to use for this parameter";
119 grouping nsd-descriptor {
121 description "Identifier for the NSD.";
126 description "NSD name.";
132 description "Short name to appear as label in the UI";
137 description "Vendor of the NSD.";
143 "File path for the vendor-specific logo. For example, icons/mylogo.png.
144 The logo should be part of the network service";
149 description "Description of the NSD.";
154 description "Version of the NSD";
158 list connection-point {
160 "List for external connection points.
161 Each network service (NS) has one or more external connection
162 points that connect the NS to other NSs or to external networks.
163 Each NS exposes connection points to the orchestrator, which can
164 construct network service chains by connecting the connection
165 points between different NSs.";
169 "Name of the NS connection point.";
175 "Type of the connection point.";
176 type manotypes:connection-point-type;
180 /* Model Limitations,
181 see the comments under vnfd-connection-point-ref
185 "List of Virtual Link Descriptors (VLDs).";
191 "Identifier for the VLD.";
197 "Virtual Link Descriptor (VLD) name.";
203 "Short name to appear as label in the UI";
208 description "Provider of the VLD.";
213 description "Description of the VLD.";
218 description "Version of the VLD";
223 type manotypes:virtual-link-type;
226 leaf root-bandwidth {
228 "For ELAN this is the aggregate bandwidth.";
232 leaf leaf-bandwidth {
234 "For ELAN this is the bandwidth of branches.";
238 list vnfd-connection-point-ref {
240 "A list of references to connection points.";
241 key "member-vnf-index-ref vnfd-connection-point-ref";
243 leaf member-vnf-index-ref {
244 description "Reference to member-vnf within constituent-vnfds";
246 path "../../../constituent-vnfd/member-vnf-index";
252 "A reference to a VNFD";
254 path "../../../constituent-vnfd" +
255 "[member-vnf-index = current()/../member-vnf-index-ref]" +
260 leaf vnfd-connection-point-ref {
261 description "A reference to a connection point name";
263 path "/vnfd:vnfd-catalog/vnfd:vnfd" +
264 "[vnfd:id = current()/../vnfd-id-ref]/" +
265 "vnfd:connection-point/vnfd:name";
270 // replicate for pnfd container here
271 uses manotypes:provider-network;
274 description "Flag indicating whether this network is a VIM management network";
280 description "Extra parameters for VLD instantiation";
282 case vim-network-ref {
283 leaf vim-network-name {
285 "Name of network in VIM account. This is used to indicate
286 pre-provisioned network name in cloud account.";
291 case vim-network-profile {
292 leaf ip-profile-ref {
293 description "Named reference to IP-profile object";
295 path "../../ip-profiles/name";
302 list constituent-vnfd {
304 "List of VNFDs that are part of this
307 key "member-vnf-index";
309 leaf member-vnf-index {
311 "Identifier/index for the VNFD. This separate id
312 is required so that multiple VNFs can be part of
319 "Identifier for the VNFD.";
321 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
325 leaf start-by-default {
327 "VNFD is started as part of the NS instantiation";
333 list scaling-group-descriptor {
335 "Scaling group descriptor within this network service.
336 The scaling group defines a group of VNFs,
337 and the ratio of VNFs in the network service
338 that is used as target for scaling action";
343 description "Name of this scaling group.";
347 list scaling-policy {
353 "Name of the scaling policy";
360 type scaling-policy-type;
365 "Specifies if the scaling policy can be applied";
370 leaf scale-in-operation-type {
372 "Operation to be applied to check between scaling criterias to
373 check if the scale in threshold condition has been met.
375 type scaling-criteria-operation;
379 leaf scale-out-operation-type {
381 "Operation to be applied to check between scaling criterias to
382 check if the scale out threshold condition has been met.
384 type scaling-criteria-operation;
388 leaf threshold-time {
390 "The duration for which the criteria must hold true";
397 "The duration after a scaling-in/scaling-out action has been
398 triggered, for which there will be no further scaling activity";
403 list scaling-criteria {
405 "list of conditions to be met for generating scaling
410 description "Name of the scaling criteria";
414 leaf scale-in-threshold {
416 "Value below which scale-in requests are generated
417 (depends on monitoring parameters)";
421 leaf scale-out-threshold {
423 "Value above which scale-out requests are generated
424 (depends on monitoring parameters)";
428 leaf ns-monitoring-param-ref {
430 "Reference to the NS level monitoring parameter
433 path "../../../../monitoring-param/id";
440 description "List of VNFs in this scaling group";
441 key "member-vnf-index-ref";
443 leaf member-vnf-index-ref {
444 description "Member VNF index of this member VNF";
446 path "../../../constituent-vnfd/member-vnf-index";
452 "Count of this member VNF within this scaling group.
453 The count defines the number of instances when a
454 scaling action targets this scaling group.";
460 leaf min-instance-count {
462 "Minimum number of instances of the scaling group that
463 are allowed in a single network service. These instances
464 are created by default when the network service is
470 leaf max-instance-count {
472 "Maximum number of instances of this scaling group that
473 are allowed in a single network service. The network
474 service scaling fails when the number of service group
475 instances exceeds the max-instance-count specified.";
480 list scaling-config-action {
481 description "List of scaling config actions";
485 description "Scaling trigger";
486 type scaling-trigger;
489 leaf ns-config-primitive-name-ref {
490 description "Reference to the NS config name primitive";
492 path "../../../service-primitive/name";
498 list placement-groups {
499 description "List of placement groups at NS level";
502 uses manotypes:placement-group-info;
506 "List of VNFDs that are part of this placement group";
508 key "member-vnf-index-ref";
510 leaf member-vnf-index-ref {
511 description "Member VNF index of this member VNF";
513 path "../../../constituent-vnfd/member-vnf-index";
519 "Identifier for the VNFD.";
521 path "../../../constituent-vnfd" +
522 "[member-vnf-index = current()/../member-vnf-index-ref]" +
529 uses manotypes:ip-profile-list;
531 list vnf-dependency {
533 "List of VNF dependencies.";
535 leaf vnf-source-ref {
537 path "../../constituent-vnfd/vnfd-id-ref";
540 leaf vnf-depends-on-ref {
542 "Reference to VNF on which the source VNF depends.";
544 path "../../constituent-vnfd/vnfd-id-ref";
551 "List of VNF Forwarding Graph Descriptors (VNFFGD).";
557 "Identifier for the VNFFGD.";
569 "Short name to appear as label in the UI";
574 description "Provider of the VNFFGD.";
579 description "Description of the VNFFGD.";
584 description "Version of the VNFFGD";
590 "List of Rendered Service Paths (RSP).";
596 "Identifier for the RSP.";
606 list vnfd-connection-point-ref {
608 "A list of references to connection points.";
609 key "member-vnf-index-ref";
611 leaf member-vnf-index-ref {
612 description "Reference to member-vnf within constituent-vnfds";
614 path "../../../../constituent-vnfd/member-vnf-index";
621 "A number that denotes the order of a VNF in a chain";
626 "A reference to a vnfd";
628 path "../../../../constituent-vnfd" +
629 "[member-vnf-index = current()/../member-vnf-index-ref]" +
634 leaf vnfd-connection-point-ref {
636 "A reference to a connection point name";
638 path "/vnfd:vnfd-catalog/vnfd:vnfd" +
639 "[vnfd:id = current()/../vnfd-id-ref]/" +
640 "vnfd:connection-point/vnfd:name";
648 "List of classifier rules.";
654 "Identifier for the classifier rule.";
660 "Name of the classifier.";
666 "A reference to the RSP.";
672 leaf member-vnf-index-ref {
673 description "Reference to member-vnf within constituent-vnfds";
675 path "../../../constituent-vnfd/member-vnf-index";
681 "A reference to a VNFD";
683 path "../../../constituent-vnfd" +
684 "[member-vnf-index = current()/../member-vnf-index-ref]" +
689 leaf vnfd-connection-point-ref {
691 "A reference to a connection point name";
693 path "/vnfd:vnfd-catalog/vnfd:vnfd" +
694 "[vnfd:id = current()/../vnfd-id-ref]/" +
695 "vnfd:connection-point/vnfd:name";
699 list match-attributes {
701 "List of match attributes.";
707 "Identifier for the classifier match attribute rule.";
713 "Internet Protocol.";
717 leaf source-ip-address {
719 "Source IP address.";
720 type inet:ip-address;
723 leaf destination-ip-address {
725 "Destination IP address.";
726 type inet:ip-address;
731 "Source port number.";
732 type inet:port-number;
735 leaf destination-port {
737 "Destination port number.";
738 type inet:port-number;
744 list monitoring-param {
746 "List of monitoring parameters from VNFs that should be
747 propogated up into NSR";
751 description "Identifier for a monitoring parameter";
756 description "Name of the monitoring parameter";
760 uses manotypes:monitoring-param-value;
761 uses manotypes:monitoring-param-ui-data;
762 uses manotypes:monitoring-param-aggregation;
764 list vnfd-monitoring-param {
765 description "A list of VNFD monitoring params";
766 key "member-vnf-index-ref vnfd-monitoring-param-ref";
770 "A reference to a VNFD. This is a leafref";
773 path "../../../constituent-vnfd" +
774 "[member-vnf-index = current()/../member-vnf-index-ref]" +
779 leaf vnfd-monitoring-param-ref {
780 description "A reference to the VNFD monitoring param";
782 path "/vnfd:vnfd-catalog/vnfd:vnfd"
783 + "[vnfd:id = current()/../vnfd-id-ref]"
784 + "/vnfd:monitoring-param/vnfd:id";
788 leaf member-vnf-index-ref {
790 "Mandatory reference to member-vnf within constituent-vnfds";
792 path "../../../constituent-vnfd/member-vnf-index";
798 uses manotypes:input-parameter-xpath;
800 list parameter-pool {
802 "Pool of parameter values from which to choose during
808 "Name of the configuration value pool";
814 "Create a range of values from which to populate the pool with";
818 "Generated pool values start at this value";
825 "Generated pool values stop at this value";
832 list service-primitive {
834 "Network service level service primitives.";
840 "Name of the service primitive.";
846 "List of parameters for the service primitive.";
849 uses manotypes:primitive-parameter;
852 uses manotypes:ui-primitive-group;
854 list vnf-primitive-group {
856 "List of service primitives grouped by VNF.";
858 key "member-vnf-index-ref";
859 leaf member-vnf-index-ref {
861 "Reference to member-vnf within constituent-vnfds";
863 path "../../../constituent-vnfd/member-vnf-index";
869 "A reference to a VNFD. This is a leafref";
872 path "../../../constituent-vnfd" +
873 "[member-vnf-index = current()/../member-vnf-index-ref]" + "/vnfd-id-ref";
881 path "/vnfd:vnfd-catalog/vnfd:vnfd"
882 + "[vnfd:id = current()/../vnfd-id-ref]"
891 description "Index of this primitive";
896 description "Name of the primitive in the VNF primitive ";
902 leaf user-defined-script {
904 "A user defined script.";
909 list initial-config-primitive {
910 rwpb:msg-new NsdInitialConfigPrimitive;
912 "Initial set of configuration primitives for NSD.";
915 uses manotypes:initial-config;
920 description "Used to configure the list of public keys to be injected as part
921 of NS instantiation";
924 description "Name of this key pair";
929 description "Key associated with this key pair";
936 description "List of users to be added through cloud-config";
939 description "Name of the user ";
944 description "The user name's real name";
950 description "Used to configure the list of public keys to be injected as part
951 of NS instantiation";
954 description "Name of this key pair";
959 description "Key associated with this key pair";
967 container nsd-catalog {