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 ns-initial-config-primitive {
130 "Sequence number for the configuration primitive.";
136 "Name of the configuration primitive.";
141 leaf user-defined-script {
143 "A user defined script.";
159 grouping nsd-descriptor {
161 description "Identifier for the NSD.";
166 description "NSD name.";
172 description "NSD short name.";
177 description "Vendor of the NSD.";
183 "File path for the vendor specific logo. For example icons/mylogo.png.
184 The logo should be part of the network service";
189 description "Description of the NSD.";
194 description "Version of the NSD";
198 list connection-point {
200 "List for external connection points.
201 Each NS has one or more external connection
202 points. As the name implies that external
203 connection points are used for connecting
204 the NS to other NS or to external networks.
205 Each NS exposes these connection points to
206 the orchestrator. The orchestrator can
207 construct network service chains by
208 connecting the connection points between
214 "Name of the NS connection point.";
220 "Type of the connection point.";
221 type manotypes:connection-point-type;
225 /* Still having issues modelling this,
226 see the comments under vnfd-connection-point-ref
230 "List of Virtual Link Descriptors.";
236 "Identifier for the VLD.";
242 "Virtual Link Descriptor (VLD) name.";
248 "Short name for VLD for UI";
253 description "Provider of the VLD.";
258 description "Description of the VLD.";
263 description "Version of the VLD";
268 type manotypes:virtual-link-type;
271 leaf root-bandwidth {
273 "For ELAN this is the aggregate bandwidth.";
277 leaf leaf-bandwidth {
279 "For ELAN this is the bandwidth of branches.";
283 list vnfd-connection-point-ref {
285 "A list of references to connection points.";
286 key "member-vnf-index-ref";
288 leaf member-vnf-index-ref {
289 description "Reference to member-vnf within constituent-vnfds";
291 path "../../../constituent-vnfd/member-vnf-index";
297 "A reference to a vnfd. This is a
299 ../../nsd:constituent-vnfd
300 + [nsd:id = current()/../nsd:id-ref]
302 NOTE: An issue with confd is preventing the
303 use of xpath. Seems to be an issue with leafref
304 to leafref, whose target is in a different module.
305 Once that is resovled this will switched to use
310 leaf vnfd-connection-point-ref {
311 description "A reference to a connection point name";
313 path "/vnfd:vnfd-catalog/vnfd:vnfd" +
314 "[vnfd:id = current()/../vnfd-id-ref]/" +
315 "vnfd:connection-point/vnfd:name";
320 // replicate for pnfd container here
321 uses manotypes:provider-network;
324 description "Extra parameters for VLD instantiation";
326 case vim-network-ref {
327 leaf vim-network-name {
329 "Name of network in VIM account. This is used to indicate
330 pre-provisioned network name in cloud account.";
334 case vim-network-profile {
335 leaf ip-profile-ref {
336 description "Named reference to IP-profile object";
343 list constituent-vnfd {
345 "List of VNFDs that are part of this
348 key "member-vnf-index";
350 leaf member-vnf-index {
352 "Identifier/index for the VNFD. This separate id
353 is required to ensure that multiple VNFs can be
360 "Identifier for the VNFD.";
362 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
366 leaf start-by-default {
368 "VNFD is started as part of the NS instantiation";
374 list scaling-group-descriptor {
376 "scaling group descriptor within this network service.
377 The scaling group defines a group of VNFs,
378 and the ratio of VNFs in the network service
379 that is used as target for scaling action";
384 description "Name of this scaling group.";
388 list scaling-policy {
394 "Name of the scaling policy";
401 type scaling-policy-type;
406 "Specifies if the scaling policy can be applied";
411 leaf scale-in-operation-type {
413 "Operation to be applied to check between scaling criterias to
414 check if the scale in threshold condition has been met.
416 type scaling-criteria-operation;
420 leaf scale-out-operation-type {
422 "Operation to be applied to check between scaling criterias to
423 check if the scale out threshold condition has been met.
425 type scaling-criteria-operation;
429 leaf threshold-time {
431 "The duration for which the criteria must hold true";
438 "The duration after a scaling-in/scaling-out action has been
439 triggered, for which there will be no further optional";
444 list scaling-criteria {
446 "list of conditions to be met for generating scaling
454 leaf scale-in-threshold {
456 "Value below which scale-in requests are generated";
460 leaf scale-out-threshold {
462 "Value above which scale-out requests are generated";
466 leaf ns-monitoring-param-ref {
468 "Reference to the NS level monitoring parameter
471 path "../../../../monitoring-param/id";
478 description "List of VNFs in this scaling group";
479 key "member-vnf-index-ref";
481 leaf member-vnf-index-ref {
482 description "member VNF index of this member VNF";
484 path "../../../constituent-vnfd/member-vnf-index";
490 "count of this member VNF within this scaling group.
491 The count allows to define the number of instances
492 when a scaling action targets this scaling group";
498 leaf min-instance-count {
500 "Minimum instances of the scaling group which are allowed.
501 These instances are created by default when the network service
507 leaf max-instance-count {
509 "Maximum instances of this scaling group that are allowed
510 in a single network service. The network service scaling
511 will fail, when the number of service group instances
512 exceed the max-instance-count specified.";
517 list scaling-config-action {
518 description "List of scaling config actions";
522 description "scaling trigger";
523 type scaling-trigger;
526 leaf ns-config-primitive-name-ref {
527 description "Reference to the NS config name primitive";
529 path "../../../service-primitive/name";
535 list placement-groups {
536 description "List of placement groups at NS level";
539 uses manotypes:placement-group-info;
543 "List of VNFDs that are part of this placement group";
545 key "member-vnf-index-ref";
547 leaf member-vnf-index-ref {
548 description "member VNF index of this member VNF";
550 path "../../../constituent-vnfd/member-vnf-index";
556 "Identifier for the VNFD.";
558 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
564 uses manotypes:ip-profile-list;
566 list vnf-dependency {
568 "List of VNF dependencies.";
570 leaf vnf-source-ref {
572 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
575 leaf vnf-depends-on-ref {
577 "Reference to VNF that sorce VNF depends.";
579 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
586 "List of VNF Forwarding Graph Descriptors (VNFFGD).";
592 "Identifier for the VNFFGD.";
604 "Short name for VNFFGD for UI";
609 description "Provider of the VNFFGD.";
614 description "Description of the VNFFGD.";
619 description "Version of the VNFFGD";
625 "List of Rendered Service Paths (RSP).";
631 "Identifier for the RSP.";
641 list vnfd-connection-point-ref {
643 "A list of references to connection points.";
644 key "member-vnf-index-ref";
646 leaf member-vnf-index-ref {
647 description "Reference to member-vnf within constituent-vnfds";
649 path "../../../../constituent-vnfd/member-vnf-index";
656 "A number that denotes the order of a VNF in a chain";
661 "A reference to a vnfd. This is a
663 ../../../../nsd:constituent-vnfd
664 + [nsd:id = current()/../nsd:id-ref]
666 NOTE: An issue with confd is preventing the
667 use of xpath. Seems to be an issue with leafref
668 to leafref, whose target is in a different module.
669 Once that is resovled this will switched to use
674 leaf vnfd-connection-point-ref {
676 "A reference to a connection point name
677 in a vnfd. This is a leafref to path:
678 /vnfd:vnfd-catalog/vnfd:vnfd
679 + [vnfd:id = current()/../nsd:vnfd-id-ref]
680 + /vnfd:connection-point/vnfd:name
681 NOTE: An issue with confd is preventing the
682 use of xpath. Seems to be an issue with leafref
683 to leafref, whose target is in a different module.
684 Once that is resovled this will switched to use
693 "List of classifier rules.";
699 "Identifier for the classifier rule.";
705 "Name of the classifier.";
711 "A reference to the RSP.";
717 leaf member-vnf-index-ref {
718 description "Reference to member-vnf within constituent-vnfds";
720 path "../../../constituent-vnfd/member-vnf-index";
726 "A reference to a vnfd. This is a
728 ../../../nsd:constituent-vnfd
729 + [nsd:id = current()/../nsd:id-ref]
731 NOTE: An issue with confd is preventing the
732 use of xpath. Seems to be an issue with leafref
733 to leafref, whose target is in a different module.
734 Once that is resovled this will switched to use
739 leaf vnfd-connection-point-ref {
741 "A reference to a connection point name
742 in a vnfd. This is a leafref to path:
743 /vnfd:vnfd-catalog/vnfd:vnfd
744 + [vnfd:id = current()/../nsd:vnfd-id-ref]
745 + /vnfd:connection-point/vnfd:name
746 NOTE: An issue with confd is preventing the
747 use of xpath. Seems to be an issue with leafref
748 to leafref, whose target is in a different module.
749 Once that is resovled this will switched to use
754 list match-attributes {
756 "List of match attributes.";
762 "Identifier for the classifier match attribute rule.";
772 leaf source-ip-address {
774 "Source IP address.";
775 type inet:ip-address;
778 leaf destination-ip-address {
780 "Destination IP address.";
781 type inet:ip-address;
786 "Source port number.";
787 type inet:port-number;
790 leaf destination-port {
792 "Destination port number.";
793 type inet:port-number;
795 //TODO: Add more match criteria
800 list monitoring-param {
802 "List of monitoring parameters from VNF's that should be
803 propogated up into NSR";
814 uses manotypes:monitoring-param-value;
815 uses manotypes:monitoring-param-ui-data;
816 uses manotypes:monitoring-param-aggregation;
818 list vnfd-monitoring-param {
819 description "A list of VNFD monitoring params";
820 key "vnfd-id-ref vnfd-monitoring-param-ref";
824 "A reference to a vnfd. This is a
826 ../../../../nsd:constituent-vnfd
827 + [nsd:id = current()/../nsd:id-ref]
829 NOTE: An issue with confd is preventing the
830 use of xpath. Seems to be an issue with leafref
831 to leafref, whose target is in a different module.
832 Once that is resolved this will switched to use
838 leaf vnfd-monitoring-param-ref {
839 description "A reference to the VNFD monitoring param";
841 path "/vnfd:vnfd-catalog/vnfd:vnfd"
842 + "[vnfd:id = current()/../vnfd-id-ref]"
843 + "/vnfd:monitoring-param/vnfd:id";
847 leaf-list member-vnf-index-ref {
849 "Optional reference to member-vnf within constituent-vnfds";
855 uses manotypes:input-parameter-xpath;
857 list parameter-pool {
859 "Pool of parameter values which must be
860 pulled from during configuration";
865 "Name of the configuration value pool";
871 "Create a range of values to populate the pool with";
875 "Generated pool values start at this value";
882 "Generated pool values stop at this value";
889 uses manotypes:ns-service-primitive;
891 list initial-config-primitive {
892 rwpb:msg-new NsdInitialConfigPrimitive;
894 "Initial set of configuration primitives for NSD.";
897 uses ns-initial-config-primitive;
902 description "Used to configure the list of public keys to be injected as part
903 of ns instantiation";
906 description "Name of this key pair";
911 description "Key associated with this key pair";
918 description "List of users to be added through cloud-config";
921 description "Name of the user ";
926 description "The user name's real name";
932 description "Used to configure the list of public keys to be injected as part
933 of ns instantiation";
936 description "Name of this key pair";
941 description "Key associated with this key pair";
949 container nsd-catalog {