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 "Flag indicating whether this network is a VIM management network";
336 description "Extra parameters for VLD instantiation";
338 case vim-network-ref {
339 leaf vim-network-name {
341 "Name of network in VIM account. This is used to indicate
342 pre-provisioned network name in cloud account.";
347 case vim-network-profile {
348 leaf ip-profile-ref {
349 description "Named reference to IP-profile object";
357 list constituent-vnfd {
359 "List of VNFDs that are part of this
362 key "member-vnf-index";
364 leaf member-vnf-index {
366 "Identifier/index for the VNFD. This separate id
367 is required to ensure that multiple VNFs can be
374 "Identifier for the VNFD.";
376 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
380 leaf start-by-default {
382 "VNFD is started as part of the NS instantiation";
388 list scaling-group-descriptor {
390 "scaling group descriptor within this network service.
391 The scaling group defines a group of VNFs,
392 and the ratio of VNFs in the network service
393 that is used as target for scaling action";
398 description "Name of this scaling group.";
402 list scaling-policy {
408 "Name of the scaling policy";
415 type scaling-policy-type;
420 "Specifies if the scaling policy can be applied";
425 leaf scale-in-operation-type {
427 "Operation to be applied to check between scaling criterias to
428 check if the scale in threshold condition has been met.
430 type scaling-criteria-operation;
434 leaf scale-out-operation-type {
436 "Operation to be applied to check between scaling criterias to
437 check if the scale out threshold condition has been met.
439 type scaling-criteria-operation;
443 leaf threshold-time {
445 "The duration for which the criteria must hold true";
452 "The duration after a scaling-in/scaling-out action has been
453 triggered, for which there will be no further optional";
458 list scaling-criteria {
460 "list of conditions to be met for generating scaling
468 leaf scale-in-threshold {
470 "Value below which scale-in requests are generated";
474 leaf scale-out-threshold {
476 "Value above which scale-out requests are generated";
480 leaf ns-monitoring-param-ref {
482 "Reference to the NS level monitoring parameter
485 path "../../../../monitoring-param/id";
492 description "List of VNFs in this scaling group";
493 key "member-vnf-index-ref";
495 leaf member-vnf-index-ref {
496 description "member VNF index of this member VNF";
498 path "../../../constituent-vnfd/member-vnf-index";
504 "count of this member VNF within this scaling group.
505 The count allows to define the number of instances
506 when a scaling action targets this scaling group";
512 leaf min-instance-count {
514 "Minimum instances of the scaling group which are allowed.
515 These instances are created by default when the network service
521 leaf max-instance-count {
523 "Maximum instances of this scaling group that are allowed
524 in a single network service. The network service scaling
525 will fail, when the number of service group instances
526 exceed the max-instance-count specified.";
531 list scaling-config-action {
532 description "List of scaling config actions";
536 description "scaling trigger";
537 type scaling-trigger;
540 leaf ns-config-primitive-name-ref {
541 description "Reference to the NS config name primitive";
543 path "../../../service-primitive/name";
549 list placement-groups {
550 description "List of placement groups at NS level";
553 uses manotypes:placement-group-info;
557 "List of VNFDs that are part of this placement group";
559 key "member-vnf-index-ref";
561 leaf member-vnf-index-ref {
562 description "member VNF index of this member VNF";
564 path "../../../constituent-vnfd/member-vnf-index";
570 "Identifier for the VNFD.";
572 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
578 uses manotypes:ip-profile-list;
580 list vnf-dependency {
582 "List of VNF dependencies.";
584 leaf vnf-source-ref {
586 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
589 leaf vnf-depends-on-ref {
591 "Reference to VNF that sorce VNF depends.";
593 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
600 "List of VNF Forwarding Graph Descriptors (VNFFGD).";
606 "Identifier for the VNFFGD.";
618 "Short name for VNFFGD for UI";
623 description "Provider of the VNFFGD.";
628 description "Description of the VNFFGD.";
633 description "Version of the VNFFGD";
639 "List of Rendered Service Paths (RSP).";
645 "Identifier for the RSP.";
655 list vnfd-connection-point-ref {
657 "A list of references to connection points.";
658 key "member-vnf-index-ref";
660 leaf member-vnf-index-ref {
661 description "Reference to member-vnf within constituent-vnfds";
663 path "../../../../constituent-vnfd/member-vnf-index";
670 "A number that denotes the order of a VNF in a chain";
675 "A reference to a vnfd. This is a
677 ../../../../nsd:constituent-vnfd
678 + [nsd:id = current()/../nsd:id-ref]
680 NOTE: An issue with confd is preventing the
681 use of xpath. Seems to be an issue with leafref
682 to leafref, whose target is in a different module.
683 Once that is resovled this will switched to use
688 leaf vnfd-connection-point-ref {
690 "A reference to a connection point name
691 in a vnfd. This is a leafref to path:
692 /vnfd:vnfd-catalog/vnfd:vnfd
693 + [vnfd:id = current()/../nsd:vnfd-id-ref]
694 + /vnfd:connection-point/vnfd:name
695 NOTE: An issue with confd is preventing the
696 use of xpath. Seems to be an issue with leafref
697 to leafref, whose target is in a different module.
698 Once that is resovled this will switched to use
707 "List of classifier rules.";
713 "Identifier for the classifier rule.";
719 "Name of the classifier.";
725 "A reference to the RSP.";
731 leaf member-vnf-index-ref {
732 description "Reference to member-vnf within constituent-vnfds";
734 path "../../../constituent-vnfd/member-vnf-index";
740 "A reference to a vnfd. This is a
742 ../../../nsd:constituent-vnfd
743 + [nsd:id = current()/../nsd:id-ref]
745 NOTE: An issue with confd is preventing the
746 use of xpath. Seems to be an issue with leafref
747 to leafref, whose target is in a different module.
748 Once that is resovled this will switched to use
753 leaf vnfd-connection-point-ref {
755 "A reference to a connection point name
756 in a vnfd. This is a leafref to path:
757 /vnfd:vnfd-catalog/vnfd:vnfd
758 + [vnfd:id = current()/../nsd:vnfd-id-ref]
759 + /vnfd:connection-point/vnfd:name
760 NOTE: An issue with confd is preventing the
761 use of xpath. Seems to be an issue with leafref
762 to leafref, whose target is in a different module.
763 Once that is resovled this will switched to use
768 list match-attributes {
770 "List of match attributes.";
776 "Identifier for the classifier match attribute rule.";
786 leaf source-ip-address {
788 "Source IP address.";
789 type inet:ip-address;
792 leaf destination-ip-address {
794 "Destination IP address.";
795 type inet:ip-address;
800 "Source port number.";
801 type inet:port-number;
804 leaf destination-port {
806 "Destination port number.";
807 type inet:port-number;
809 //TODO: Add more match criteria
814 list monitoring-param {
816 "List of monitoring parameters from VNF's that should be
817 propogated up into NSR";
828 uses manotypes:monitoring-param-value;
829 uses manotypes:monitoring-param-ui-data;
830 uses manotypes:monitoring-param-aggregation;
832 list vnfd-monitoring-param {
833 description "A list of VNFD monitoring params";
834 key "vnfd-id-ref vnfd-monitoring-param-ref";
838 "A reference to a vnfd. This is a
840 ../../../../nsd:constituent-vnfd
841 + [nsd:id = current()/../nsd:id-ref]
843 NOTE: An issue with confd is preventing the
844 use of xpath. Seems to be an issue with leafref
845 to leafref, whose target is in a different module.
846 Once that is resolved this will switched to use
852 leaf vnfd-monitoring-param-ref {
853 description "A reference to the VNFD monitoring param";
855 path "/vnfd:vnfd-catalog/vnfd:vnfd"
856 + "[vnfd:id = current()/../vnfd-id-ref]"
857 + "/vnfd:monitoring-param/vnfd:id";
861 leaf-list member-vnf-index-ref {
863 "Optional reference to member-vnf within constituent-vnfds";
869 uses manotypes:input-parameter-xpath;
871 list parameter-pool {
873 "Pool of parameter values which must be
874 pulled from during configuration";
879 "Name of the configuration value pool";
885 "Create a range of values to populate the pool with";
889 "Generated pool values start at this value";
896 "Generated pool values stop at this value";
903 uses manotypes:ns-service-primitive;
905 list initial-config-primitive {
906 rwpb:msg-new NsdInitialConfigPrimitive;
908 "Initial set of configuration primitives for NSD.";
911 uses ns-initial-config-primitive;
916 description "Used to configure the list of public keys to be injected as part
917 of ns instantiation";
920 description "Name of this key pair";
925 description "Key associated with this key pair";
932 description "List of users to be added through cloud-config";
935 description "Name of the user ";
940 description "The user name's real name";
946 description "Used to configure the list of public keys to be injected as part
947 of ns instantiation";
950 description "Name of this key pair";
955 description "Key associated with this key pair";
963 container nsd-catalog {