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 {
312 "A reference to a connection point name
313 in a vnfd. This is a leafref to path:
314 /vnfd:vnfd-catalog/vnfd:vnfd
315 + [vnfd:id = current()/../nsd:vnfd-id-ref]
316 + /vnfd:connection-point/vnfd:name
317 NOTE: An issue with confd is preventing the
318 use of xpath. Seems to be an issue with leafref
319 to leafref, whose target is in a different module.
320 Once that is resovled this will switched to use
328 description "A mapping of VNF application point
329 capability/dependency within this network service";
331 description "Identfier for VNF access point map";
334 container capability {
335 leaf member-vnf-index-ref {
336 description "Reference to member-vnf within constituent-vnfds";
338 path "../../../../constituent-vnfd/member-vnf-index";
341 leaf capability-ref {
342 description "Reference to the capability with the capability of the VNF
343 with the specified member-vnf-index";
345 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:vnfap/vnfd:capability/vnfd:name";
349 container dependency {
350 leaf member-vnf-index-ref {
351 description "Reference to member-vnf within constituent-vnfds";
353 path "../../../../constituent-vnfd/member-vnf-index";
356 leaf dependency-ref {
357 description "Reference to the dependency within the dependency of the VNF
358 with the specified member-vnf-index";
360 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:vnfap/vnfd:dependency/vnfd:name";
366 // replicate for pnfd container here
367 uses manotypes:provider-network;
370 description "Extra parameters for VLD instantiation";
372 case vim-network-ref {
373 leaf vim-network-name {
375 "Name of network in VIM account. This is used to indicate
376 pre-provisioned network name in cloud account.";
380 case vim-network-profile {
381 leaf ip-profile-ref {
382 description "Named reference to IP-profile object";
389 list constituent-vnfd {
391 "List of VNFDs that are part of this
394 key "member-vnf-index";
396 leaf member-vnf-index {
398 "Identifier/index for the VNFD. This separate id
399 is required to ensure that multiple VNFs can be
406 "Identifier for the VNFD.";
408 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
412 leaf start-by-default {
414 "VNFD is started as part of the NS instantiation";
422 "Mapping of capability and dependency in this
427 description "Identifier for VNF access point mapping";
431 container capability {
432 leaf member-vnf-index {
433 description "Reference to member VNF within this network service";
435 path "../../../constituent-vnfd/member-vnf-index";
439 leaf capability-ref {
441 "Reference to the capability in the specified
442 member VNF. This should be a leafref as follows:
443 path \"/vnfd:vnf-catalog/vnfd[id=
444 ../../constituent-vnfd[member-vnf-index=
445 ../member-vnf-index]/vnfd-id-ref]/
446 vnfap/capability/name\"";
451 container dependency {
452 leaf member-vnf-index {
453 description "Reference to member VNF within this network service";
455 path "../../../constituent-vnfd/member-vnf-index";
459 leaf dependency-ref {
461 "Reference to the depenency in the specified
462 member VNF. This should be a leafref as follows:
463 path \"/vnfd:vnf-catalog/vnfd[id=
464 ../../constituent-vnfd[member-vnf-index=
465 ../member-vnf-index]/vnfd-id-ref]/
466 vnfap/dependency/name\"";
472 list scaling-group-descriptor {
474 "scaling group descriptor within this network service.
475 The scaling group defines a group of VNFs,
476 and the ratio of VNFs in the network service
477 that is used as target for scaling action";
482 description "Name of this scaling group.";
486 list scaling-policy {
492 "Name of the scaling policy";
499 type scaling-policy-type;
504 "Specifies if the scaling policy can be applied";
509 leaf scale-in-operation-type {
511 "Operation to be applied to check between scaling criterias to
512 check if the scale in threshold condition has been met.
514 type scaling-criteria-operation;
518 leaf scale-out-operation-type {
520 "Operation to be applied to check between scaling criterias to
521 check if the scale out threshold condition has been met.
523 type scaling-criteria-operation;
527 leaf threshold-time {
529 "The duration for which the criteria must hold true";
536 "The duration after a scaling-in/scaling-out action has been
537 triggered, for which there will be no further optional";
542 list scaling-criteria {
544 "list of conditions to be met for generating scaling
552 leaf scale-in-threshold {
554 "Value below which scale-in requests are generated";
558 leaf scale-out-threshold {
560 "Value above which scale-out requests are generated";
564 leaf ns-monitoring-param-ref {
566 "Reference to the NS level monitoring parameter
569 path "../../../../monitoring-param/id";
576 description "List of VNFs in this scaling group";
577 key "member-vnf-index-ref";
579 leaf member-vnf-index-ref {
580 description "member VNF index of this member VNF";
582 path "../../../constituent-vnfd/member-vnf-index";
588 "count of this member VNF within this scaling group.
589 The count allows to define the number of instances
590 when a scaling action targets this scaling group";
596 leaf min-instance-count {
598 "Minimum instances of the scaling group which are allowed.
599 These instances are created by default when the network service
605 leaf max-instance-count {
607 "Maximum instances of this scaling group that are allowed
608 in a single network service. The network service scaling
609 will fail, when the number of service group instances
610 exceed the max-instance-count specified.";
615 list scaling-config-action {
616 description "List of scaling config actions";
620 description "scaling trigger";
621 type scaling-trigger;
624 leaf ns-config-primitive-name-ref {
625 description "Reference to the NS config name primitive";
627 path "../../../service-primitive/name";
633 list placement-groups {
634 description "List of placement groups at NS level";
637 uses manotypes:placement-group-info;
641 "List of VNFDs that are part of this placement group";
643 key "member-vnf-index-ref";
645 leaf member-vnf-index-ref {
646 description "member VNF index of this member VNF";
648 path "../../../constituent-vnfd/member-vnf-index";
654 "Identifier for the VNFD.";
656 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
662 uses manotypes:ip-profile-list;
664 list vnf-dependency {
666 "List of VNF dependencies.";
668 leaf vnf-source-ref {
670 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
673 leaf vnf-depends-on-ref {
675 "Reference to VNF that sorce VNF depends.";
677 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
684 "List of VNF Forwarding Graph Descriptors (VNFFGD).";
690 "Identifier for the VNFFGD.";
702 "Short name for VNFFGD for UI";
707 description "Provider of the VNFFGD.";
712 description "Description of the VNFFGD.";
717 description "Version of the VNFFGD";
723 "List of Rendered Service Paths (RSP).";
729 "Identifier for the RSP.";
739 list vnfd-connection-point-ref {
741 "A list of references to connection points.";
742 key "member-vnf-index-ref";
744 leaf member-vnf-index-ref {
745 description "Reference to member-vnf within constituent-vnfds";
747 path "../../../../constituent-vnfd/member-vnf-index";
754 "A number that denotes the order of a VNF in a chain";
759 "A reference to a vnfd. This is a
761 ../../../../nsd:constituent-vnfd
762 + [nsd:id = current()/../nsd:id-ref]
764 NOTE: An issue with confd is preventing the
765 use of xpath. Seems to be an issue with leafref
766 to leafref, whose target is in a different module.
767 Once that is resovled this will switched to use
772 leaf vnfd-connection-point-ref {
774 "A reference to a connection point name
775 in a vnfd. This is a leafref to path:
776 /vnfd:vnfd-catalog/vnfd:vnfd
777 + [vnfd:id = current()/../nsd:vnfd-id-ref]
778 + /vnfd:connection-point/vnfd:name
779 NOTE: An issue with confd is preventing the
780 use of xpath. Seems to be an issue with leafref
781 to leafref, whose target is in a different module.
782 Once that is resovled this will switched to use
791 "List of classifier rules.";
797 "Identifier for the classifier rule.";
803 "Name of the classifier.";
809 "A reference to the RSP.";
815 leaf member-vnf-index-ref {
816 description "Reference to member-vnf within constituent-vnfds";
818 path "../../../constituent-vnfd/member-vnf-index";
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 resovled this will switched to use
837 leaf vnfd-connection-point-ref {
839 "A reference to a connection point name
840 in a vnfd. This is a leafref to path:
841 /vnfd:vnfd-catalog/vnfd:vnfd
842 + [vnfd:id = current()/../nsd:vnfd-id-ref]
843 + /vnfd:connection-point/vnfd:name
844 NOTE: An issue with confd is preventing the
845 use of xpath. Seems to be an issue with leafref
846 to leafref, whose target is in a different module.
847 Once that is resovled this will switched to use
852 list match-attributes {
854 "List of match attributes.";
860 "Identifier for the classifier match attribute rule.";
870 leaf source-ip-address {
872 "Source IP address.";
873 type inet:ip-address;
876 leaf destination-ip-address {
878 "Destination IP address.";
879 type inet:ip-address;
884 "Source port number.";
885 type inet:port-number;
888 leaf destination-port {
890 "Destination port number.";
891 type inet:port-number;
893 //TODO: Add more match criteria
898 list monitoring-param {
900 "List of monitoring parameters from VNF's that should be
901 propogated up into NSR";
912 uses manotypes:monitoring-param-value;
913 uses manotypes:monitoring-param-ui-data;
914 uses manotypes:monitoring-param-aggregation;
916 list vnfd-monitoring-param {
917 description "A list of VNFD monitoring params";
918 key "vnfd-id-ref vnfd-monitoring-param-ref";
922 "A reference to a vnfd. This is a
924 ../../../../nsd:constituent-vnfd
925 + [nsd:id = current()/../nsd:id-ref]
927 NOTE: An issue with confd is preventing the
928 use of xpath. Seems to be an issue with leafref
929 to leafref, whose target is in a different module.
930 Once that is resolved this will switched to use
936 leaf vnfd-monitoring-param-ref {
937 description "A reference to the VNFD monitoring param";
939 path "/vnfd:vnfd-catalog/vnfd:vnfd"
940 + "[vnfd:id = current()/../vnfd-id-ref]"
941 + "/vnfd:monitoring-param/vnfd:id";
945 leaf-list member-vnf-index-ref {
947 "Optional reference to member-vnf within constituent-vnfds";
953 uses manotypes:input-parameter-xpath;
955 list parameter-pool {
957 "Pool of parameter values which must be
958 pulled from during configuration";
963 "Name of the configuration value pool";
969 "Create a range of values to populate the pool with";
973 "Generated pool values start at this value";
980 "Generated pool values stop at this value";
987 uses manotypes:ns-service-primitive;
989 list initial-config-primitive {
990 rwpb:msg-new NsdInitialConfigPrimitive;
992 "Initial set of configuration primitives for NSD.";
995 uses ns-initial-config-primitive;
1000 description "Used to configure the list of public keys to be injected as part
1001 of ns instantiation";
1004 description "Name of this key pair";
1009 description "Key associated with this key pair";
1016 description "List of users to be added through cloud-config";
1019 description "Name of the user ";
1024 description "The user name's real name";
1030 description "Used to configure the list of public keys to be injected as part
1031 of ns instantiation";
1034 description "Name of this key pair";
1039 description "Key associated with this key pair";
1047 container nsd-catalog {
1052 uses nsd-descriptor;