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";
846 // TODO (Philip): Fix this
848 // path "../../../constituent-vnfd/member-vnf-index";
855 "A reference to a vnfd. This is a
857 ../../nsd:constituent-vnfd
858 + [nsd:id = current()/../nsd:id-ref]
860 NOTE: An issue with confd is preventing the
861 use of xpath. Seems to be an issue with leafref
862 to leafref, whose target is in a different module.
863 Once that is resovled this will switched to use
868 leaf vnfd-connection-point-ref {
869 description "A reference to a connection point name";
870 // TODO (Philip): Fix this
872 // path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd" +
873 // "[vnfd:id = current()/../vnfd-id-ref]/" +
874 // "vnfd:connection-point/vnfd:name";
882 grouping nsd-constituent-vnfd {
883 list constituent-vnfd {
885 "List of VNFDs that are part of this
888 key "member-vnf-index";
890 leaf member-vnf-index {
892 "Identifier/index for the VNFD. This separate id
893 is required to ensure that multiple VNFs can be
900 "Identifier for the VNFD.";
902 path "../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
906 leaf start-by-default {
908 "VNFD is started as part of the NS instantiation";
915 grouping nsr-nsd-constituent-vnfd {
916 list constituent-vnfd {
918 "List of VNFDs that are part of this
921 key "member-vnf-index";
923 leaf member-vnf-index {
925 "Identifier/index for the VNFD. This separate id
926 is required to ensure that multiple VNFs can be
933 "Identifier for the VNFD.";
934 // TODO (Philip): Fix this
936 // path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
941 leaf start-by-default {
943 "VNFD is started as part of the NS instantiation";
950 grouping nsd-placement-groups {
951 list placement-groups {
952 description "List of placement groups at NS level";
955 uses manotypes:placement-group-info;
959 "List of VNFDs that are part of this placement group";
961 key "member-vnf-index-ref";
963 leaf member-vnf-index-ref {
964 description "member VNF index of this member VNF";
966 path "../../../constituent-vnfd/member-vnf-index";
972 "Identifier for the VNFD.";
974 path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
981 grouping nsr-nsd-placement-groups {
982 list placement-groups {
983 description "List of placement groups at NS level";
986 uses manotypes:placement-group-info;
990 "List of VNFDs that are part of this placement group";
992 key "member-vnf-index-ref";
994 leaf member-vnf-index-ref {
995 description "member VNF index of this member VNF";
996 // TODO (Philip): Fix this
998 // path "../../../constituent-vnfd/member-vnf-index";
1005 "Identifier for the VNFD.";
1006 // TODO (Philip): Fix this
1008 // path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
1016 grouping nsd-vnf-dependency {
1017 list vnf-dependency {
1019 "List of VNF dependencies.";
1021 leaf vnf-source-ref {
1023 path "../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
1026 leaf vnf-depends-on-ref {
1028 "Reference to VNF that sorce VNF depends.";
1030 path "../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
1036 grouping nsr-nsd-vnf-dependency {
1037 list vnf-dependency {
1039 "List of VNF dependencies.";
1041 leaf vnf-source-ref {
1043 path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
1046 leaf vnf-depends-on-ref {
1048 "Reference to VNF that sorce VNF depends.";
1050 path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
1056 grouping monitoring-param-common {
1057 // list monitoring-param {
1059 "List of monitoring parameters from VNF's that should be
1060 propogated up into NSR";
1069 uses manotypes:monitoring-param-value;
1070 uses manotypes:monitoring-param-ui-data;
1071 uses manotypes:monitoring-param-aggregation;
1074 grouping nsd-monitoring-param {
1076 list monitoring-param {
1079 uses monitoring-param-common;
1081 list vnfd-monitoring-param {
1082 description "A list of VNFD monitoring params";
1083 key "vnfd-id-ref vnfd-monitoring-param-ref";
1087 "A reference to a vnfd. This is a
1089 ../../../../nsd:constituent-vnfd
1090 + [nsd:id = current()/../nsd:id-ref]
1092 NOTE: An issue with confd is preventing the
1093 use of xpath. Seems to be an issue with leafref
1094 to leafref, whose target is in a different module.
1095 Once that is resolved this will switched to use
1101 leaf vnfd-monitoring-param-ref {
1102 description "A reference to the VNFD monitoring param";
1104 path "../../../../../vnfd:vnfd-catalog/vnfd:vnfd"
1105 + "[vnfd:id = current()/../vnfd-id-ref]"
1106 + "/vnfd:monitoring-param/vnfd:id";
1110 leaf-list member-vnf-index-ref {
1112 "Optional reference to member-vnf within constituent-vnfds";
1119 grouping nsr-nsd-monitoring-param {
1120 list monitoring-param {
1123 uses monitoring-param-common;
1125 list vnfd-monitoring-param {
1126 description "A list of VNFD monitoring params";
1127 key "vnfd-id-ref vnfd-monitoring-param-ref";
1131 "A reference to a vnfd. This is a
1133 ../../../../nsd:constituent-vnfd
1134 + [nsd:id = current()/../nsd:id-ref]
1136 NOTE: An issue with confd is preventing the
1137 use of xpath. Seems to be an issue with leafref
1138 to leafref, whose target is in a different module.
1139 Once that is resolved this will switched to use
1145 leaf vnfd-monitoring-param-ref {
1146 description "A reference to the VNFD monitoring param";
1148 path "../../../../../../vnfd:vnfd-catalog/vnfd:vnfd"
1149 + "[vnfd:id = current()/../vnfd-id-ref]"
1150 + "/vnfd:monitoring-param/vnfd:id";
1154 leaf-list member-vnf-index-ref {
1156 "Optional reference to member-vnf within constituent-vnfds";
1164 augment "/rw-project:project" {
1165 container nsd-catalog {
1170 uses nsd-descriptor-common;
1174 uses nsd-constituent-vnfd;
1176 uses nsd-placement-groups;
1178 uses nsd-vnf-dependency;
1180 uses nsd-monitoring-param;