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";
420 list scaling-group-descriptor {
422 "scaling group descriptor within this network service.
423 The scaling group defines a group of VNFs,
424 and the ratio of VNFs in the network service
425 that is used as target for scaling action";
430 description "Name of this scaling group.";
434 list scaling-policy {
440 "Name of the scaling policy";
447 type scaling-policy-type;
452 "Specifies if the scaling policy can be applied";
457 leaf scale-in-operation-type {
459 "Operation to be applied to check between scaling criterias to
460 check if the scale in threshold condition has been met.
462 type scaling-criteria-operation;
466 leaf scale-out-operation-type {
468 "Operation to be applied to check between scaling criterias to
469 check if the scale out threshold condition has been met.
471 type scaling-criteria-operation;
475 leaf threshold-time {
477 "The duration for which the criteria must hold true";
484 "The duration after a scaling-in/scaling-out action has been
485 triggered, for which there will be no further optional";
490 list scaling-criteria {
492 "list of conditions to be met for generating scaling
500 leaf scale-in-threshold {
502 "Value below which scale-in requests are generated";
506 leaf scale-out-threshold {
508 "Value above which scale-out requests are generated";
512 leaf ns-monitoring-param-ref {
514 "Reference to the NS level monitoring parameter
517 path "../../../../monitoring-param/id";
524 description "List of VNFs in this scaling group";
525 key "member-vnf-index-ref";
527 leaf member-vnf-index-ref {
528 description "member VNF index of this member VNF";
530 path "../../../constituent-vnfd/member-vnf-index";
536 "count of this member VNF within this scaling group.
537 The count allows to define the number of instances
538 when a scaling action targets this scaling group";
544 leaf min-instance-count {
546 "Minimum instances of the scaling group which are allowed.
547 These instances are created by default when the network service
553 leaf max-instance-count {
555 "Maximum instances of this scaling group that are allowed
556 in a single network service. The network service scaling
557 will fail, when the number of service group instances
558 exceed the max-instance-count specified.";
563 list scaling-config-action {
564 description "List of scaling config actions";
568 description "scaling trigger";
569 type scaling-trigger;
572 leaf ns-config-primitive-name-ref {
573 description "Reference to the NS config name primitive";
575 path "../../../service-primitive/name";
581 list placement-groups {
582 description "List of placement groups at NS level";
585 uses manotypes:placement-group-info;
589 "List of VNFDs that are part of this placement group";
591 key "member-vnf-index-ref";
593 leaf member-vnf-index-ref {
594 description "member VNF index of this member VNF";
596 path "../../../constituent-vnfd/member-vnf-index";
602 "Identifier for the VNFD.";
604 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
610 uses manotypes:ip-profile-list;
612 list vnf-dependency {
614 "List of VNF dependencies.";
616 leaf vnf-source-ref {
618 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
621 leaf vnf-depends-on-ref {
623 "Reference to VNF that sorce VNF depends.";
625 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
632 "List of VNF Forwarding Graph Descriptors (VNFFGD).";
638 "Identifier for the VNFFGD.";
650 "Short name for VNFFGD for UI";
655 description "Provider of the VNFFGD.";
660 description "Description of the VNFFGD.";
665 description "Version of the VNFFGD";
671 "List of Rendered Service Paths (RSP).";
677 "Identifier for the RSP.";
687 list vnfd-connection-point-ref {
689 "A list of references to connection points.";
690 key "member-vnf-index-ref";
692 leaf member-vnf-index-ref {
693 description "Reference to member-vnf within constituent-vnfds";
695 path "../../../../constituent-vnfd/member-vnf-index";
702 "A number that denotes the order of a VNF in a chain";
707 "A reference to a vnfd. This is a
709 ../../../../nsd:constituent-vnfd
710 + [nsd:id = current()/../nsd:id-ref]
712 NOTE: An issue with confd is preventing the
713 use of xpath. Seems to be an issue with leafref
714 to leafref, whose target is in a different module.
715 Once that is resovled this will switched to use
720 leaf vnfd-connection-point-ref {
722 "A reference to a connection point name
723 in a vnfd. This is a leafref to path:
724 /vnfd:vnfd-catalog/vnfd:vnfd
725 + [vnfd:id = current()/../nsd:vnfd-id-ref]
726 + /vnfd:connection-point/vnfd:name
727 NOTE: An issue with confd is preventing the
728 use of xpath. Seems to be an issue with leafref
729 to leafref, whose target is in a different module.
730 Once that is resovled this will switched to use
739 "List of classifier rules.";
745 "Identifier for the classifier rule.";
751 "Name of the classifier.";
757 "A reference to the RSP.";
763 leaf member-vnf-index-ref {
764 description "Reference to member-vnf within constituent-vnfds";
766 path "../../../constituent-vnfd/member-vnf-index";
772 "A reference to a vnfd. This is a
774 ../../../nsd:constituent-vnfd
775 + [nsd:id = current()/../nsd:id-ref]
777 NOTE: An issue with confd is preventing the
778 use of xpath. Seems to be an issue with leafref
779 to leafref, whose target is in a different module.
780 Once that is resovled this will switched to use
785 leaf vnfd-connection-point-ref {
787 "A reference to a connection point name
788 in a vnfd. This is a leafref to path:
789 /vnfd:vnfd-catalog/vnfd:vnfd
790 + [vnfd:id = current()/../nsd:vnfd-id-ref]
791 + /vnfd:connection-point/vnfd:name
792 NOTE: An issue with confd is preventing the
793 use of xpath. Seems to be an issue with leafref
794 to leafref, whose target is in a different module.
795 Once that is resovled this will switched to use
800 list match-attributes {
802 "List of match attributes.";
808 "Identifier for the classifier match attribute rule.";
818 leaf source-ip-address {
820 "Source IP address.";
821 type inet:ip-address;
824 leaf destination-ip-address {
826 "Destination IP address.";
827 type inet:ip-address;
832 "Source port number.";
833 type inet:port-number;
836 leaf destination-port {
838 "Destination port number.";
839 type inet:port-number;
841 //TODO: Add more match criteria
846 list monitoring-param {
848 "List of monitoring parameters from VNF's that should be
849 propogated up into NSR";
860 uses manotypes:monitoring-param-value;
861 uses manotypes:monitoring-param-ui-data;
862 uses manotypes:monitoring-param-aggregation;
864 list vnfd-monitoring-param {
865 description "A list of VNFD monitoring params";
866 key "vnfd-id-ref vnfd-monitoring-param-ref";
870 "A reference to a vnfd. This is a
872 ../../../../nsd:constituent-vnfd
873 + [nsd:id = current()/../nsd:id-ref]
875 NOTE: An issue with confd is preventing the
876 use of xpath. Seems to be an issue with leafref
877 to leafref, whose target is in a different module.
878 Once that is resolved this will switched to use
884 leaf vnfd-monitoring-param-ref {
885 description "A reference to the VNFD monitoring param";
887 path "/vnfd:vnfd-catalog/vnfd:vnfd"
888 + "[vnfd:id = current()/../vnfd-id-ref]"
889 + "/vnfd:monitoring-param/vnfd:id";
893 leaf-list member-vnf-index-ref {
895 "Optional reference to member-vnf within constituent-vnfds";
901 uses manotypes:input-parameter-xpath;
903 list parameter-pool {
905 "Pool of parameter values which must be
906 pulled from during configuration";
911 "Name of the configuration value pool";
917 "Create a range of values to populate the pool with";
921 "Generated pool values start at this value";
928 "Generated pool values stop at this value";
935 uses manotypes:ns-service-primitive;
937 list initial-config-primitive {
938 rwpb:msg-new NsdInitialConfigPrimitive;
940 "Initial set of configuration primitives for NSD.";
943 uses ns-initial-config-primitive;
948 description "Used to configure the list of public keys to be injected as part
949 of ns instantiation";
952 description "Name of this key pair";
957 description "Key associated with this key pair";
964 description "List of users to be added through cloud-config";
967 description "Name of the user ";
972 description "The user name's real name";
978 description "Used to configure the list of public keys to be injected as part
979 of ns instantiation";
982 description "Name of this key pair";
987 description "Key associated with this key pair";
995 container nsd-catalog {
1000 uses nsd-descriptor;