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 nsd-descriptor {
129 description "Identifier for the NSD.";
134 description "NSD name.";
140 description "NSD short name.";
145 description "Vendor of the NSD.";
151 "File path for the vendor specific logo. For example icons/mylogo.png.
152 The logo should be part of the network service";
157 description "Description of the NSD.";
162 description "Version of the NSD";
166 list connection-point {
168 "List for external connection points.
169 Each NS has one or more external connection
170 points. As the name implies that external
171 connection points are used for connecting
172 the NS to other NS or to external networks.
173 Each NS exposes these connection points to
174 the orchestrator. The orchestrator can
175 construct network service chains by
176 connecting the connection points between
182 "Name of the NS connection point.";
188 "Type of the connection point.";
189 type manotypes:connection-point-type;
193 /* Still having issues modelling this,
194 see the comments under vnfd-connection-point-ref
198 "List of Virtual Link Descriptors.";
204 "Identifier for the VLD.";
210 "Virtual Link Descriptor (VLD) name.";
216 "Short name for VLD for UI";
221 description "Provider of the VLD.";
226 description "Description of the VLD.";
231 description "Version of the VLD";
236 type manotypes:virtual-link-type;
239 leaf root-bandwidth {
241 "For ELAN this is the aggregate bandwidth.";
245 leaf leaf-bandwidth {
247 "For ELAN this is the bandwidth of branches.";
251 list vnfd-connection-point-ref {
253 "A list of references to connection points.";
254 key "member-vnf-index-ref";
256 leaf member-vnf-index-ref {
257 description "Reference to member-vnf within constituent-vnfds";
259 path "../../../constituent-vnfd/member-vnf-index";
265 "A reference to a vnfd. This is a
267 ../../nsd:constituent-vnfd
268 + [nsd:id = current()/../nsd:id-ref]
270 NOTE: An issue with confd is preventing the
271 use of xpath. Seems to be an issue with leafref
272 to leafref, whose target is in a different module.
273 Once that is resovled this will switched to use
278 leaf vnfd-connection-point-ref {
279 description "A reference to a connection point name";
281 path "/vnfd:vnfd-catalog/vnfd:vnfd" +
282 "[vnfd:id = current()/../vnfd-id-ref]/" +
283 "vnfd:connection-point/vnfd:name";
288 // replicate for pnfd container here
289 uses manotypes:provider-network;
292 description "Flag indicating whether this network is a VIM management network";
298 description "Extra parameters for VLD instantiation";
300 case vim-network-ref {
301 leaf vim-network-name {
303 "Name of network in VIM account. This is used to indicate
304 pre-provisioned network name in cloud account.";
309 case vim-network-profile {
310 leaf ip-profile-ref {
311 description "Named reference to IP-profile object";
319 list constituent-vnfd {
321 "List of VNFDs that are part of this
324 key "member-vnf-index";
326 leaf member-vnf-index {
328 "Identifier/index for the VNFD. This separate id
329 is required to ensure that multiple VNFs can be
336 "Identifier for the VNFD.";
338 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
342 leaf start-by-default {
344 "VNFD is started as part of the NS instantiation";
350 list scaling-group-descriptor {
352 "scaling group descriptor within this network service.
353 The scaling group defines a group of VNFs,
354 and the ratio of VNFs in the network service
355 that is used as target for scaling action";
360 description "Name of this scaling group.";
364 list scaling-policy {
370 "Name of the scaling policy";
377 type scaling-policy-type;
382 "Specifies if the scaling policy can be applied";
387 leaf scale-in-operation-type {
389 "Operation to be applied to check between scaling criterias to
390 check if the scale in threshold condition has been met.
392 type scaling-criteria-operation;
396 leaf scale-out-operation-type {
398 "Operation to be applied to check between scaling criterias to
399 check if the scale out threshold condition has been met.
401 type scaling-criteria-operation;
405 leaf threshold-time {
407 "The duration for which the criteria must hold true";
414 "The duration after a scaling-in/scaling-out action has been
415 triggered, for which there will be no further optional";
420 list scaling-criteria {
422 "list of conditions to be met for generating scaling
430 leaf scale-in-threshold {
432 "Value below which scale-in requests are generated";
436 leaf scale-out-threshold {
438 "Value above which scale-out requests are generated";
442 leaf ns-monitoring-param-ref {
444 "Reference to the NS level monitoring parameter
447 path "../../../../monitoring-param/id";
454 description "List of VNFs in this scaling group";
455 key "member-vnf-index-ref";
457 leaf member-vnf-index-ref {
458 description "member VNF index of this member VNF";
460 path "../../../constituent-vnfd/member-vnf-index";
466 "count of this member VNF within this scaling group.
467 The count allows to define the number of instances
468 when a scaling action targets this scaling group";
474 leaf min-instance-count {
476 "Minimum instances of the scaling group which are allowed.
477 These instances are created by default when the network service
483 leaf max-instance-count {
485 "Maximum instances of this scaling group that are allowed
486 in a single network service. The network service scaling
487 will fail, when the number of service group instances
488 exceed the max-instance-count specified.";
493 list scaling-config-action {
494 description "List of scaling config actions";
498 description "scaling trigger";
499 type scaling-trigger;
502 leaf ns-config-primitive-name-ref {
503 description "Reference to the NS config name primitive";
505 path "../../../service-primitive/name";
511 list placement-groups {
512 description "List of placement groups at NS level";
515 uses manotypes:placement-group-info;
519 "List of VNFDs that are part of this placement group";
521 key "member-vnf-index-ref";
523 leaf member-vnf-index-ref {
524 description "member VNF index of this member VNF";
526 path "../../../constituent-vnfd/member-vnf-index";
532 "Identifier for the VNFD.";
534 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
540 uses manotypes:ip-profile-list;
542 list vnf-dependency {
544 "List of VNF dependencies.";
546 leaf vnf-source-ref {
548 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
551 leaf vnf-depends-on-ref {
553 "Reference to VNF that sorce VNF depends.";
555 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
562 "List of VNF Forwarding Graph Descriptors (VNFFGD).";
568 "Identifier for the VNFFGD.";
580 "Short name for VNFFGD for UI";
585 description "Provider of the VNFFGD.";
590 description "Description of the VNFFGD.";
595 description "Version of the VNFFGD";
601 "List of Rendered Service Paths (RSP).";
607 "Identifier for the RSP.";
617 list vnfd-connection-point-ref {
619 "A list of references to connection points.";
620 key "member-vnf-index-ref";
622 leaf member-vnf-index-ref {
623 description "Reference to member-vnf within constituent-vnfds";
625 path "../../../../constituent-vnfd/member-vnf-index";
632 "A number that denotes the order of a VNF in a chain";
637 "A reference to a vnfd. This is a
639 ../../../../nsd:constituent-vnfd
640 + [nsd:id = current()/../nsd:id-ref]
642 NOTE: An issue with confd is preventing the
643 use of xpath. Seems to be an issue with leafref
644 to leafref, whose target is in a different module.
645 Once that is resovled this will switched to use
650 leaf vnfd-connection-point-ref {
652 "A reference to a connection point name
653 in a vnfd. This is a leafref to path:
654 /vnfd:vnfd-catalog/vnfd:vnfd
655 + [vnfd:id = current()/../nsd:vnfd-id-ref]
656 + /vnfd:connection-point/vnfd:name
657 NOTE: An issue with confd is preventing the
658 use of xpath. Seems to be an issue with leafref
659 to leafref, whose target is in a different module.
660 Once that is resovled this will switched to use
669 "List of classifier rules.";
675 "Identifier for the classifier rule.";
681 "Name of the classifier.";
687 "A reference to the RSP.";
693 leaf member-vnf-index-ref {
694 description "Reference to member-vnf within constituent-vnfds";
696 path "../../../constituent-vnfd/member-vnf-index";
702 "A reference to a vnfd. This is a
704 ../../../nsd:constituent-vnfd
705 + [nsd:id = current()/../nsd:id-ref]
707 NOTE: An issue with confd is preventing the
708 use of xpath. Seems to be an issue with leafref
709 to leafref, whose target is in a different module.
710 Once that is resovled this will switched to use
715 leaf vnfd-connection-point-ref {
717 "A reference to a connection point name
718 in a vnfd. This is a leafref to path:
719 /vnfd:vnfd-catalog/vnfd:vnfd
720 + [vnfd:id = current()/../nsd:vnfd-id-ref]
721 + /vnfd:connection-point/vnfd:name
722 NOTE: An issue with confd is preventing the
723 use of xpath. Seems to be an issue with leafref
724 to leafref, whose target is in a different module.
725 Once that is resovled this will switched to use
730 list match-attributes {
732 "List of match attributes.";
738 "Identifier for the classifier match attribute rule.";
748 leaf source-ip-address {
750 "Source IP address.";
751 type inet:ip-address;
754 leaf destination-ip-address {
756 "Destination IP address.";
757 type inet:ip-address;
762 "Source port number.";
763 type inet:port-number;
766 leaf destination-port {
768 "Destination port number.";
769 type inet:port-number;
771 //TODO: Add more match criteria
776 list monitoring-param {
778 "List of monitoring parameters from VNF's that should be
779 propogated up into NSR";
790 uses manotypes:monitoring-param-value;
791 uses manotypes:monitoring-param-ui-data;
792 uses manotypes:monitoring-param-aggregation;
794 list vnfd-monitoring-param {
795 description "A list of VNFD monitoring params";
796 key "vnfd-id-ref vnfd-monitoring-param-ref";
800 "A reference to a vnfd. This is a
802 ../../../../nsd:constituent-vnfd
803 + [nsd:id = current()/../nsd:id-ref]
805 NOTE: An issue with confd is preventing the
806 use of xpath. Seems to be an issue with leafref
807 to leafref, whose target is in a different module.
808 Once that is resolved this will switched to use
814 leaf vnfd-monitoring-param-ref {
815 description "A reference to the VNFD monitoring param";
817 path "/vnfd:vnfd-catalog/vnfd:vnfd"
818 + "[vnfd:id = current()/../vnfd-id-ref]"
819 + "/vnfd:monitoring-param/vnfd:id";
823 leaf-list member-vnf-index-ref {
825 "Optional reference to member-vnf within constituent-vnfds";
831 uses manotypes:input-parameter-xpath;
833 list parameter-pool {
835 "Pool of parameter values which must be
836 pulled from during configuration";
841 "Name of the configuration value pool";
847 "Create a range of values to populate the pool with";
851 "Generated pool values start at this value";
858 "Generated pool values stop at this value";
865 uses manotypes:ns-service-primitive;
867 list initial-config-primitive {
868 rwpb:msg-new NsdInitialConfigPrimitive;
870 "Initial set of configuration primitives for NSD.";
873 uses manotypes:initial-config;
878 description "Used to configure the list of public keys to be injected as part
879 of ns instantiation";
882 description "Name of this key pair";
887 description "Key associated with this key pair";
894 description "List of users to be added through cloud-config";
897 description "Name of the user ";
902 description "The user name's real name";
908 description "Used to configure the list of public keys to be injected as part
909 of ns instantiation";
912 description "Name of this key pair";
917 description "Key associated with this key pair";
925 container nsd-catalog {