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";
309 list constituent-vnfd {
311 "List of VNFDs that are part of this
314 key "member-vnf-index";
316 leaf member-vnf-index {
318 "Identifier/index for the VNFD. This separate id
319 is required so that multiple VNFs can be part of
326 "Identifier for the VNFD.";
328 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
332 leaf start-by-default {
334 "VNFD is started as part of the NS instantiation";
340 list scaling-group-descriptor {
342 "Scaling group descriptor within this network service.
343 The scaling group defines a group of VNFs,
344 and the ratio of VNFs in the network service
345 that is used as target for scaling action";
350 description "Name of this scaling group.";
354 list scaling-policy {
360 "Name of the scaling policy";
367 type scaling-policy-type;
372 "Specifies if the scaling policy can be applied";
377 leaf scale-in-operation-type {
379 "Operation to be applied to check between scaling criterias to
380 check if the scale in threshold condition has been met.
382 type scaling-criteria-operation;
386 leaf scale-out-operation-type {
388 "Operation to be applied to check between scaling criterias to
389 check if the scale out threshold condition has been met.
391 type scaling-criteria-operation;
395 leaf threshold-time {
397 "The duration for which the criteria must hold true";
404 "The duration after a scaling-in/scaling-out action has been
405 triggered, for which there will be no further scaling activity";
410 list scaling-criteria {
412 "list of conditions to be met for generating scaling
417 description "Name of the scaling criteria";
421 leaf scale-in-threshold {
423 "Value below which scale-in requests are generated
424 (depends on monitoring parameters)";
428 leaf scale-out-threshold {
430 "Value above which scale-out requests are generated
431 (depends on monitoring parameters)";
435 leaf ns-monitoring-param-ref {
437 "Reference to the NS level monitoring parameter
440 path "../../../../monitoring-param/id";
447 description "List of VNFs in this scaling group";
448 key "member-vnf-index-ref";
450 leaf member-vnf-index-ref {
451 description "Member VNF index of this member VNF";
453 path "../../../constituent-vnfd/member-vnf-index";
459 "Count of this member VNF within this scaling group.
460 The count defines the number of instances when a
461 scaling action targets this scaling group.";
467 leaf min-instance-count {
469 "Minimum number of instances of the scaling group that
470 are allowed in a single network service. These instances
471 are created by default when the network service is
477 leaf max-instance-count {
479 "Maximum number of instances of this scaling group that
480 are allowed in a single network service. The network
481 service scaling fails when the number of service group
482 instances exceeds the max-instance-count specified.";
487 list scaling-config-action {
488 description "List of scaling config actions";
492 description "Scaling trigger";
493 type scaling-trigger;
496 leaf ns-config-primitive-name-ref {
497 description "Reference to the NS config name primitive";
499 path "../../../service-primitive/name";
505 list placement-groups {
506 description "List of placement groups at NS level";
509 uses manotypes:placement-group-info;
513 "List of VNFDs that are part of this placement group";
515 key "member-vnf-index-ref";
517 leaf member-vnf-index-ref {
518 description "Member VNF index of this member VNF";
520 path "../../../constituent-vnfd/member-vnf-index";
526 "Identifier for the VNFD.";
528 path "../../../constituent-vnfd" +
529 "[member-vnf-index = current()/../member-vnf-index-ref]" +
536 uses manotypes:ip-profile-list;
538 list vnf-dependency {
540 "List of VNF dependencies.";
542 leaf vnf-source-ref {
544 path "../../constituent-vnfd/vnfd-id-ref";
547 leaf vnf-depends-on-ref {
549 "Reference to VNF on which the source VNF depends.";
551 path "../../constituent-vnfd/vnfd-id-ref";
558 "List of VNF Forwarding Graph Descriptors (VNFFGD).";
564 "Identifier for the VNFFGD.";
576 "Short name to appear as label in the UI";
581 description "Provider of the VNFFGD.";
586 description "Description of the VNFFGD.";
591 description "Version of the VNFFGD";
597 "List of Rendered Service Paths (RSP).";
603 "Identifier for the RSP.";
613 list vnfd-connection-point-ref {
615 "A list of references to connection points.";
616 key "member-vnf-index-ref";
618 leaf member-vnf-index-ref {
619 description "Reference to member-vnf within constituent-vnfds";
621 path "../../../../constituent-vnfd/member-vnf-index";
628 "A number that denotes the order of a VNF in a chain";
633 "A reference to a vnfd";
635 path "../../../../constituent-vnfd" +
636 "[member-vnf-index = current()/../member-vnf-index-ref]" +
641 leaf vnfd-connection-point-ref {
643 "A reference to a connection point name";
645 path "/vnfd:vnfd-catalog/vnfd:vnfd" +
646 "[vnfd:id = current()/../vnfd-id-ref]/" +
647 "vnfd:connection-point/vnfd:name";
655 "List of classifier rules.";
661 "Identifier for the classifier rule.";
667 "Name of the classifier.";
673 "A reference to the RSP.";
679 leaf member-vnf-index-ref {
680 description "Reference to member-vnf within constituent-vnfds";
682 path "../../../constituent-vnfd/member-vnf-index";
688 "A reference to a VNFD";
690 path "../../../constituent-vnfd" +
691 "[member-vnf-index = current()/../member-vnf-index-ref]" +
696 leaf vnfd-connection-point-ref {
698 "A reference to a connection point name";
700 path "/vnfd:vnfd-catalog/vnfd:vnfd" +
701 "[vnfd:id = current()/../vnfd-id-ref]/" +
702 "vnfd:connection-point/vnfd:name";
706 list match-attributes {
708 "List of match attributes.";
714 "Identifier for the classifier match attribute rule.";
720 "Internet Protocol.";
724 leaf source-ip-address {
726 "Source IP address.";
727 type inet:ip-address;
730 leaf destination-ip-address {
732 "Destination IP address.";
733 type inet:ip-address;
738 "Source port number.";
739 type inet:port-number;
742 leaf destination-port {
744 "Destination port number.";
745 type inet:port-number;
751 list monitoring-param {
753 "List of monitoring parameters from VNFs that should be
754 propogated up into NSR";
758 description "Identifier for a monitoring parameter";
763 description "Name of the monitoring parameter";
767 uses manotypes:monitoring-param-value;
768 uses manotypes:monitoring-param-ui-data;
769 uses manotypes:monitoring-param-aggregation;
771 list vnfd-monitoring-param {
772 description "A list of VNFD monitoring params";
773 key "member-vnf-index-ref vnfd-monitoring-param-ref";
777 "A reference to a VNFD. This is a leafref";
780 path "../../../constituent-vnfd" +
781 "[member-vnf-index = current()/../member-vnf-index-ref]" +
786 leaf vnfd-monitoring-param-ref {
787 description "A reference to the VNFD monitoring param";
789 path "/vnfd:vnfd-catalog/vnfd:vnfd"
790 + "[vnfd:id = current()/../vnfd-id-ref]"
791 + "/vnfd:monitoring-param/vnfd:id";
795 leaf member-vnf-index-ref {
797 "Mandatory reference to member-vnf within constituent-vnfds";
799 path "../../../constituent-vnfd/member-vnf-index";
805 uses manotypes:input-parameter-xpath;
807 list parameter-pool {
809 "Pool of parameter values from which to choose during
815 "Name of the configuration value pool";
821 "Create a range of values from which to populate the pool with";
825 "Generated pool values start at this value";
832 "Generated pool values stop at this value";
839 list service-primitive {
841 "Network service level service primitives.";
847 "Name of the service primitive.";
853 "List of parameters for the service primitive.";
856 uses manotypes:primitive-parameter;
859 uses manotypes:ui-primitive-group;
861 list vnf-primitive-group {
863 "List of service primitives grouped by VNF.";
865 key "member-vnf-index-ref";
866 leaf member-vnf-index-ref {
868 "Reference to member-vnf within constituent-vnfds";
870 path "../../../constituent-vnfd/member-vnf-index";
876 "A reference to a VNFD. This is a leafref";
879 path "../../../constituent-vnfd" +
880 "[member-vnf-index = current()/../member-vnf-index-ref]" + "/vnfd-id-ref";
888 path "/vnfd:vnfd-catalog/vnfd:vnfd"
889 + "[vnfd:id = current()/../vnfd-id-ref]"
898 description "Index of this primitive";
903 description "Name of the primitive in the VNF primitive ";
909 leaf user-defined-script {
911 "A user defined script.";
916 list initial-config-primitive {
917 rwpb:msg-new NsdInitialConfigPrimitive;
919 "Initial set of configuration primitives for NSD.";
922 uses manotypes:initial-config;
927 description "Used to configure the list of public keys to be injected as part
928 of NS instantiation";
931 description "Name of this key pair";
936 description "Key associated with this key pair";
943 description "List of users to be added through cloud-config";
946 description "Name of the user ";
951 description "The user name's real name";
957 description "Used to configure the list of public keys to be injected as part
958 of NS instantiation";
961 description "Name of this key pair";
966 description "Key associated with this key pair";
974 container nsd-catalog {