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 {
311 description "A reference to a connection point name";
313 path "/vnfd:vnfd-catalog/vnfd:vnfd" +
314 "[vnfd:id = current()/../vnfd-id-ref]/" +
315 "vnfd:connection-point/vnfd:name";
320 // replicate for pnfd container here
321 uses manotypes:provider-network;
324 description "Flag indicating whether this network is a VIM management 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.";
341 case vim-network-profile {
342 leaf ip-profile-ref {
343 description "Named reference to IP-profile object";
351 list constituent-vnfd {
353 "List of VNFDs that are part of this
356 key "member-vnf-index";
358 leaf member-vnf-index {
360 "Identifier/index for the VNFD. This separate id
361 is required to ensure that multiple VNFs can be
368 "Identifier for the VNFD.";
370 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
374 leaf start-by-default {
376 "VNFD is started as part of the NS instantiation";
382 list scaling-group-descriptor {
384 "scaling group descriptor within this network service.
385 The scaling group defines a group of VNFs,
386 and the ratio of VNFs in the network service
387 that is used as target for scaling action";
392 description "Name of this scaling group.";
396 list scaling-policy {
402 "Name of the scaling policy";
409 type scaling-policy-type;
414 "Specifies if the scaling policy can be applied";
419 leaf scale-in-operation-type {
421 "Operation to be applied to check between scaling criterias to
422 check if the scale in threshold condition has been met.
424 type scaling-criteria-operation;
428 leaf scale-out-operation-type {
430 "Operation to be applied to check between scaling criterias to
431 check if the scale out threshold condition has been met.
433 type scaling-criteria-operation;
437 leaf threshold-time {
439 "The duration for which the criteria must hold true";
446 "The duration after a scaling-in/scaling-out action has been
447 triggered, for which there will be no further optional";
452 list scaling-criteria {
454 "list of conditions to be met for generating scaling
462 leaf scale-in-threshold {
464 "Value below which scale-in requests are generated";
468 leaf scale-out-threshold {
470 "Value above which scale-out requests are generated";
474 leaf ns-monitoring-param-ref {
476 "Reference to the NS level monitoring parameter
479 path "../../../../monitoring-param/id";
486 description "List of VNFs in this scaling group";
487 key "member-vnf-index-ref";
489 leaf member-vnf-index-ref {
490 description "member VNF index of this member VNF";
492 path "../../../constituent-vnfd/member-vnf-index";
498 "count of this member VNF within this scaling group.
499 The count allows to define the number of instances
500 when a scaling action targets this scaling group";
506 leaf min-instance-count {
508 "Minimum instances of the scaling group which are allowed.
509 These instances are created by default when the network service
515 leaf max-instance-count {
517 "Maximum instances of this scaling group that are allowed
518 in a single network service. The network service scaling
519 will fail, when the number of service group instances
520 exceed the max-instance-count specified.";
525 list scaling-config-action {
526 description "List of scaling config actions";
530 description "scaling trigger";
531 type scaling-trigger;
534 leaf ns-config-primitive-name-ref {
535 description "Reference to the NS config name primitive";
537 path "../../../service-primitive/name";
543 list placement-groups {
544 description "List of placement groups at NS level";
547 uses manotypes:placement-group-info;
551 "List of VNFDs that are part of this placement group";
553 key "member-vnf-index-ref";
555 leaf member-vnf-index-ref {
556 description "member VNF index of this member VNF";
558 path "../../../constituent-vnfd/member-vnf-index";
564 "Identifier for the VNFD.";
566 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
572 uses manotypes:ip-profile-list;
574 list vnf-dependency {
576 "List of VNF dependencies.";
578 leaf vnf-source-ref {
580 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
583 leaf vnf-depends-on-ref {
585 "Reference to VNF that sorce VNF depends.";
587 path "/vnfd:vnfd-catalog/vnfd:vnfd/vnfd:id";
594 "List of VNF Forwarding Graph Descriptors (VNFFGD).";
600 "Identifier for the VNFFGD.";
612 "Short name for VNFFGD for UI";
617 description "Provider of the VNFFGD.";
622 description "Description of the VNFFGD.";
627 description "Version of the VNFFGD";
633 "List of Rendered Service Paths (RSP).";
639 "Identifier for the RSP.";
649 list vnfd-connection-point-ref {
651 "A list of references to connection points.";
652 key "member-vnf-index-ref";
654 leaf member-vnf-index-ref {
655 description "Reference to member-vnf within constituent-vnfds";
657 path "../../../../constituent-vnfd/member-vnf-index";
664 "A number that denotes the order of a VNF in a chain";
669 "A reference to a vnfd. This is a
671 ../../../../nsd:constituent-vnfd
672 + [nsd:id = current()/../nsd:id-ref]
674 NOTE: An issue with confd is preventing the
675 use of xpath. Seems to be an issue with leafref
676 to leafref, whose target is in a different module.
677 Once that is resovled this will switched to use
682 leaf vnfd-connection-point-ref {
684 "A reference to a connection point name
685 in a vnfd. This is a leafref to path:
686 /vnfd:vnfd-catalog/vnfd:vnfd
687 + [vnfd:id = current()/../nsd:vnfd-id-ref]
688 + /vnfd:connection-point/vnfd:name
689 NOTE: An issue with confd is preventing the
690 use of xpath. Seems to be an issue with leafref
691 to leafref, whose target is in a different module.
692 Once that is resovled this will switched to use
701 "List of classifier rules.";
707 "Identifier for the classifier rule.";
713 "Name of the classifier.";
719 "A reference to the RSP.";
725 leaf member-vnf-index-ref {
726 description "Reference to member-vnf within constituent-vnfds";
728 path "../../../constituent-vnfd/member-vnf-index";
734 "A reference to a vnfd. This is a
736 ../../../nsd:constituent-vnfd
737 + [nsd:id = current()/../nsd:id-ref]
739 NOTE: An issue with confd is preventing the
740 use of xpath. Seems to be an issue with leafref
741 to leafref, whose target is in a different module.
742 Once that is resovled this will switched to use
747 leaf vnfd-connection-point-ref {
749 "A reference to a connection point name
750 in a vnfd. This is a leafref to path:
751 /vnfd:vnfd-catalog/vnfd:vnfd
752 + [vnfd:id = current()/../nsd:vnfd-id-ref]
753 + /vnfd:connection-point/vnfd:name
754 NOTE: An issue with confd is preventing the
755 use of xpath. Seems to be an issue with leafref
756 to leafref, whose target is in a different module.
757 Once that is resovled this will switched to use
762 list match-attributes {
764 "List of match attributes.";
770 "Identifier for the classifier match attribute rule.";
780 leaf source-ip-address {
782 "Source IP address.";
783 type inet:ip-address;
786 leaf destination-ip-address {
788 "Destination IP address.";
789 type inet:ip-address;
794 "Source port number.";
795 type inet:port-number;
798 leaf destination-port {
800 "Destination port number.";
801 type inet:port-number;
803 //TODO: Add more match criteria
808 list monitoring-param {
810 "List of monitoring parameters from VNF's that should be
811 propogated up into NSR";
822 uses manotypes:monitoring-param-value;
823 uses manotypes:monitoring-param-ui-data;
824 uses manotypes:monitoring-param-aggregation;
826 list vnfd-monitoring-param {
827 description "A list of VNFD monitoring params";
828 key "vnfd-id-ref vnfd-monitoring-param-ref";
832 "A reference to a vnfd. This is a
834 ../../../../nsd:constituent-vnfd
835 + [nsd:id = current()/../nsd:id-ref]
837 NOTE: An issue with confd is preventing the
838 use of xpath. Seems to be an issue with leafref
839 to leafref, whose target is in a different module.
840 Once that is resolved this will switched to use
846 leaf vnfd-monitoring-param-ref {
847 description "A reference to the VNFD monitoring param";
849 path "/vnfd:vnfd-catalog/vnfd:vnfd"
850 + "[vnfd:id = current()/../vnfd-id-ref]"
851 + "/vnfd:monitoring-param/vnfd:id";
855 leaf-list member-vnf-index-ref {
857 "Optional reference to member-vnf within constituent-vnfds";
863 uses manotypes:input-parameter-xpath;
865 list parameter-pool {
867 "Pool of parameter values which must be
868 pulled from during configuration";
873 "Name of the configuration value pool";
879 "Create a range of values to populate the pool with";
883 "Generated pool values start at this value";
890 "Generated pool values stop at this value";
897 uses manotypes:ns-service-primitive;
899 list initial-config-primitive {
900 rwpb:msg-new NsdInitialConfigPrimitive;
902 "Initial set of configuration primitives for NSD.";
905 uses ns-initial-config-primitive;
910 description "Used to configure the list of public keys to be injected as part
911 of ns instantiation";
914 description "Name of this key pair";
919 description "Key associated with this key pair";
926 description "List of users to be added through cloud-config";
929 description "Name of the user ";
934 description "The user name's real name";
940 description "Used to configure the list of public keys to be injected as part
941 of ns instantiation";
944 description "Name of this key pair";
949 description "Key associated with this key pair";
957 container nsd-catalog {