4 * Copyright 2016-2017 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 {
56 "Update model to support projects.";
61 "Initial revision. This YANG file defines
62 the Network Service Descriptor (NSD)";
64 "Derived from earlier versions of base YANG files";
67 typedef scaling-trigger {
84 typedef scaling-policy-type {
95 typedef scaling-criteria-operation {
106 grouping primitive-parameter {
109 "Name of the parameter.";
115 "Data type associated with the name.";
116 type manotypes:parameter-data-type;
120 description "Is this field mandatory";
126 description "The default value for this field";
130 leaf parameter-pool {
131 description "NSD Parameter pool name to use for this paramter";
136 grouping nsd-descriptor-common {
138 description "Identifier for the NSD.";
143 description "NSD name.";
149 description "NSD short name.";
154 description "Vendor of the NSD.";
160 "File path for the vendor specific logo. For example icons/mylogo.png.
161 The logo should be part of the network service";
166 description "Description of the NSD.";
171 description "Version of the NSD";
175 list connection-point {
177 "List for external connection points.
178 Each NS has one or more external connection
179 points. As the name implies that external
180 connection points are used for connecting
181 the NS to other NS or to external networks.
182 Each NS exposes these connection points to
183 the orchestrator. The orchestrator can
184 construct network service chains by
185 connecting the connection points between
191 "Name of the NS connection point.";
197 "Type of the connection point.";
198 type manotypes:connection-point-type;
202 list scaling-group-descriptor {
204 "scaling group descriptor within this network service.
205 The scaling group defines a group of VNFs,
206 and the ratio of VNFs in the network service
207 that is used as target for scaling action";
212 description "Name of this scaling group.";
216 list scaling-policy {
222 "Name of the scaling policy";
229 type scaling-policy-type;
234 "Specifies if the scaling policy can be applied";
239 leaf scale-in-operation-type {
241 "Operation to be applied to check between scaling criterias to
242 check if the scale in threshold condition has been met.
244 type scaling-criteria-operation;
248 leaf scale-out-operation-type {
250 "Operation to be applied to check between scaling criterias to
251 check if the scale out threshold condition has been met.
253 type scaling-criteria-operation;
257 leaf threshold-time {
259 "The duration for which the criteria must hold true";
266 "The duration after a scaling-in/scaling-out action has been
267 triggered, for which there will be no further optional";
272 list scaling-criteria {
274 "list of conditions to be met for generating scaling
282 leaf scale-in-threshold {
284 "Value below which scale-in requests are generated";
288 leaf scale-out-threshold {
290 "Value above which scale-out requests are generated";
294 leaf ns-monitoring-param-ref {
296 "Reference to the NS level monitoring parameter
299 path "../../../../monitoring-param/id";
306 description "List of VNFs in this scaling group";
307 key "member-vnf-index-ref";
309 leaf member-vnf-index-ref {
310 description "member VNF index of this member VNF";
312 path "../../../constituent-vnfd/member-vnf-index";
318 "count of this member VNF within this scaling group.
319 The count allows to define the number of instances
320 when a scaling action targets this scaling group";
326 leaf min-instance-count {
328 "Minimum instances of the scaling group which are allowed.
329 These instances are created by default when the network service
335 leaf max-instance-count {
337 "Maximum instances of this scaling group that are allowed
338 in a single network service. The network service scaling
339 will fail, when the number of service group instances
340 exceed the max-instance-count specified.";
345 list scaling-config-action {
346 description "List of scaling config actions";
350 description "scaling trigger";
351 type scaling-trigger;
354 leaf ns-config-primitive-name-ref {
355 description "Reference to the NS config name primitive";
357 path "../../../service-primitive/name";
366 "List of VNF Forwarding Graph Descriptors (VNFFGD).";
372 "Identifier for the VNFFGD.";
384 "Short name for VNFFGD for UI";
389 description "Provider of the VNFFGD.";
394 description "Description of the VNFFGD.";
399 description "Version of the VNFFGD";
405 "List of Rendered Service Paths (RSP).";
411 "Identifier for the RSP.";
421 list vnfd-connection-point-ref {
423 "A list of references to connection points.";
424 key "member-vnf-index-ref";
426 leaf member-vnf-index-ref {
427 description "Reference to member-vnf within constituent-vnfds";
429 path "../../../../constituent-vnfd/member-vnf-index";
436 "A number that denotes the order of a VNF in a chain";
441 "A reference to a vnfd. This is a
443 ../../../../nsd:constituent-vnfd
444 + [nsd:id = current()/../nsd:id-ref]
446 NOTE: An issue with confd is preventing the
447 use of xpath. Seems to be an issue with leafref
448 to leafref, whose target is in a different module.
449 Once that is resovled this will switched to use
452 path "../../../../constituent-vnfd" +
453 "[member-vnf-index = current()/../member-vnf-index-ref]" +
458 leaf vnfd-connection-point-ref {
460 "A reference to a connection point name
461 in a vnfd. This is a leafref to path:
462 /vnfd:vnfd-catalog/vnfd:vnfd
463 + [vnfd:id = current()/../nsd:vnfd-id-ref]
464 + /vnfd:connection-point/vnfd:name
465 NOTE: An issue with confd is preventing the
466 use of xpath. Seems to be an issue with leafref
467 to leafref, whose target is in a different module.
468 Once that is resovled this will switched to use
470 // TODO: Keeping as string as this needs to be
471 // diffenent lvel based of if it is nsd-catalog or
474 // path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
475 // "[vnfd:id = current()/../vnfd-id-ref]/" +
476 // "vnfd:connection-point/vnfd:name";
485 "List of classifier rules.";
491 "Identifier for the classifier rule.";
497 "Name of the classifier.";
503 "A reference to the RSP.";
509 leaf member-vnf-index-ref {
510 description "Reference to member-vnf within constituent-vnfds";
512 path "../../../constituent-vnfd/member-vnf-index";
518 "A reference to a vnfd. This is a
520 ../../../nsd:constituent-vnfd
521 + [nsd:id = current()/../nsd:id-ref]
523 NOTE: An issue with confd is preventing the
524 use of xpath. Seems to be an issue with leafref
525 to leafref, whose target is in a different module.
526 Once that is resovled this will switched to use
529 path "../../../constituent-vnfd" +
530 "[member-vnf-index = current()/../member-vnf-index-ref]" +
535 leaf vnfd-connection-point-ref {
537 "A reference to a connection point name
538 in a vnfd. This is a leafref to path:
539 /vnfd:vnfd-catalog/vnfd:vnfd
540 + [vnfd:id = current()/../nsd:vnfd-id-ref]
541 + /vnfd:connection-point/vnfd:name
542 NOTE: An issue with confd is preventing the
543 use of xpath. Seems to be an issue with leafref
544 to leafref, whose target is in a different module.
545 Once that is resovled this will switched to use
547 // TODO: Keeping as string as this needs to be
548 // diffenent lvel based of if it is nsd-catalog or
551 // path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
552 // "[vnfd:id = current()/../vnfd-id-ref]/" +
553 // "vnfd:connection-point/vnfd:name";
558 list match-attributes {
560 "List of match attributes.";
566 "Identifier for the classifier match attribute rule.";
576 leaf source-ip-address {
578 "Source IP address.";
579 type inet:ip-address;
582 leaf destination-ip-address {
584 "Destination IP address.";
585 type inet:ip-address;
590 "Source port number.";
591 type inet:port-number;
594 leaf destination-port {
596 "Destination port number.";
597 type inet:port-number;
599 //TODO: Add more match criteria
604 uses manotypes:ip-profile-list;
606 uses manotypes:ns-service-primitive;
608 list initial-config-primitive {
609 rwpb:msg-new NsdInitialConfigPrimitive;
611 "Initial set of configuration primitives for NSD.";
614 uses manotypes:initial-config;
617 uses manotypes:input-parameter-xpath;
619 list parameter-pool {
621 "Pool of parameter values which must be
622 pulled from during configuration";
627 "Name of the configuration value pool";
633 "Create a range of values to populate the pool with";
637 "Generated pool values start at this value";
644 "Generated pool values stop at this value";
653 description "Used to configure the list of public keys to be injected as part
654 of ns instantiation";
657 description "Name of this key pair";
662 description "Key associated with this key pair";
669 description "List of users to be added through cloud-config";
672 description "Name of the user ";
677 description "The user name's real name";
683 description "Used to configure the list of public keys to be injected as part
684 of ns instantiation";
687 description "Name of this key pair";
692 description "Key associated with this key pair";
699 grouping nsd-vld-common {
700 /* Still having issues modelling this,
701 see the comments under vnfd-connection-point-ref
704 "List of Virtual Link Descriptors.";
708 "Identifier for the VLD.";
714 "Virtual Link Descriptor (VLD) name.";
720 "Short name for VLD for UI";
725 description "Provider of the VLD.";
730 description "Description of the VLD.";
735 description "Version of the VLD";
740 type manotypes:virtual-link-type;
743 leaf root-bandwidth {
745 "For ELAN this is the aggregate bandwidth.";
749 leaf leaf-bandwidth {
751 "For ELAN this is the bandwidth of branches.";
755 // replicate for pnfd container here
756 uses manotypes:provider-network;
759 description "Flag indicating whether this network is a VIM management network";
765 description "Extra parameters for VLD instantiation";
767 case vim-network-ref {
768 leaf vim-network-name {
770 "Name of network in VIM account. This is used to indicate
771 pre-provisioned network name in cloud account.";
776 case vim-network-profile {
777 leaf ip-profile-ref {
778 description "Named reference to IP-profile object";
793 list vnfd-connection-point-ref {
795 "A list of references to connection points.";
796 key "member-vnf-index-ref vnfd-connection-point-ref";
798 leaf member-vnf-index-ref {
799 description "Reference to member-vnf within constituent-vnfds";
801 path "../../../constituent-vnfd/member-vnf-index";
807 "A reference to a vnfd. This is a
809 ../../nsd:constituent-vnfd
810 + [nsd:id = current()/../nsd:id-ref]
812 NOTE: An issue with confd is preventing the
813 use of xpath. Seems to be an issue with leafref
814 to leafref, whose target is in a different module.
815 Once that is resovled this will switched to use
820 leaf vnfd-connection-point-ref {
821 description "A reference to a connection point name";
823 path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
824 "[vnfd:id = current()/../vnfd-id-ref]/" +
825 "vnfd:connection-point/vnfd:name";
832 grouping nsr-nsd-vld {
839 list vnfd-connection-point-ref {
841 "A list of references to connection points.";
842 key "member-vnf-index-ref vnfd-connection-point-ref";
844 leaf member-vnf-index-ref {
845 description "Reference to member-vnf within constituent-vnfds";
847 path "../../../constituent-vnfd/member-vnf-index";
853 "A reference to a vnfd. This is a
855 ../../nsd:constituent-vnfd
856 + [nsd:id = current()/../nsd:id-ref]
858 NOTE: An issue with confd is preventing the
859 use of xpath. Seems to be an issue with leafref
860 to leafref, whose target is in a different module.
861 Once that is resovled this will switched to use
866 leaf vnfd-connection-point-ref {
867 description "A reference to a connection point name";
869 path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
870 "[vnfd:id = current()/../vnfd-id-ref]/" +
871 "vnfd:connection-point/vnfd:name";
878 grouping nsd-constituent-vnfd {
879 list constituent-vnfd {
881 "List of VNFDs that are part of this
884 key "member-vnf-index";
886 leaf member-vnf-index {
888 "Identifier/index for the VNFD. This separate id
889 is required to ensure that multiple VNFs can be
896 "Identifier for the VNFD.";
898 path "../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
902 leaf start-by-default {
904 "VNFD is started as part of the NS instantiation";
911 grouping nsr-nsd-constituent-vnfd {
912 list constituent-vnfd {
914 "List of VNFDs that are part of this
917 key "member-vnf-index";
919 leaf member-vnf-index {
921 "Identifier/index for the VNFD. This separate id
922 is required to ensure that multiple VNFs can be
929 "Identifier for the VNFD.";
931 path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
935 leaf start-by-default {
937 "VNFD is started as part of the NS instantiation";
944 grouping nsd-placement-groups {
945 list placement-groups {
946 description "List of placement groups at NS level";
949 uses manotypes:placement-group-info;
953 "List of VNFDs that are part of this placement group";
955 key "member-vnf-index-ref";
957 leaf member-vnf-index-ref {
958 description "member VNF index of this member VNF";
960 path "../../../constituent-vnfd/member-vnf-index";
966 "Identifier for the VNFD.";
968 path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
975 grouping nsr-nsd-placement-groups {
976 list placement-groups {
977 description "List of placement groups at NS level";
980 uses manotypes:placement-group-info;
984 "List of VNFDs that are part of this placement group";
986 key "member-vnf-index-ref";
988 leaf member-vnf-index-ref {
989 description "member VNF index of this member VNF";
991 path "../../../constituent-vnfd/member-vnf-index";
997 "Identifier for the VNFD.";
999 path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
1006 grouping nsd-vnf-dependency {
1007 list vnf-dependency {
1009 "List of VNF dependencies.";
1011 leaf vnf-source-ref {
1013 path "../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
1016 leaf vnf-depends-on-ref {
1018 "Reference to VNF that sorce VNF depends.";
1020 path "../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
1026 grouping nsr-nsd-vnf-dependency {
1027 list vnf-dependency {
1029 "List of VNF dependencies.";
1031 leaf vnf-source-ref {
1033 path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
1036 leaf vnf-depends-on-ref {
1038 "Reference to VNF that sorce VNF depends.";
1040 path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
1046 grouping monitoring-param-common {
1047 // list monitoring-param {
1049 "List of monitoring parameters from VNF's that should be
1050 propogated up into NSR";
1059 uses manotypes:monitoring-param-value;
1060 uses manotypes:monitoring-param-ui-data;
1061 uses manotypes:monitoring-param-aggregation;
1064 grouping nsd-monitoring-param {
1066 list monitoring-param {
1069 uses monitoring-param-common;
1071 list vnfd-monitoring-param {
1072 description "A list of VNFD monitoring params";
1073 key "vnfd-id-ref vnfd-monitoring-param-ref";
1077 "A reference to a vnfd. This is a
1079 ../../../../nsd:constituent-vnfd
1080 + [nsd:id = current()/../nsd:id-ref]
1082 NOTE: An issue with confd is preventing the
1083 use of xpath. Seems to be an issue with leafref
1084 to leafref, whose target is in a different module.
1085 Once that is resolved this will switched to use
1091 leaf vnfd-monitoring-param-ref {
1092 description "A reference to the VNFD monitoring param";
1094 path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd"
1095 + "[vnfd:id = current()/../vnfd-id-ref]"
1096 + "/vnfd:monitoring-param/vnfd:id";
1100 leaf-list member-vnf-index-ref {
1102 "Optional reference to member-vnf within constituent-vnfds";
1109 grouping nsr-nsd-monitoring-param {
1110 list monitoring-param {
1113 uses monitoring-param-common;
1115 list vnfd-monitoring-param {
1116 description "A list of VNFD monitoring params";
1117 key "vnfd-id-ref vnfd-monitoring-param-ref";
1121 "A reference to a vnfd. This is a
1123 ../../../../nsd:constituent-vnfd
1124 + [nsd:id = current()/../nsd:id-ref]
1126 NOTE: An issue with confd is preventing the
1127 use of xpath. Seems to be an issue with leafref
1128 to leafref, whose target is in a different module.
1129 Once that is resolved this will switched to use
1135 leaf vnfd-monitoring-param-ref {
1136 description "A reference to the VNFD monitoring param";
1138 path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd"
1139 + "[vnfd:id = current()/../vnfd-id-ref]"
1140 + "/vnfd:monitoring-param/vnfd:id";
1144 leaf-list member-vnf-index-ref {
1146 "Optional reference to member-vnf within constituent-vnfds";
1154 augment "/rw-project:project" {
1155 container nsd-catalog {
1160 uses nsd-descriptor-common;
1164 uses nsd-constituent-vnfd;
1166 uses nsd-placement-groups;
1168 uses nsd-vnf-dependency;
1170 uses nsd-monitoring-param;