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
326 // replicate for pnfd container here
327 uses manotypes:provider-network;
330 description "Extra parameters for VLD instantiation";
332 case vim-network-ref {
333 leaf vim-network-name {
335 "Name of network in VIM account. This is used to indicate
336 pre-provisioned network name in cloud account.";
340 case vim-network-profile {
341 leaf ip-profile-ref {
342 description "Named reference to IP-profile object";
349 list constituent-vnfd {
351 "List of VNFDs that are part of this
354 key "member-vnf-index";
356 leaf member-vnf-index {
358 "Identifier/index for the VNFD. This separate id
359 is required to ensure that multiple VNFs can be
366 "Identifier for the VNFD.";
368 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
372 leaf start-by-default {
374 "VNFD is started as part of the NS instantiation";
380 list scaling-group-descriptor {
382 "scaling group descriptor within this network service.
383 The scaling group defines a group of VNFs,
384 and the ratio of VNFs in the network service
385 that is used as target for scaling action";
390 description "Name of this scaling group.";
394 list scaling-policy {
400 "Name of the scaling policy";
407 type scaling-policy-type;
412 "Specifies if the scaling policy can be applied";
417 leaf scale-in-operation-type {
419 "Operation to be applied to check between scaling criterias to
420 check if the scale in threshold condition has been met.
422 type scaling-criteria-operation;
426 leaf scale-out-operation-type {
428 "Operation to be applied to check between scaling criterias to
429 check if the scale out threshold condition has been met.
431 type scaling-criteria-operation;
435 leaf threshold-time {
437 "The duration for which the criteria must hold true";
444 "The duration after a scaling-in/scaling-out action has been
445 triggered, for which there will be no further optional";
450 list scaling-criteria {
452 "list of conditions to be met for generating scaling
460 leaf scale-in-threshold {
462 "Value below which scale-in requests are generated";
466 leaf scale-out-threshold {
468 "Value above which scale-out requests are generated";
472 leaf ns-monitoring-param-ref {
474 "Reference to the NS level monitoring parameter
477 path "../../../../monitoring-param/id";
484 description "List of VNFs in this scaling group";
485 key "member-vnf-index-ref";
487 leaf member-vnf-index-ref {
488 description "member VNF index of this member VNF";
490 path "../../../constituent-vnfd/member-vnf-index";
496 "count of this member VNF within this scaling group.
497 The count allows to define the number of instances
498 when a scaling action targets this scaling group";
504 leaf min-instance-count {
506 "Minimum instances of the scaling group which are allowed.
507 These instances are created by default when the network service
513 leaf max-instance-count {
515 "Maximum instances of this scaling group that are allowed
516 in a single network service. The network service scaling
517 will fail, when the number of service group instances
518 exceed the max-instance-count specified.";
523 list scaling-config-action {
524 description "List of scaling config actions";
528 description "scaling trigger";
529 type scaling-trigger;
532 leaf ns-config-primitive-name-ref {
533 description "Reference to the NS config name primitive";
535 path "../../../service-primitive/name";
541 list placement-groups {
542 description "List of placement groups at NS level";
545 uses manotypes:placement-group-info;
549 "List of VNFDs that are part of this placement group";
551 key "member-vnf-index-ref";
553 leaf member-vnf-index-ref {
554 description "member VNF index of this member VNF";
556 path "../../../constituent-vnfd/member-vnf-index";
562 "Identifier for the VNFD.";
564 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
570 uses manotypes:ip-profile-list;
572 list vnf-dependency {
574 "List of VNF dependencies.";
576 leaf vnf-source-ref {
578 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
581 leaf vnf-depends-on-ref {
583 "Reference to VNF that sorce VNF depends.";
585 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
592 "List of VNF Forwarding Graph Descriptors (VNFFGD).";
598 "Identifier for the VNFFGD.";
610 "Short name for VNFFGD for UI";
615 description "Provider of the VNFFGD.";
620 description "Description of the VNFFGD.";
625 description "Version of the VNFFGD";
631 "List of Rendered Service Paths (RSP).";
637 "Identifier for the RSP.";
647 list vnfd-connection-point-ref {
649 "A list of references to connection points.";
650 key "member-vnf-index-ref";
652 leaf member-vnf-index-ref {
653 description "Reference to member-vnf within constituent-vnfds";
655 path "../../../../constituent-vnfd/member-vnf-index";
662 "A number that denotes the order of a VNF in a chain";
667 "A reference to a vnfd. This is a
669 ../../../../nsd:constituent-vnfd
670 + [nsd:id = current()/../nsd:id-ref]
672 NOTE: An issue with confd is preventing the
673 use of xpath. Seems to be an issue with leafref
674 to leafref, whose target is in a different module.
675 Once that is resovled this will switched to use
680 leaf vnfd-connection-point-ref {
682 "A reference to a connection point name
683 in a vnfd. This is a leafref to path:
684 /vnfd:vnfd-catalog/vnfd:vnfd
685 + [vnfd:id = current()/../nsd:vnfd-id-ref]
686 + /vnfd:connection-point/vnfd:name
687 NOTE: An issue with confd is preventing the
688 use of xpath. Seems to be an issue with leafref
689 to leafref, whose target is in a different module.
690 Once that is resovled this will switched to use
699 "List of classifier rules.";
705 "Identifier for the classifier rule.";
711 "Name of the classifier.";
717 "A reference to the RSP.";
723 leaf member-vnf-index-ref {
724 description "Reference to member-vnf within constituent-vnfds";
726 path "../../../constituent-vnfd/member-vnf-index";
732 "A reference to a vnfd. This is a
734 ../../../nsd:constituent-vnfd
735 + [nsd:id = current()/../nsd:id-ref]
737 NOTE: An issue with confd is preventing the
738 use of xpath. Seems to be an issue with leafref
739 to leafref, whose target is in a different module.
740 Once that is resovled this will switched to use
745 leaf vnfd-connection-point-ref {
747 "A reference to a connection point name
748 in a vnfd. This is a leafref to path:
749 /vnfd:vnfd-catalog/vnfd:vnfd
750 + [vnfd:id = current()/../nsd:vnfd-id-ref]
751 + /vnfd:connection-point/vnfd:name
752 NOTE: An issue with confd is preventing the
753 use of xpath. Seems to be an issue with leafref
754 to leafref, whose target is in a different module.
755 Once that is resovled this will switched to use
760 list match-attributes {
762 "List of match attributes.";
768 "Identifier for the classifier match attribute rule.";
778 leaf source-ip-address {
780 "Source IP address.";
781 type inet:ip-address;
784 leaf destination-ip-address {
786 "Destination IP address.";
787 type inet:ip-address;
792 "Source port number.";
793 type inet:port-number;
796 leaf destination-port {
798 "Destination port number.";
799 type inet:port-number;
801 //TODO: Add more match criteria
806 list monitoring-param {
808 "List of monitoring parameters from VNF's that should be
809 propogated up into NSR";
820 uses manotypes:monitoring-param-value;
821 uses manotypes:monitoring-param-ui-data;
822 uses manotypes:monitoring-param-aggregation;
824 list vnfd-monitoring-param {
825 description "A list of VNFD monitoring params";
826 key "vnfd-id-ref vnfd-monitoring-param-ref";
830 "A reference to a vnfd. This is a
832 ../../../../nsd:constituent-vnfd
833 + [nsd:id = current()/../nsd:id-ref]
835 NOTE: An issue with confd is preventing the
836 use of xpath. Seems to be an issue with leafref
837 to leafref, whose target is in a different module.
838 Once that is resolved this will switched to use
844 leaf vnfd-monitoring-param-ref {
845 description "A reference to the VNFD monitoring param";
847 path "/vnfd:vnfd-catalog/vnfd:vnfd"
848 + "[vnfd:id = current()/../vnfd-id-ref]"
849 + "/vnfd:monitoring-param/vnfd:id";
853 leaf-list member-vnf-index-ref {
855 "Optional reference to member-vnf within constituent-vnfds";
861 uses manotypes:input-parameter-xpath;
863 list parameter-pool {
865 "Pool of parameter values which must be
866 pulled from during configuration";
871 "Name of the configuration value pool";
877 "Create a range of values to populate the pool with";
881 "Generated pool values start at this value";
888 "Generated pool values stop at this value";
895 uses manotypes:ns-service-primitive;
897 list initial-config-primitive {
898 rwpb:msg-new NsdInitialConfigPrimitive;
900 "Initial set of configuration primitives for NSD.";
903 uses ns-initial-config-primitive;
907 container nsd-catalog {